Skip to content

feat(sidebar): cross-device remote status rings - #636

Merged
danshapiro merged 10 commits into
mainfrom
the-usual/remote-status-rings
Aug 11, 2026
Merged

feat(sidebar): cross-device remote status rings#636
danshapiro merged 10 commits into
mainfrom
the-usual/remote-status-rings

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

What

In the left panel ("Coding Agents" sidebar), a session that is open or busy on a different device now shows a ring around its provider icon on this device:

  • Blue ring — the session is busy on another device (any of its remotely-open panes is busy, per the same resolvePaneActivity logic that drives the local blue icon).
  • Green ring — the session is open on another device but idle there.
  • No ring when the session is open on this device (any window — including the canonical fresh-agent restore-gap identity and sameDeviceOpen records). Blue wins over green, mirroring local precedence.

Non-color carriers included: data-remote-status attribute, tooltip line, and sr-only text (a11y / automation).

How

  • Producer (per device, client): the existing 5s tabs.sync.push snapshot now stamps each pane payload with sessionKeys: string[] (complete identity contract: explicit sessionRef, Claude resumeSessionId, Codex durability, live fresh-agent identity, terminal: fallback) and busySessionKeys: string[] (the effective busy identity only — alias identities stay green, matching the producing device).
  • Transport: zero server changes. Pane payloads are opaque records; both the Node and Rust servers validate → store → return the new fields verbatim (validated pre-implementation; pinned by tests below).
  • Freshness: new 30s periodic tabs.sync.query (previously only on WS ready/reconnect) with trigger precedence — event triggers (ready/reconnect/retention) always supersede immediately; the interval skips while a query is outstanding with bounded 90s stale replacement.
  • Consumer: selectRemoteSessionActivity / selectSameDeviceSessionKeys selectors + Sidebar gate (collectSessionRefsFromTabs ∪ collectPaneIdentityActivity ∪ collectBusySessionKeys, plus same-device keys). Comparator discipline maintained (areSidebarItemPropsEqual).

Tests

  • Unit/integration: focused suites per task (pane-activity, tab-registry-snapshot, tabRegistrySync, tabsRegistrySelectors, Sidebar) — all green; full npm run check green at the reviewed HEAD (client/server/electron + typecheck).
  • E2E (new spec sidebar-remote-status-rings-rust.spec.ts, real Rust server): baseline→busy→open→absent across reloads; no-reload liveness through the 30s periodic query; suppression for locally-open and crafted same-device records; revision-bumped, ack-awaited raw-WS pushes from a second device.
  • Node wire pin: ws-tabs-registry.test.ts asserts byte-identical sessionKeys/busySessionKeys round-trip.

Notes

  • Produced via the-usual workflow (plan → load-bearing validation → 3 plan-review rounds → TDD execution with per-task + whole-branch review → 2-round independent delta review, final PASSED).
  • The plan-review loop ended at its 3-round cap without a final PASSED verdict; all round-3 findings were fixed in the final plan revision (d484f4275) and the delta passed independent review at 8043ce20e.

@danshapiro
danshapiro merged commit 9796585 into main Aug 11, 2026
3 checks passed
@danshapiro
danshapiro deleted the the-usual/remote-status-rings branch August 11, 2026 04:51
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.

1 participant