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

@@ -16,11 +16,11 @@ const litIndexesFor = (frame: string) =>
describe('brailleDots', () => {
it('lights dots 1, 2 and 4 for the first frame', () => {
expect(brailleDots('⠋')).toEqual([true, true, false, true, false, false, false, false])
expect(brailleDots('⠋')).toEqual([true, true, false, true, false, false])
})
it('lights dots 1 through 4 for the last frame', () => {
expect(brailleDots('⠏')).toEqual([true, true, true, true, false, false, false, false])
expect(brailleDots('⠏')).toEqual([true, true, true, true, false, false])
})
})
@@ -30,10 +30,10 @@ describe('ActivitySpinner', () => {
vi.useRealTimers()
})
it('renders eight dots with the first frame lit and hidden from assistive technology', () => {
it('renders six dots with the first frame lit and hidden from assistive technology', () => {
const { container } = render(<ActivitySpinner />)
expect(circles(container)).toHaveLength(8)
expect(circles(container)).toHaveLength(6)
expect(litIndexes(container)).toEqual(litIndexesFor(SPINNER_FRAMES[0]))
expect(container.querySelector('svg')).toHaveAttribute('aria-hidden', 'true')
})
@@ -79,7 +79,7 @@ describe('ActivitySpinner', () => {
r: Number(circle.getAttribute('r')),
}))
expect(dots).toHaveLength(8)
expect(dots).toHaveLength(6)
for (const dot of dots) {
expect(dot.cx - dot.r).toBeGreaterThan(0)
@@ -13,19 +13,17 @@ const DOT_GRID: ReadonlyArray<readonly [number, number]> = [
[1, 0],
[1, 1],
[1, 2],
[0, 3],
[1, 3],
]
const COLUMN_X = [2.25, 6.75] as const
const ROW_Y = [2.25, 6, 9.75, 13.5] as const
const ROW_Y = [4.25, 8, 11.75] as const
const DOT_RADIUS = 1.6
const LIT_DOT_OPACITY = 1
const UNLIT_DOT_OPACITY = 0.25
/**
* Decodes one braille frame into its eight dot positions, ordered by braille dot numbering:
* Decodes one braille frame into its six dot positions, ordered by braille dot numbering:
* dot1, dot2 and dot3 are the left column top-to-bottom, dot4, dot5 and dot6 the right column
* top-to-bottom, and dot7 and dot8 the bottom-left and bottom-right cells.
* top-to-bottom.
*/
export function brailleDots(frame: string): boolean[] {
const bits = (frame.codePointAt(0) ?? BRAILLE_BASE) - BRAILLE_BASE