Skip to content

feat: add an opt-in native Windows desktop directory - #161

Draft
qinghuidaqzp wants to merge 4 commits into
reason-machines:mainfrom
qinghuidaqzp:feat/windows-desktop
Draft

qinghuidaqzp wants to merge 4 commits into
reason-machines:mainfrom
qinghuidaqzp:feat/windows-desktop

Conversation

@qinghuidaqzp

@qinghuidaqzp qinghuidaqzp commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Windows has daemon and CLI support, but its users cannot browse the live team directory in a desktop window. This adds an opt-in native Windows directory using the project's existing windows-sys dependency.

No new crates: Cargo.lock is byte-for-byte identical to upstream main@fea09c5. The implementation uses Win32 list views, edit controls, buttons and the Windows clipboard API. The previous Tao/Wry stack, embedded HTML/JavaScript and frontend test runner have been removed (110 dependency packages removed). The desktop feature only enables additional bindings in the existing windows-sys package.

Build with cargo build --features desktop --locked, then run reason-network desktop or double-click that build. The window shows team/machine connectivity, session addresses, projects/branches, activity, delivery tier and local unread counts. It supports Unicode search, Working/Unread filters, refresh, selected-address copying, and explicit team-link copying. Native controls provide keyboard navigation and DPI-aware layout. A failed daemon connection is shown as offline or stale, and polling reconnects automatically.

The view reuses Link::existing() and bounded Who/Link requests. It does not start the daemon, register an agent, consume messages or modify configuration. Updates and commands use bounded channels; closing the window aborts polling and leaves the daemon running. Display labels are bounded and sanitized; copied addresses must exactly match the directory and contain no NUL. Clipboard text is transferred as UTF-16 through the native API without launching a subprocess.

Validation

On Windows, based on upstream main@fea09c5:

  • cargo fmt --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo clippy --all-targets --features desktop --locked -- -D warnings
  • cargo test --locked and cargo test --features desktop --locked: 251 tests passed in each configuration
  • cargo build --features desktop --locked
  • Regression tests cover exact address matching/NUL rejection, local unread identity, Unicode/case-insensitive filtering, and safe display labels.
  • Actual native window with an isolated daemon/profile: live directory, unread filter, Chinese path search, no-match/empty states, Ctrl+F and Tab navigation, exact clipboard address comparison, team-link copying, offline/stale state, automatic reconnect, and closing independently of the daemon.
  • Database checks confirmed both fixture messages remained unread and the Desktop registered no agent session.
  • git diff origin/main -- Cargo.lock is empty. Windows CI checks/tests the feature; all three platforms check the default build.

This remains a draft for maintainer scope/UX review. Windows-only; no installer, autostart, message composer or approval UI. Real multi-machine UI and long-duration resource tests have not been run. The new commit's CI status is in Checks; no pending run is counted as passed.

@larstalian

Copy link
Copy Markdown
Member

Thanks for this, a desktop directory on Windows is a nice idea, and the PR is clearly put together with care.

Before we review it in depth, one thing to flag: it adds tao and wry (a webview stack), which brings in a lot of new crates to Cargo.lock, even behind a feature flag. Reason Network runs on everyone's machines and updates itself, so we keep its dependencies to a small core and look closely at every new one. We're pausing this PR while we decide whether a webview dependency fits. I'll come back here with an answer either way.

@qinghuidaqzp qinghuidaqzp changed the title feat: add an opt-in Windows desktop directory feat: add an opt-in native Windows desktop directory Oct 29, 2026
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.

2 participants