Skip to content

fix(tui): show external worktree session labels - #41147

Merged
jlongster merged 2 commits into
v2from
worktree-labels
Aug 8, 2026
Merged

jlongster merged 2 commits into
v2from
worktree-labels

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

What

Restore session-directory labels for sessions outside the canonical project directory, such as sessions from sibling Git worktrees.

The earlier label cleanup removed every footer in current-directory mode. That avoided repeating labels for sessions inside the main project, but it also hid the only distinction between sessions returned from sibling worktrees that share the same project ID and subpath.

This keeps labels hidden for the canonical project root and directories beneath it, while showing the directory basename for external worktrees—even when the TUI is currently running in that worktree. All-projects mode is unchanged.

Testing

  • bun typecheck in packages/tui
  • Main worktree active: main session unlabeled and external sibling labeled
  • External worktree active: the active worktree session remains labeled, while the canonical main session is unlabeled
  • Nested canonical-project directory active: canonical directories remain unlabeled and the matching external-worktree directory is labeled
  • All-projects mode: every session continues to show its project label

All scenarios were exercised in the real TUI against one isolated server and seeded Git repository.

Requested by: @jlongster (James Long via Slack)

@jlongster
jlongster merged commit 79a493e into v2 Aug 8, 2026
8 of 10 checks passed
@jlongster
jlongster deleted the worktree-labels branch August 8, 2026 00:52
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
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