Skip to content

Render the workspace pane from its own session slice - #71836

Merged
OutThisLife merged 1 commit into
mainfrom
bb/stream-foreground-leak
Jul 26, 2026
Merged

Render the workspace pane from its own session slice#71836
OutThisLife merged 1 commit into
mainfrom
bb/stream-foreground-leak

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Clicking a finished session in the sidebar while another turn was still streaming showed the streaming session's output under the clicked session's route. The prompt routed correctly and nothing was corrupted on disk — the wrong transcript was simply painted.

Every ⌘T tile renders from its own $sessionStates[runtimeId] slice. The workspace pane was the one surface that didn't: it read the global $messages/$busy atoms, which mirror whichever session is active. That mirror is fine with one turn at a time, but tabs made concurrent turns routine — so navigating away from a running session left it writing into the surface now showing a different conversation.

The primary view now reads the active session's own slice, which makes the bleed structurally impossible rather than guarded. The global atoms stay the draft surface: a new chat has no runtime id, and therefore no slice, until its first turn creates one. "Main" becomes what it always should have been — the first tab, with no privileged state.

Verified by reverting the fix and re-running the new tests against main: 3 of 4 fail there, all 4 pass here.

The workspace pane read the global $messages/$busy atoms — a mirror of
whichever session was active — while every ⌘T tile rendered from its own
$sessionStates slice. With two turns in flight, navigating away from a
still-streaming session left it painting into the surface now showing a
different conversation: the wrong transcript under the right route.

Point the primary view at the active session's own slice, keeping the
global atoms as the draft surface for a chat that has no runtime id yet.
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on c489480

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence upload failed.

Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso)

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Jul 26, 2026
@OutThisLife
OutThisLife merged commit de9196e into main Jul 26, 2026
36 checks passed
@OutThisLife
OutThisLife deleted the bb/stream-foreground-leak branch July 26, 2026 08:55
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…eground-leak

Render the workspace pane from its own session slice
33hodl pushed a commit to 33hodl/hermes-agent that referenced this pull request Aug 12, 2026
…eground-leak

Render the workspace pane from its own session slice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants