Repository navigation
Unify thread-list header actions and nested view controls - #3402
Merged
Merged
Conversation
brsbl
force-pushed
the
bb/thread-list-direction-main-thr_ccffp4w2p2
branch
from
September 10, 2026 19:12
0d8422c to
cde7aec
Compare
brsbl
added a commit
that referenced
this pull request
Sep 10, 2026
## Human comments ## What was wrong - Custom-organized sidebar threads could be moved by drag and drop, but their row actions offered no destination picker. ## What changed - Adds **Move to section** with `MoveTo` to active root-thread actions in **Custom** view: desktop dropdown/right-click submenus and a compact long-press step with **Back**. - Follows saved sidebar order, including **Threads**, and omits **Pinned**. The current destination is disabled for unpinned threads. Existing mutations preserve move persistence; moving a pinned thread unpins it, and choosing its stored section only unpins it. - Integrates with the shared sidebar header controls from #3402. The focused diff remains 12 files; main's bundle limits are unchanged. ## How you verified - Remote [CI](https://github.com/get-bb/bb/actions/runs/34524003966) for `d334e6953963fd5891a1fdb7eb75f020cd604d0f`: **14 passed, 2 skipped**, including checks, app/server/package/integration tests, and macOS/Ubuntu package smoke. Optional Node compatibility and native iOS jobs were skipped. The app fits unchanged bundle limits: **1681.7 KB raw / 410.9 KB brotli** against **1683.2 KB / 419.0 KB**. - Menu and mutation tests cover desktop/context parity, eligibility, compact Back/reset, destination no-op, section moves, and both pinned transitions. Existing optimistic-update and serialized-unpin coverage remains. - Final-head Chrome for Testing **153.0.8010.36**: shared header **By project → Custom** eligibility; desktop dropdown and right-click moves to a section and **Threads**; hard-reload persistence and disabled current destination; compact touch long-press, **Back**, close/reopen reset, and saved moves. No captured runtime errors or compact app-root `inert`/`aria-hidden` changes. All six synthetic threads and sidebar settings were restored. The unchanged pinned transitions were exercised before this rebase and retain passing remote mutation coverage. - Native iOS is unverified: the local Xcode/CoreSimulator setup is incompatible and cannot resolve `simctl`; remote iOS coverage was skipped. Phone-width Chrome does not establish native iOS or Safari behavior. | Surface | Before — merge base `de9361268088` | After — head `d334e6953963` | | --- | --- | --- | | Desktop web · 1440 × 900 |  |  | | Phone web · 390 × 844 |  |  | - Both revisions use `scripts/bb-dev-app current` under **Node 22.19.0**, sequentially in the same managed worktree. Captures match the synthetic **Release notes** thread in **Follow-ups**, `/threads/thr_move_release`, **Custom** organization, light theme, scale 1, and viewport per row. Images were inspected directly. BB-Thread-ID: thr_ccffp4w2p2 > AGENT GENERATED
ymichael
added a commit
that referenced
this pull request
Sep 17, 2026
## Human comments
## What was wrong
Two defects in the sidebar's sticky stack
(`apps/app/src/components/ui/theme.css`), the second exposed by fixing
the first.
1. Every tier offset derives from one chain:
`--bb-sidebar-sticky-label-top` → `--bb-sidebar-sticky-project-top`
(label top + label height + label gap) →
`--bb-sidebar-sticky-parent-base-top` → per-level `parent-stride`. That
chain assumes each section pins its own label. `BuiltInSidebarSection`
passes `stickyHeader={false}` for Pinned (added in #3402, "Pinned now
scrolls with its contents"), so its label renders `relative top-auto`
and scrolls away — but the offsets below it still reserved the label's
slot. An expanded pinned parent thread therefore froze 36px below the
top of the scroll area with a dead band above it that the other pinned
rows scrolled through. It only surfaces when a pinned root has children
and is expanded, which is the only case where a pinned row becomes a
sticky tier.
2. The stack's top padding is inside the scrollport, so rows stay
visible while they scroll through it. A sticky label hides that strip
behind its own opaque `::before` shield; a pinned parent row has no top
shield, because until (1) was fixed something sticky was always above
it. With the row now flush at the padding, the child scrolling
underneath showed through the strip above it — measured at `scrollTop:
160`, the stuck row spans 8–36px while its first child spans −4–24px,
leaving that child's 0–8px slice visible.
## What changed
- `apps/app/src/components/sidebar/TopLevelSidebarSection.tsx`: the
section's `SidebarStickyGroup` root now exposes
`data-sidebar-sticky-header="false"` when `stickyHeader` is false
(attribute absent in the sticky default, so no markup churn for the
common case).
- `apps/app/src/components/ui/theme.css`: one rule collapses
`--bb-sidebar-sticky-project-top` to
`--bb-sidebar-sticky-stack-padding-top` for those groups. Since
`project-top` is the origin the parent base and every parent level
derive from, this corrects the project tier and all parent depths at
once, and composes with the existing `[data-sidebar-sticky-section]`
rule that drops the parent base onto `project-top` for label → parent
trees like Pinned.
- `apps/app/src/components/ui/theme.css`:
`[data-sidebar-sticky-stack]::before` adds one sticky cap the height of
the stack's top padding, pulled over the strip with a negative top
margin. Layout is unchanged (row rects measure identically before and
after) and it is invisible at rest. It keys off the stack rather than
any one tier, so it covers labels, project rows, and parent rows alike.
CSS and data-attribute only: no JS measurement, no wire or CLI surface
changes, so no `HOST_DAEMON_PROTOCOL_VERSION` bump.
## How you verified
Reproduced first in Ladle (`sidebar--overview--overview`) and then
confirmed both fixes against a `pnpm start:worktree` production build
driven with dev-browser, measuring each row's offset from the top of the
scroll container.
Sticky offset of an expanded pinned parent (430px, `pointer: coarse`):
| scrollTop | before | after |
| --- | --- | --- |
| 40 | 36px, dead band above | 8px, flush |
| 140 | 36px, dead band above | unstuck, in flow |
| 280 (4-level chain) | n/a | 8 / 50 / 92 / 134px |
The `Threads` section is unaffected: its label still pins at 8px with
parents at 36px directly beneath it. The scrollport strip was verified
at 1280px in both themes — the child slice visible above the pinned row
before the cap is gone after it. The partially clipped row *below* a
pinned row remains: that is a row sliding under an opaque sticky row,
i.e. ordinary sticky-list behavior.
Tests added that fail before and pass after:
- `BuiltInSidebarSection.test.tsx` asserts the sticky group reports
`data-sidebar-sticky-header="false"` for Pinned and omits the attribute
for Threads.
- `theme.test.ts` asserts the collapsed label slot for non-sticky
headers, that the section-variant rule still chains off `project-top`,
and that the cap is sticky, opaque, and offset by its own negative
margin.
Commands:
- `pnpm exec turbo run typecheck lint test --filter=@bb/app` → 544 test
files, 4804 tests passing; no lint errors.
- One run hit a failure in
`src/views/thread-detail/SplitThreadArea.archive.test.tsx` (a routing
assertion unrelated to these changes); it passed in isolation and on a
forced full re-run, so it appears flaky.
> AGENT GENERATED
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
What changed
sidebar.sortDirectionpreference uses the existing persistence, SDK, and CLI paths;defaultpreserves prior ordering.How you verified
cde7aeceeeb00958b82badfecd03437b04059f2d: build/typecheck/lint, all app/server/package/integration tests, and Linux/macOS package smoke. All 14 reported checks passed; native iOS and Node compatibility were workflow-skipped. No local CI-equivalent checks were run.main@e02f6e64cc7afdf490e70a662c6445b5b8dee407, retaining the prior merge resolutions. Tree comparison confirms the result is exactly the previous implementation plus upstream changes; the PR remains 27 files. Main's touch-visibility regression exercises the actual shared project controls through closed, open, and reclosed states.aria-hiddenwarning also occurred during close/reopen; the app root remained non-inert and exposed. The warning is not claimed fixed by this rebase.git diff --checkpassed./, project view, Updated at sorting, light theme, and open Atlas project menu. Before: exact merge basee02f6e64cc7afdf490e70a662c6445b5b8dee407. After: exact headcde7aeceeeb00958b82badfecd03437b04059f2d. Desktop images are matching 460×844 crops of a 1440×900 viewport; phone images are full 390×844 captures.BB-Thread-ID: thr_ccffp4w2p2