Repository navigation
Collapse the sticky label slot for non-sticky section headers - #3862
Merged
ymichael merged 2 commits intoSep 17, 2026
Merged
Conversation
The sidebar sticky stack derives every tier offset from
--bb-sidebar-sticky-project-top, which reserves the section label's
height and gap. Pinned renders its label in normal flow
(stickyHeader={false}), so the reserved slot stayed empty and its
project and parent rows pinned a label-height too low.
Mark the section group with data-sidebar-sticky-header="false" and
collapse --bb-sidebar-sticky-project-top to the stack's top padding for
those groups, correcting the project tier and every parent level from one
override.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The sticky stack's top padding sits inside the scrollport, so rows stay visible while they scroll through it. A sticky section label hides that strip behind its own opaque top shield, and every other tier used to pin below a sticky label, so nothing else needed one. Collapsing the label slot for non-sticky headers moved Pinned's parent rows flush against the strip, and the child scrolling underneath showed through it above the pinned row. Give the stack one sticky cap of its own top padding, pulled over the strip with a negative top margin so layout is unchanged and it is invisible at rest. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ymichael
deleted the
bb/fix-sidebar-discord-row-scrolling-thr_yatghhu7cu
branch
September 17, 2026 18:41
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
Two defects in the sidebar's sticky stack (
apps/app/src/components/ui/theme.css), the second exposed by fixing the first.--bb-sidebar-sticky-label-top→--bb-sidebar-sticky-project-top(label top + label height + label gap) →--bb-sidebar-sticky-parent-base-top→ per-levelparent-stride. That chain assumes each section pins its own label.BuiltInSidebarSectionpassesstickyHeader={false}for Pinned (added in Unify thread-list header actions and nested view controls #3402, "Pinned now scrolls with its contents"), so its label rendersrelative top-autoand 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.::beforeshield; 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 atscrollTop: 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'sSidebarStickyGrouproot now exposesdata-sidebar-sticky-header="false"whenstickyHeaderis 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-topto--bb-sidebar-sticky-stack-padding-topfor those groups. Sinceproject-topis 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 ontoproject-topfor label → parent trees like Pinned.apps/app/src/components/ui/theme.css:[data-sidebar-sticky-stack]::beforeadds 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_VERSIONbump.How you verified
Reproduced first in Ladle (
sidebar--overview--overview) and then confirmed both fixes against apnpm start:worktreeproduction 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):The
Threadssection 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.tsxasserts the sticky group reportsdata-sidebar-sticky-header="false"for Pinned and omits the attribute for Threads.theme.test.tsasserts the collapsed label slot for non-sticky headers, that the section-variant rule still chains offproject-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.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.