Repository navigation
Conversation
Browser peers never emit session.connected. The Mac shell was supposed to notice bolt-daemon stderr, but it matched the Rust static name ACTIVE_SESSION registered, which the daemon does not print. The live lines are [WT_SESSION] … session established and [SESSION] … active session handle registered, so the UI stayed on Waiting for encrypted channel after the session was already up. Co-authored-by: Evan Oberfelder <evanoberfelder@gmail.com>
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.
Why
Studio Chrome (
https://localbolt.app) can finish a WebTransport session with the Mac daemon while LocalBolt.app stays on Establishing secure connection… / Waiting for encrypted channel.Oct 24, 2026 LAN capture (Studio → MacBook, native-full daemon log, pairing
AllowAlways, SAS5BE04E):[WT_HELLO] … HELLO ok,[SAS] 5BE04E,[WT_SESSION] … session established, entering shared session loop, and[SESSION] … active session handle registered.[IPC_CLIENT_DISCONNECTED]and tore that session down.HELLO success is not the session. The UI is supposed to advance when the shared session handle is registered.
Root cause
The WebTransport answerer (
wt_endpoint.rs) does not emitsession.connectedorsession.sas. The WebSocket answerer does, and the Mac IPC handler (daemon://session-connected) only runs for that path. The shell’s fallback watches daemon stderr.That parser required the substring
ACTIVE_SESSION registered/ACTIVE_SESSION cleared. Those are the Rust static’s name, not log lines. bolt-daemon prints:[WT_SESSION] <peer> session established, entering shared session loop[SESSION] <peer> active session handle registered[SESSION] <peer> active session handle clearedNone of the Oct 24 lines contain
ACTIVE_SESSION registered, sowtSessionActivenever latched and the SwiftUIonChangenever calledmarkConnected(). The shell stayed in.connecting, which is the acceptor view “Waiting for encrypted channel”.[WT_HELLO] … HELLO okand the earlier[WT_SESSION] session acceptedlines are intentionally not a session. Treating them as one would leave Establishing during the ask sheet, or stick on Connected if the user then denied.Fix
cleareddoes not poison a reconnect). The oldACTIVE_SESSIONtoken still matches if a build ever printed it..connecting(and.requesting, ifconnection_acceptedhas not moved the initiator yet) for.connected, keep the signaling device name, and show the stderr SAS as unverified..incomingRequestis unchanged, so a handshake cannot skip Decline.active session handle cleareddrops the latch and leaves the connected screen. An in-session Approve or mismatch alert is not rewritten back to unverified by the next poll.task(id:)also promotes if the latch was already set while the pairing sheet was up.No bolt-daemon change is required for this bug. Emitting
session.connected/session.sasfrom the WT answerer would also reach the existing IPC handler; the shell no longer depends on that.Stacks on #38 so the live WebTransport port and advertised device name stay in this build.
Verify on a LAN (Studio web ↔ Mac app)
This environment cannot run LocalBolt.app. The parser is covered by
cargo testinnative/sharedagainst the Oct 24 log shape (5BE04E, WT established, sharedactive session handle registered, and the lines that must not count).On two machines on the same LAN:
BOLT_DAEMON_PATH) and stderr is the native-full log.https://localbolt.app, connect to the Mac and Accept on the Mac (signaling Accept, then the daemon Connection Request sheet if it appears). Allow once or Remember this device.[WT_SESSION] … session establishedand[SESSION] … active session handle registered, the Mac must leave “Waiting for encrypted channel”.5BE04E), with Approve this session. That comparison is still required; pairing Allow does not skip it. After Approve, Drop files / Select Files should appear, matching the browser.active session handle cleared/IPC_CLIENT_DISCONNECTED, and a relaunch should not remain on the old connected screen.session.connected; this change does not replace that path.