Skip to content

Lead parent thread rows with their disclosure and count their sub-threads - #5910

Closed
alexandre-vl wants to merge 5 commits into
get-bb:mainfrom
alexandre-vl:thread-list-sub-thread-rows
Closed

alexandre-vl wants to merge 5 commits into
get-bb:mainfrom
alexandre-vl:thread-list-sub-thread-rows

Conversation

@alexandre-vl

@alexandre-vl alexandre-vl commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

#6088 fixed #5909 by keeping a parent's chevron after its title and reserving the quick-action space on parent rows, so Archive and "…" line up on every row. What it left: the chevron's column still moves with each title, sits away from the sub-thread guide it opens, and only shows on hover once the parent is expanded; a collapsed parent's trailing glyph merges its sub-threads' running work into its own status, so the parent looks busy whenever any descendant works; and nothing says how many sub-threads a collapsed parent holds. An earlier version of this PR moved the chevron left by hanging it 16 px outside the title. Without provider icons that put it half outside its row, so the hover, selected and focus highlights cut it in two and it showed beside sticky project headers.

What changed

main (#6088)This PR
Provider icons off
Provider icons on (default)

Ladle story sidebar/Thread list/Sub threads at 288 px. Every row is shown hovered: one capture per row, stacked.

  • plugins/thread-list/app/rows/SubThreadToggle.tsx (new):
    • SubThreadToggle puts a parent's disclosure at the left of its title.
      • Provider icons on: it takes the icon's slot. The icon shows at rest, the chevron on row hover, keyboard focus and touch screens (CSS only).
      • Provider icons off: it sits in a 16 px slot, 2 px inside the row's left edge and 2 px before the title. That is the chevron and its focus ring, and nothing more.
      • It keeps main's accessible name ("Expand X threads"); aria-describedby adds "3 threads, 2 working, Claude Code". The coarse-pointer hit area is 36 px tall.
    • SubThreadDisclosureSlot gives every other thread row the same empty slot while provider icons are off, so parent and leaf titles line up. The slot is reserved in every list, not only in lists that show a parent. Parents come and go on their own (an agent spawns a sub-thread, the last sub-thread is archived, read-status grouping moves a parent), and a slot that followed them would shift every title of that list under the pointer at those moments. It costs 12 px of title width.
    • SubThreadCount sits after the title: the number of sub-threads, nested ones included and capped at "99+", or busy/total with the busy kind's glyph while some of them work.
  • ThreadRow.tsx:
  • ProjectRow.tsx: without provider icons, sub-thread guide lines run through the chevron's center: the group line, the environment header's continuation, and the segment a sticky parent draws through itself (placed with the new ThreadRowOptions.isSubThread). With provider icons they stay at the icon's center.
  • thread-activity.ts: getCollapsedChildActivity also returns workingCount.
  • Ladle:
    • New story sidebar/Thread list/Sub threads, with and without provider icons, on mocked providers.
    • The Action alignment story now hides provider icons. Its check no longer depends on whether a dev server answers /api/v1/system/providers through the Ladle proxy.
    • apps/app/.ladle/tests/sidebar-actions.mjs also checks that the disclosure sits inside its row and before the title, that parent and leaf titles line up, and that the sub-thread guide meets the chevron.
  • No wire, SDK, CLI or setting change.

How you verified

  • pnpm exec turbo run typecheck lint test --filter=bb-plugin-thread-list: passes; 455 tests; lint has 0 errors (the 6 warnings are on main too).
  • pnpm exec turbo run typecheck --filter=@bb/app: passes.
  • New tests fail on this PR's previous layout (687ea6b, chevron hanging outside the row) and pass here:
    • ThreadRow.test.tsx: "leads a parent's title with its disclosure, in the slot every leaf keeps, without provider icons", collapsed and expanded;
    • ProjectRow.interactions.test.tsx: "runs each sub-thread guide through its parent's disclosure without provider icons".
  • dev-browser run apps/app/.ladle/tests/sidebar-actions.mjs on the Action alignment story passes at 220, 288 and 360 px. On 687ea6b it fails with "the arrow sticks out of its row".
  • Isolated dev app, provider icons off: at rest, hovered, focused, selected, expanded, scrolled under the sticky project header, at 220 and 360 px, in dark mode, and with touch emulation at 390 px.
    • Measured: the chevron's box starts 2 px inside the row and the title 2 px after it; the guide is at the chevron's center to within 0.5 px.
    • Touch hit area: 28 × 36 px, starting at the row's edge.
  • Provider icons on: at rest, hovered, focused and expanded, the captures match the previous icon-slot version pixel for pixel, apart from spinner frames.
  • Not checked: Safari/WebKit, a screen reader.

AGENT GENERATED

@alexandre-vl
alexandre-vl force-pushed the thread-list-sub-thread-rows branch from c5bb8fd to f91f1df Compare October 22, 2026 11:22
Without provider icons, a parent's toggle hung 16 px left of its title,
half outside its row: the hover, selected and focus highlights cut it in
two, and the chevrons of rows scrolled under a sticky project header
showed beside it.

The disclosure now sits in a 16 px slot at the start of the row, 2 px
inside the row's left edge and 2 px before the title. Every thread row
keeps that slot while icons are hidden, so leaf and parent titles line
up and nothing shifts when a parent appears or goes away. Sub-thread
guide lines, including the segment a sticky parent draws for its own
parent, run through the chevron's center. Parents keep the quick-action
space reserved, so the count stays still on hover and Archive keeps its
column as on main (get-bb#6088). Rows with provider icons keep the icon-slot
toggle.

The Action alignment story now hides provider icons, so its check no
longer depends on whether a dev server answers the providers request.
The check also asserts that the disclosure leads the title inside its
row, that titles line up, and that sub-thread guides meet the chevron.
alexandre-vl added a commit to alexandre-vl/bb that referenced this pull request Oct 22, 2026
@alexandre-vl
alexandre-vl force-pushed the thread-list-sub-thread-rows branch from f91f1df to 69ccffa Compare October 22, 2026 12:11
@alexandre-vl alexandre-vl changed the title Keep Archive in one place on thread rows with sub-threads Lead parent thread rows with their disclosure and count their sub-threads Oct 22, 2026
alexandre-vl added a commit to alexandre-vl/bb that referenced this pull request Oct 22, 2026
Main moved the gap after the provider mark from 6 px to 8 px (get-bb#6399), so sibling titles start 24 px into the icon slot. The disclosure that replaces a parent's provider mark still ended at 22 px; its trailing gap now matches.
@github-actions github-actions Bot closed this Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

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.

Sidebar: Archive moves and sits 2 px from the expand chevron on rows with sub-threads

1 participant