Repository navigation
fix(app): run the node watcher on Windows over the shared gRPC client - #4250
Merged
Merged
Conversation
The watcher already rides the shared GrpcClient, whose default transport is the Named Pipe on Windows, so nothing in it is Unix specific. Remove the non-Unix no-op stub and the unix gates on spawn, run, watch_loop and stream_once, and run the watch-loop unit tests on every platform. The app now receives node and relationship events on Windows. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
issue-3968-watcher
branch
from
November 5, 2026 10:55
330f757 to
4beb41c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3968
What changed
watcher.rs: removed the#[cfg(not(unix))]no-opspawnand the#[cfg(unix)]gates onspawn,run,watch_loopandstream_once, and#[cfg(all(test, unix))]became#[cfg(test)]. One code path on every platform: the watcher already opens WatchNodes throughGrpcClient::echo_suppressed_client/subscribe_active_database, and the shared client's default transport is the Named Pipe on Windows (connect_lazy_held->channel_lazy->pipe_channel_lazy). The Windows app now receivesnode:*andrelationship:*events.Verification on the real Windows 11 PC
cargo check -p nodespace-app-libon the PC (workspace copied from this branch; gnu host toolchain, since the msvc toolchain has nolink.exethere): finished with exit 0, so the previously cfg'd-out watcher code compiles for Windows (no warnings fromwatcher.rs). The app-lib library itself does not need libclang; its dev-dependencies (test-support -> daemon -> NLP engine) do, so its tests could not run there. (cargo checkagainstx86_64-pc-windows-msvcwas not possible: that target/linker is not installed.)watch_loop/Pause/pause_aftertext fromwatcher.rs(with its 6 unit tests), the verbatim Windows pipe client fromgrpc_client.rs(pipe_channel_lazy,open_pipe_when_free), the daemon'sNamedPipeConnand a minimal in-process NodeService server serving only WatchNodes on a real Named Pipe. Result: the 6 watcher unit tests pass on Windows, and the end-to-end test passed: 3 events (created/updated/deleted withdatabase_id) arrived over the pipe through the tonic channel, the first stream ended cleanly,watch_loopreconnected (2 connections total), 3 more events arrived, and cancelling exited the loop withOk.Tests (Mac)
cargo test -p nodespace-app-lib --lib watcher: 11 passed;cargo fmt --checkandcargo clippy -p nodespace-app-lib --all-targets -D warningsclean. No new Mac test: the change only widens the cfg, the existing watch-loop tests now run on every platform, so there is nothing to mutate.What only a full Windows app run could prove
That the real
nodespaced.exe(owner-only DACL pipe) and the real app deliver events to the webview on a Windows release build: neither could be built on the PC (no libclang). The harness server stands in for the daemon and does not apply the DACL; the realstream_once(TauriAppHandle,emit_routed) was only compiled, not run. A Windows CI compile check of this crate is not added here.🤖 Generated with Claude Code