Skip to content

Mission Control: stop showing the previous project's terminals - #271

Merged
pallaoro merged 6 commits into
mainfrom
shoudl-we-introduce-another-mission-control
Sep 28, 2026
Merged

pallaoro merged 6 commits into
mainfrom
shoudl-we-introduce-another-mission-control

Conversation

@pallaoro

Copy link
Copy Markdown
Member

Selecting another project while on Mission Control could leave the previous project's terminals on screen.

Cause: since #128 the grid fetches sessions on mount and on taskUpdated / ptyExit events only (it used to poll every 2.5s). Switching projects kept the same MissionControl instance, so its tiles stayed until some agent happened to emit an event: with idle agents, indefinitely.

Fix: key MissionControl by the project card, so a switch remounts it with its own tiles, page, pinned tabs and lock snapshot. The "No live agents yet" text now waits for the first fetch, so a remount doesn't flash it.

Verified in the dev app over CDP against live box sessions, switching Clawnify → TaskWindow → Greybeard → Clawnify on Mission Control and reading each tile's owning project:

  • without the key: TaskWindow and Greybeard both kept showing Clawnify's 4 tiles through 4s
  • with the key: every tile belongs to the selected project within 150ms

A sixth-tile page for watching more agents at once. While the 3x2 layout
is on screen the sidebar collapses to the rail without touching the saved
preference; leaving the layout or view restores it, and expanding by hand
holds until you leave. The pager now spells out its Cmd+Alt+Up/Down
shortcut.
One project may run twice the terminals of another, so each project keeps
its own layout under ateam.mcLayout.<projectId>. It is read during render
so switching projects never paints the previous project's layout (which
would also flick the 3x2 rail). Projects never set fall back to the old
app-wide choice, and a saved value naming a layout that no longer exists
is ignored.
…nother-mission-control

# Conflicts:
#	apps/desktop/src/renderer/src/App.tsx
Since #128 the grid fetches sessions on mount and on taskUpdated/ptyExit
events only. Switching projects kept the same instance, so the last
project's tiles stayed until some agent happened to emit an event: with
idle agents, indefinitely. Key the grid by project so a switch remounts it
with its own tiles, page, pinned tabs and lock snapshot, and hold the
empty-state text until the first fetch lands so it doesn't flash.
@pallaoro
pallaoro merged commit f4f3590 into main Sep 28, 2026
1 check passed
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