fix(components): keep presence snapshots across bounded reconnect stop - #481
Open
slashdevcorpse wants to merge 2 commits into
Open
fix(components): keep presence snapshots across bounded reconnect stop#481slashdevcorpse wants to merge 2 commits into
slashdevcorpse wants to merge 2 commits into
Conversation
Follow-up to LodyAI#449. Presence transport stop no longer publishes an empty map, so a live PC is not shown offline for each renderer reconnect.
stop() no longer wiping was not enough. start() still published an empty store. Skip snapshots that contain no machine heartbeat.
slashdevcorpse
marked this pull request as ready for review
September 8, 2026 00:46
This was referenced Sep 8, 2026
|
@slashdevcorpse, this pull request needs updates before review. It is marked If the PR remains invalid for 7 days, it will be closed and marked Policy findings |
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.
Related issue
Closes #480
Problem / pressure
#449 bounded renderer meta reconnect backoff. Each retry still stops the presence transport, which published
{}. The UI then treated a live PC as offline. That is the renderer side of the same cluster as #398 / #399.Summary
WorkspacePresenceTransportno longer publishes a snapshot with nokind: 'machine'entries.stop()does not emit{}. A reconnectstart()on an empty store does not either. Wake detection still stampslastSnapshotAtMs. Last machine heartbeats remain until a new machine snapshot or the 90s TTL.Before / after
stop()or the next emptystart()emitted{}and lists showed the PC offline.idle.Test plan
corepack pnpm exec vitest run tests/workspace-presence-transport.test.ts tests/local-reconnect-loop.test.ts tests/create-workspace-runtime-meta-recovery.test.tsfrompackages/components— 34 passed.{}vs last machine snapshot) and passed after the skip.Context handoff
Instructions for reviewing agents
onBeforeStopandonStoreChangeinworkspace-presence-transport.ts, plus the keep-on-stop / restart-empty case inworkspace-presence-transport.test.ts.kind: 'machine'instead of a UI.has()sweep. Viewing-only updates no longer notifyonSnapshot.clearLodyPresenceStatesAtom.Authoring context
.has()call site.MACHINE_OFFLINEchange. No three-state UI sweep.idleas empty.