Skip to content

Scaffold C# native app#280

Merged
enaboapps merged 68 commits into
mainfrom
feat/csharp-native-0.2-279
Jun 30, 2026
Merged

Scaffold C# native app#280
enaboapps merged 68 commits into
mainfrom
feat/csharp-native-0.2-279

Conversation

@enaboapps

@enaboapps enaboapps commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the C#/.NET 8 solution skeleton for the native 0.2.0 app
  • port protocol validation, pairing/auth storage, settings normalization, startup registration, update logic, diagnostics, and view-model copy helpers
  • add WPF main/settings window shells plus tray and startup-hidden lifecycle wiring
  • bring the C# main window closer to the original Electron card UI with status badge, centered primary state, update banner, pairing panel, and collapsed troubleshooting
  • refine C# WPF visual design with explicit rounded control templates and a custom sidebar-tabbed Settings utility layout
  • wire WPF settings controls for startup, pointer movement, cursor overlay, updates, paired-device display, and forget-device actions
  • wire the main-window update banner to open Settings > Updates and consume shared update state
  • emit C# startup diagnostics to the existing app data JSONL path
  • add a C# control-session routing layer for authenticated protocol commands and no-ack responses
  • add C# pairing approval manager with deterministic verification codes, token-free pending views, accept/reject/expiry, and persisted paired devices
  • show pending pairing approvals in the native main window with accept/reject actions
  • expire stale C# pairing approvals at runtime, send expiry responses, close stale pairing connections, and clear expired Bluetooth partial frames
  • add remote-session coordinator for pairing requests, delayed pairing-complete responses, replacement/expiry cleanup, and command delegation
  • add Bluetooth remote-frame processor that maps remote-session outgoing messages back to response frames per connection
  • port the Windows Bluetooth GATT host into the C# app process with live system radio monitoring, advertising restart, RX/TX/status characteristics, and typed Bluetooth events
  • restart C# Bluetooth advertising after normal client disconnects so Android can reconnect after the first session
  • allow smaller pointer movement scale values down to 25% and expose lower native Settings presets
  • start the C# Bluetooth runtime from the WPF app and route incoming frames through the remote session to desktop input
  • integrate an in-process C# cursor overlay runtime with click/move/drag rendering, crosshairs, persistent follow mode, and settings-backed color/size/visibility
  • match C# cursor overlay while-controlling lifetime to the Electron control-session behavior
  • fix C# cursor overlay startup race that crashed before the WinForms overlay handle existed
  • fix C# single-file WPF startup by self-extracting native runtime libraries
  • add C# Windows packaging scaffolding: NSIS installer script, dotnet publish/stage/package driver, updater metadata generation, and staged package verifier
  • make the C# app project version the source of truth for C# executable, package, builder metadata, and updater metadata versions
  • harden C# installer process detection and verify elevation, Program Files install target, run-after-finish behavior, app-close prompts, and uninstall registry metadata before packaging
  • add CI coverage for C# restore, build, tests, stage-only package generation, and staged package verification
  • expand C# Android-facing remote command coverage for shortcut, text, media, and window commands
  • cover C# update polling guards for duplicate starts, stop/dispose, and overlapping automatic checks
  • harden C# GitHub update backend coverage for newer-release selection and installer cache path safety
  • add C# update install confirmation before opening the downloaded installer and test install failure copy
  • signal the primary C# instance to show its main window from second normal launches while second --start-hidden launches still exit quietly
  • add C# tray status and disconnect controls backed by live Bluetooth status
  • show C# Bluetooth last-checked and last-changed timestamps in troubleshooting details
  • expand C# Bluetooth troubleshooting summaries with event timestamps, recent event history, and recent error details
  • keep the existing Electron app intact while C# parity work continues

Closes #279.

Validation

  • npm run dotnet:restore
  • npm run dotnet:build
  • npm run dotnet:test (224 C# unit tests + 1 integration placeholder)
  • npm run dotnet:publish
  • npm run dotnet:package:win:stage
  • npm run dotnet:package:win:verify
  • staged C# app --start-hidden smoke
  • staged C# app executable version check: FileVersion 0.2.0.0, ProductVersion 0.2.0
  • staged C# builder metadata check: version: 0.2.0
  • published C# app --start-hidden smoke after Bluetooth and overlay runtime startup
  • published C# app startup diagnostics append smoke
  • staged C# app launch smoke after reconnect fix: PID remained running, no startup crash events
  • staged C# app launch smoke after WPF single-file extraction fix: PID remained running
  • staged C# app launch smoke after main-window UI parity pass: PID remained running
  • staged C# app launch smoke after WPF visual design pass: PID remained running
  • staged C# app launch smoke after Settings layout correction: PID remained running
  • staged C# app launch smoke after custom tabbed Settings restoration: PID remained running
  • npm test
  • npm run typecheck
  • npm run build

Remaining parity work

  • harden and manually smoke the in-process Bluetooth GATT host against Android on Windows hardware
  • manually smoke cursor overlay rendering during real pointer input
  • run C# NSIS installer build/signing on the signing runner with NSIS installed
  • switch the production release workflow from Electron packaging to the C# installer once parity is accepted
  • run full Windows manual parity smoke before replacing the Electron production target

@enaboapps enaboapps added this to the Release 0.2.0 milestone Jun 29, 2026
@enaboapps enaboapps marked this pull request as ready for review June 30, 2026 09:32
@enaboapps enaboapps merged commit bdc4c7e into main Jun 30, 2026
1 check passed
@enaboapps enaboapps deleted the feat/csharp-native-0.2-279 branch June 30, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build C# native Switchify PC 0.2.0

2 participants