Repository navigation
fix(ui): refresh mixed-role node status - #126677
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready proof for #126675 at reviewed head The Devices page previously collapsed role-specific presence rows under a single device ID, so a connected operator overwrote a disconnected node and suppressed the existing inventory refresh. The canonical owner-boundary fix gives the already-present node role its own signature key. Gateway connectivity semantics, protocol, polling, configuration, renderer, and persistence are unchanged. Real source Control UI + an isolated dev Gateway + a synthetic paired mixed-role device:
Verification:
Native SHA-stamped review artifacts validate as |
|
Merged via squash.
|
Closes #126675
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where operators viewing Settings → Devices would see a mixed-role Windows node remain online and miss its manual-wake warning when the node session disconnects while an operator session on the same device remains connected.
Why This Change Was Made
The Gateway intentionally maintains separate node and operator presence rows, while device pairing reports whether any role is connected and node inventory reports whether its node runtime is connected. The Devices page collapsed both presence rows into one device-only connectivity signature, so an unchanged connected operator masked the node disconnect. Distinguishing node-role presence inside the existing UI-owned signature restores the existing coalesced inventory refresh without changing Gateway behavior, protocol, configuration, persistence, security, product policy, polling, or the renderer.
User Impact
Node disconnects and reconnects immediately update the Devices inventory. A disconnected Windows node now shows offline and manual wake required even when another connection keeps its paired device connected; ordinary presence timestamps and activity updates still do not cause unnecessary requests.
Evidence
Real source-mode Control UI + real isolated loopback development Gateway + clean-profile Chromium, with only synthetic device identities:
node.list.connected=falseanddevice.pair.list.connected=true, but browsernode.listrequests stayed at 1 → 1 and the offline/manual-wake badges were absent.node.listrequests to 1 → 2 and displayed both offline and manual wake required while aggregate device connectivity remained connected.Before
After
Focused tests, including the existing mixed-role offline/manual-wake renderer and inventory contracts:
Result: 75 passing tests, covering node/operator disconnect and reconnect, missing/empty/merged role arrays, activity-only suppression, existing refresh coalescing, and mixed-role Windows rendering.
The changed gate covers formatting, UI/core-test typechecks, targeted lint, i18n, and repository ownership guards. The UI build also verifies compressed sidecars and performance budgets. Fresh Codex-backed P1 autoreview and a separate independent adversarial review reported no actionable findings.
Production LOC: +2/-1 (net +1). Tests: +161/-0. Risk: low; UI-owned presence invalidation only. Follow-up outside this focused repair: inspect the separate New Session placement presence signature for the same mixed-role collision.
AI-assisted: yes