Skip to content

fix(tui): show shells from session location - #39691

Merged
kitlangton merged 3 commits into
v2from
shell-tab-location
Jul 30, 2026
Merged

fix(tui): show shells from session location#39691
kitlangton merged 3 commits into
v2from
shell-tab-location

Conversation

@kitlangton

@kitlangton kitlangton commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

Fixes the session composer Shell tab showing “No shell commands” when a background shell is running from a session whose location differs from the TUI bootstrap directory.

Before / After

Before

The background shell starts successfully and appears in the transcript, but the Shell tab begins with the bootstrap location’s shell collection and renders empty:

Shell tab before: background command missing

After

The Shell tab asks the TUI data context for active shells belonging to the current session across hydrated locations:

Shell tab after: background command visible

How

  • data.shell.listBySession(sessionID) scans the TUI’s live location shell collections and filters by the existing metadata.sessionID association.
  • ShellTab consumes that session-first read model, then limits the view to running shells.
  • Shell execution, output, termination, and lifecycle remain location-owned; the tab’s existing kill action still uses each active UI location.

Scope

This fixes live TUI behavior across every hydrated location. A reconnect where the session still owns a shell in an old location that has not been rehydrated would require a server-side session-scoped active-shell query; that API question is being discussed separately.

Testing

  • bun typecheck in packages/tui: clean.
  • Full repository typecheck via pre-push hook: 33 tasks passed.
  • OpenCode Drive ran the same nested-session/background-shell script against unmodified v2 and this branch. The baseline reproduced “No shell commands”; the fix displayed sleep 30 and restored the kill action.

@kitlangton
kitlangton enabled auto-merge (squash) July 30, 2026 16:02
@kitlangton
kitlangton disabled auto-merge July 30, 2026 16:29
@kitlangton
kitlangton enabled auto-merge (squash) July 30, 2026 16:30
@kitlangton
kitlangton merged commit cba5ba0 into v2 Jul 30, 2026
11 of 13 checks passed
@kitlangton
kitlangton deleted the shell-tab-location branch July 30, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant