Repository navigation
Design system polish: prompt, sidebar, settings, and activity UI - #325
Merged
Merged
Conversation
brsbl
added a commit
that referenced
this pull request
Jun 23, 2026
Reverts the radius/shadow hierarchy, prompt-box, context-window, picker, and composer-cache changes from this branch so they ship in the independent design PR. This branch keeps the nested-folders feature plus the search deep-link and the sidebar interaction polish that are intertwined with the folder UI. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
added a commit
that referenced
this pull request
Jun 24, 2026
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
added a commit
that referenced
this pull request
Jun 24, 2026
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
force-pushed
the
bb/design-system-polish
branch
from
June 24, 2026 12:53
128f95b to
ee57d11
Compare
brsbl
added a commit
that referenced
this pull request
Jun 24, 2026
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
force-pushed
the
bb/design-system-polish
branch
from
June 24, 2026 12:58
ee57d11 to
b178a2b
Compare
brsbl
added a commit
that referenced
this pull request
Jun 24, 2026
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
force-pushed
the
bb/design-system-polish
branch
from
June 24, 2026 20:52
3133643 to
9bed1ac
Compare
brsbl
force-pushed
the
bb/design-system-polish
branch
from
June 24, 2026 22:45
b046481 to
ad9a5f7
Compare
brsbl
added a commit
that referenced
this pull request
Jun 24, 2026
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Cross-cutting visual polish, independent of the nested-folders feature. Radius hierarchy (token scale sm=4 md=6 lg=8 xl=12): - Prompt box -> rounded-xl (uniform); banner chrome -> rounded-lg. - Normalize outliers: arbitrary rounded-[3px] -> rounded-sm, icon tiles xl -> lg. Shadow hierarchy (bias minimal): - Cards/banners -> shadow-sm; menus (dropdown/context) standardized to shadow-md; dialogs shadow-xl -> shadow-lg. No shadow-xl anywhere. Component polish: - Prompt box banner cards: full-width clickable headers, caret flush right. - Context-window indicator: menu-surface popover with a tone-colored usage bar, right-aligned token line; story added (with a story-only defaultOpen hatch). - Model/permission pickers: restore hover/open backgrounds. - Lighter user-message bubble border. - Composer-bootstrap cache retained 5min (was 30s) so the queued drawer renders from cache on rapid thread switches instead of reloading. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
These are the non-folder changes split out of the nested-folders PR (#258), placed here so #258 is folder-only and nothing is dropped. Adapted to main's reworked sidebar (chevron/worktree-menu ProjectRow, ProjectActionsMenu). Search deep-link / scroll-to-message: - Expose ThreadSearchMatch.sourceSeq (db) + threadSearchMatchSchema.sourceSeq (contract); server already passes matches through. - useScrollToSearchedMessage + ThreadTimelineRows scroll hook, AppSidebar nav state (searchMessageSeq), SidebarThreadSearchPanel/sidebarThreadSearch messageSeq, app.css bb-search-flash, thread-search tests. - ThreadSearchResultRow redesign (+ story). Sidebar/menu interaction polish: - Row cursor/state-class affordances (sidebarRowClasses cursor-pointer + selected /70, ThreadRow grab cursor + dropped title tooltips, ProjectList + ProjectRow row classes), adapted to main's chevron (SidebarChildToggleChevron drops title props; callers updated). - Menu icons + label tweaks (ThreadActionsMenu Mail/Pin icons, "Mark read", separators) + rename payload refactor (ThreadActionsProvider/ThreadRenameDialog), PinnedThreadTree/ProjectListProjects/SidebarHistoryNavigationControls/ sortableMotion/ui sidebar tooltip + story-harness TooltipProvider. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Remove shadow from banner stack cards (PromptStackCard) - Reduce modal shadow lg→md (base dialog, git-action, mermaid viewer) - Compact git-action submit button (size sm) - Center split-button chevron (equal padding; fixes all split buttons) - Wrap context-window usage-menu stories in StoryCard/StoryRow (match approval template) - Add dropdown-menu, context-menu, and mermaid stories Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The columns grid used minmax(0, 1fr), so wide buttons (lg = px-8) overflowed their equal-fraction cell into the next column. Use minmax(max-content, 1fr) so each column fits its content. button.stories is the only columns consumer. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the generic placeholder menu with the menus we actually ship: the sidebar display menu (Group by / Sort by — single-select with checks; the old Sort options were invented), the folder row actions (View archive / Rename / Remove), and the Threads section actions. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the generic placeholder with the actual project-row context menu (Project settings / Archived threads / Rename / Add local path / Remove) on a project-row-like target — the same items as the project ··· dropdown. Context menus are used on project rows (ProjectActionsMenu) and thread rows (ThreadActionsMenu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
--surface-recessed is translucent (ink 6% over transparent) so the scroll-fade gradients (from-surface-recessed) painted a SECOND 6% layer over the already- recessed card, darkening it into a gray band — the weird bg that showed on overflowing / short queues and lingered after collapse/expand. Add an opaque twin --surface-recessed-solid (ink 6% over the page canvas) and fade from it, so the fade matches the card exactly instead of stacking. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The full-bleed collapsible header buttons (Goal / Todo / Workflow / Prompt-mode / Background commands) carried their own rounded (4px) inside a rounded-lg (8px) overflow-hidden card, so the hover fill's corners sat inside the card's corners — leaving the recessed card peeking through. Drop the button radius and let the card's overflow-hidden clip the hover fill to its corners. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The Queued header button sat inside a px-1.5/pt-2.5 wrapper and carried its own rounded-md, so its hover highlight was inset from the card edges. Make it full-bleed (px-3, no radius) and fold the top padding into the button, so the hover fill reaches the card's top + sides, clipped flush by the card's overflow-hidden rounded corners. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Fold the separate UsageMenu / UsageMenuCritical / UsageMenuEstimated stories into Overview: a rings card (hover any ring to open its menu) plus an open-menus card showing the usage menu rendered open at each tone. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Swap the worktree-style FolderGit icon for a plain Folder icon, matching the sidebar's project/folder iconography (avoids the worktree confusion). - Add an optional folderLabel prop: when the sidebar is organized by folder the caller passes the thread's folder path, shown in place of the project. Story adds an 'organized by folder' variant demonstrating title + folder. The live wiring (caller deriving folderLabel from Organize-by + thread.folderPath) lands when #258's folderPath merges in — that data is not on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
These hand-reconstructed app menus (sidebar display, folder/project actions) in a ui/* primitive story added no value over the real menu stories and risked drifting from — or misrepresenting — what the app actually renders. The only #325 change to these primitives is the shadow-lg->md chrome, which is reviewable in real menus (ThreadActionsMenu, OptionPicker, PermissionModePicker, the context-window usage menu). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Real cause (my earlier corner change missed it): the cards set minHeight:32 on the card but the header button was shorter (~28px), leaving a strip of the card's recessed bg uncovered below the button. Since the hover tint is translucent, that uncovered strip reads as a lighter sliver peeking out under the highlight. Give the header button min-h-8 so its hover fill covers the full collapsed row. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The collapsible body <section> kept border-t (transparent, 1px) even when collapsed (grid-rows-[0fr]), leaving a 1px strip of recessed bg below the header that the translucent hover couldn't cover. Drop the border in the collapsed state (the expanded divider stays) so the section is 0px when closed — with the earlier min-h-8 the header hover now fills the card fully flush. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
brsbl
force-pushed
the
bb/design-system-polish
branch
from
June 24, 2026 23:17
dbc99be to
1e48449
Compare
ymichael
added a commit
that referenced
this pull request
Sep 22, 2026
…ugin branch pickers (#4062) ## Human comments ## What was wrong When environment selection moved into plugins (#3227 for project checkout, #3932 for worktrees), both branch pickers stopped rendering through `BranchPicker` and silently dropped behavior that component still implements. Three regressions followed, all confirmed by driving the pickers in a dev app at 1440×900, 470×844 and 390×844: 1. **Compact drawer height.** `plugins/environment-git-worktree/app.tsx` pinned the option list with an unconditional `h-80`, so the compact drawer measured a flat 390 × 399 in every state — 399 px of sheet for two rows. Every other branch picker uses `min-h-0 max-h-[60vh] … md:max-h-80`, which sizes to content below `md`. 2. **Search debounce.** Both plugins pass `useDeferredValue(query)` straight into `experimental_useBranches`, which is not a debounce. Typing `feature` issued 7 `GET /api/v1/projects/:id/branch-options` requests — 7 host round trips running `git branch`. `BranchPicker` debounces the same query at 120 ms. 3. **Trigger label.** The worktree chip rendered `Branch from: main` in one span instead of marking the prefix `data-promptbox-hide-compact`. In a promptbox under 30 rem the prefix is supposed to disappear; instead it consumed the chip, which read `Branch from: ...` at 470 px and `Branc...` at 390 px, hiding the branch entirely. ## What changed - `plugins/environment-git-worktree/app.tsx` — option list `h-80` → `md:h-80`, so the compact drawer sizes to content while the desktop popover keeps the stable 288 × 367 dimensions #3932 introduced. The trigger renders prefix and value as separate spans, the prefix carrying `data-promptbox-hide-compact` and the value the usual emphasis, matching the project-checkout chip. - `apps/app/src/hooks/queries/branch-search-debounce.ts` (new), `project-queries.ts`, `environment-queries.ts` — the debounce now lives in the two hooks that own branch requests, `useProjectSourceBranches` and `useEnvironmentMergeBaseBranches`, behind a shared `useDebouncedBranchSearchQuery`. A component holding this policy is what let the regression happen: callers that stopped rendering `BranchPicker` silently started hitting the host per keystroke. At the query boundary no caller can forget it, and the first render is still immediate — only changes wait. - `apps/app/src/components/pickers/BranchPicker.tsx` — drops its own debounce and reports search queries to consumers as they are typed; both consumers feed them back into the hooks above. Callers keep filtering cached results off the immediate query, so lists still narrow on each keystroke. - `packages/plugin-sdk/src/app-contract.ts`, `docs/api_to_audit.md` — record that `experimental_useBranches` debounces `query`, since that decides whether a plugin should debounce its own search input. No plugin source changed: the plugins never held the debounce, they call `experimental_useBranches` and the implementation is app-side, so nothing needs rebuilding against a new SDK. No wire, CLI, or configuration changes, and no new public plugin API members. ## How you verified Measured in an isolated source dev app (fixture repo: 6 branches, 2 existing worktrees), driven through headless Chromium: | Check | Before | After | | --- | --- | --- | | Worktree drawer, no search match | 390 × 399 | 390 × 266 | | Worktree drawer, branches listed | 390 × 399 | 390 × 382 | | Worktree drawer, 2 existing worktrees | 390 × 399 | 390 × 284 | | Worktree popover, desktop | 288 × 367 | 288 × 367 | | `branch-options` requests for 7 keystrokes, worktree | 7 | 1 | | `branch-options` requests for 6 keystrokes, project checkout | 6 | 1 | | Worktree chip at 470 px | `Branch from: ...` | `main` | The after values match the project-checkout picker in the same states (266 px empty, 382 px listed), and the pre-#3932 worktree picker also issued 1 request for 7 keystrokes. Tests: - `usePluginBranchPickerState.test.tsx` and `environment-queries.test.tsx` — new debounce tests for both request paths; with the debounce removed they fail with 8 and 5 requests instead of 2. - `plugins/environment-git-worktree/app.test.tsx` — new compact-prefix test asserting the prefix span carries `data-promptbox-hide-compact` and the value does not; the existing chip assertions move to the split-span text. - `pnpm exec turbo run test typecheck --filter=bb-plugin-environment-git-worktree` — 96 tests, 5 files, typecheck clean. - `pnpm exec turbo run test --filter=@bb/app -- src/components/plugin src/components/pickers src/components/secondary-panel/git-diff src/hooks/queries` — 850 tests across the pickers, plugin bridge, git-diff panel, and query hooks. - `pnpm exec turbo run typecheck lint --filter=@bb/app` — clean. Not covered: headless Chromium only, so the WebKit/iOS-Simulator drawer checks the UI guidance asks for were not run, and the full repository suite was not run. The merge-base picker's debounce is covered by the new `environment-queries` test rather than a live measurement. Unrelated and untouched: branch-picker drawers have no bottom safe-area inset because `BRANCH_PICKER_CONTENT_CLASS_NAME`'s `p-0` overrides the drawer padding, which has been true since #325 for all three pickers. > AGENT GENERATED --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
This PR collects the design-system polish split from the larger folders work and rebases it onto current
main.Summary
Review-loop fixes
Rebase notes
origin/main.Key stories
Validation
git diff --checkpnpm exec turbo run typecheck --filter=@bb/apppnpm exec turbo run test --filter=@bb/app -- ThreadTimelineRows.actions ProjectRow.interactions SidebarThreadSearchPanel QueuedMessagesListpnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/db --filter=@bb/server-contractpnpm exec turbo run test --filter=@bb/app --filter=@bb/db --filter=@bb/server-contract