Skip to content

Add progressive sidebar disclosure with muted Show more control - #3092

Merged
SawyerHood merged 7 commits into
mainfrom
bb/improve-pr-ui-design-thr_542y36y3j2
Sep 4, 2026
Merged

SawyerHood merged 7 commits into
mainfrom
bb/improve-pr-ui-design-thr_542y36y3j2

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The By project and By machine sidebars rendered every root thread group, making long lists difficult to scan. This builds on #3090: its disclosure control looked like another thread row, and its count-based expansion could hide previously revealed threads when attention cleared. Keyboard expansion also left focus after the newly revealed rows or removed the focused button entirely.

What changed

Added the default-off sidebarProgressiveDisclosure experiment from #3090. It shows five root groups plus busy, waiting-for-input, unread-finished, and selected groups, then reveals ten additional groups per click. Manually mode retains its existing behavior.

“Show more” is muted text aligned with thread titles, brightens on hover, and disappears when the list is exhausted. Revealed group identities remain visible through activity and sort-order changes. Keyboard activation mounts and focuses the first newly revealed row, including offscreen and collapsed groups. There is no Show less control.

The experiment is available through Settings, the existing settings API/SDK, and bb settings experiment sidebarProgressiveDisclosure true. Updated the configuration docs, CLI guide, and skill reference. No host-daemon wire changes.

How you verified

  • pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar/ProjectThreadTree.disclosure.test.tsx src/components/sidebar/SidebarWindowedItems.test.tsx — 19 tests passed.
  • pnpm exec turbo run typecheck --filter=@bb/app — passed.
  • pnpm exec turbo run lint --filter=@bb/app — passed with existing warnings during implementation.
  • Regression tests for visibility and focus failed against the original PR implementation and passed with the fixes.
  • Verified the dev sidebar in Chrome with 17 fixture threads: 5 → 15 → 17 expansion, keyboard focus on each new batch, matching title alignment, muted styling, and no Show less control.

Fixes #1509

AGENT GENERATED

MayankBansal12 and others added 7 commits September 4, 2026 21:18
Collapse thread lists to their first five root items with a Show
more/Show less toggle, keeping busy, unread-done, and selected
threads visible when collapsed.
Show more reveals the next ten hidden items instead of everything,
and a Collapse control snaps the list back to the attention set.
Add a focused ProjectThreadTree suite for the attention set, chunked
Show more, and Collapse behavior, and update the existing interaction
test to the Collapse control.
The attention filter retained busy, unread-finished, and selected items, but not
hasPendingInteraction, so a thread blocked on a prompt was kept only when its
runtime displayStatus happened to be running. It is not: hasPendingInteraction is
a SQL EXISTS over pending interaction rows and never consults thread status, and
resolveThreadRuntimeStateFromLatestSession reports waiting-for-host once the host
drops. Either path hid the highest-priority row in the sidebar, which
resolveThreadListIndicator ranks second only to unread-error.

Retain it explicitly, and cover the idle-runtime case that incidental coverage
misses. Docs that enumerate the retained set now name it.

Also folds in the rest of the work that sat on this branch:

- Gate the whole behavior behind a default-off sidebarProgressiveDisclosure
  experiment, wired through the domain key, server settings, the Settings
  toggle, docs/configuration.md, the bb-cli skill reference, and the guide
  template.
- Drop the thread list collapse control and match the Show more button to
  sidebar row styling.
- Export isBusyThread from client-core and use it for the one definition of
  "busy": getCollapsedChildActivity computed the same six-way OR as its working
  field, so it now calls the helper and the single-use child locals are inlined.
- Fold the attention check into one traversal. It walked each item three times:
  two scans over the flattened descendants plus projectThreadItemContainsThread,
  which visits the same thread set. The selectedThreadId undefined guard was
  dead, since thread.id is always a string.
- Derive the Show more visibility from item counts instead of a hand-maintained
  hasHiddenItems flag; the rendered list is always a subsequence of the input.
- Stub system config in ProjectList.modes.test.tsx, which renders
  MachineModeSections without a QueryClient and threw once ProjectThreadTree
  started reading the experiment.
@SawyerHood
SawyerHood merged commit c49ba3f into main Sep 4, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the bb/improve-pr-ui-design-thr_542y36y3j2 branch September 4, 2026 21:59
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.

[UI] Sidebar thread lists: attention-first progressive disclosure instead of showing every thread item

2 participants