fix(activity): surface worktree sessions in active work, the sidebar and repo badges

- Resolve sessions in repo worktrees to the owning repo in the activity list; show the worktree branch and open the Workspaces tab
- Look up worktrees only for unmatched sessions in the window or under an active root, and hold the loading state until it settles
- Show schedule-worktree sessions only while running or needing input
- Light repo badges for worktree sessions through one app-wide worktree lookup
- List worktree sessions under the expanded repo in the sidebar
- Subscribe the event stream to active session directories so worktree permissions and forms arrive
- Keep the worktree tab when navigating from the desktop Activity panel
- Remove the braille spinner's always-dim bottom row
This commit is contained in:
Chris Scott committed 2026-10-16 20:36:56 +00:00
1 parent 1d31286904
commit bfbbbf08ef
23 files changed
+932 -81

No files matched your search

@@ -144,6 +144,23 @@ describe('ActivityList', () => {
expect(onNavigate).toHaveBeenCalledWith(item)
})
it('labels a worktree session with its worktree branch', () => {
setGroups({
recent: [
createItem({
state: 'recent',
session: createSession('c1', 'Worktree'),
repo: createRepo(3, 'Gamma'),
worktreeBranch: 'feature/wt',
}),
],
})
renderList()
expect(screen.getByRole('button', { name: /Worktree/ })).toHaveTextContent('Gamma · feature/wt')
})
it('marks the currently open session with aria-current', () => {
setGroups({
recent: [
@@ -63,7 +63,7 @@ interface ActivityRowProps {
}
function ActivityRow({ item, isCurrent, onSelect }: ActivityRowProps) {
const branch = getRepoBranchLabel(item.repo)
const branch = item.worktreeBranch ?? getRepoBranchLabel(item.repo)
const repoLine = branch
? `${getRepoDisplayName(item.repo)} · ${branch}`
: getRepoDisplayName(item.repo)