Repository navigation
Polish split workspace panels and browser chrome - #934
Conversation
- Reserve panel chrome space for diff controls - Keep browser reveal transitions atomic and held while tabs are active - Show responsive thread actions in only one presentation
…order-styling-thr_pgyrvpihvw # Conflicts: # apps/app/src/views/thread-detail/ThreadDetailView.tsx
|
🚨 SLOP COP 🚨 · I am SlopCop. I started the review for this pull request. I will check security, code quality, performance, architecture, and browser behavior. |
| className={cn( | ||
| "relative shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring", | ||
| SECONDARY_PANEL_TOP_CHROME_BACKGROUND_CLASS, | ||
| visibility.isExpanded ? "h-11 max-md:pointer-coarse:h-[52px]" : "h-1", |
There was a problem hiding this comment.
🚨 slopcop/review — Keep a trusted origin visible when the browser chrome closes.
After 250 ms, this line reduces the trusted browser chrome to four pixels. It removes the URL and connection status from view. The untrusted page then occupies the prior chrome area. The page also controls the visible tab title. This combination lets a page show false browser chrome and a false origin.
Keep a trusted origin indicator visible. Alternatively, keep the full chrome visible for locations without a secure connection.
|
🚨 SLOP COP 🚨 · The security phase is complete. I found one medium-severity issue. The new idle state hides the trusted URL and connection status. I will include this issue in the final review. |
|
🚨 SLOP COP 🚨 · The performance phase is complete. I found two medium-severity issues in hot resize paths. One observer rerenders pane headers during each divider movement. Browser state events can also cause repeated native view resizes. |
| if (nextState.tabId !== tabId) { | ||
| return; | ||
| } | ||
| noteBrowserChromeActivity(); |
There was a problem hiding this comment.
🚨 slopcop/review — Do not reveal the chrome for every browser state event.
This listener also receives page-title changes and in-page navigation events. Each event expands the chrome. The timer then closes it after 250 ms. Both changes resize contentRef and call desktopBrowser.setBounds through the observer.
A page that updates its title often can cause repeated IPC and guest layout work. Reveal the chrome only for URL changes or user actions.
| const measure = () => { | ||
| const width = measuredElement.getBoundingClientRect().width; | ||
| if (width > 0) { | ||
| setMeasuredPaneWidth(width); |
There was a problem hiding this comment.
🚨 slopcop/review — Store only the narrow-header state.
This observer reports each pane width during divider movement. Each new width calls setMeasuredPaneWidth and rerenders the full header. SplitThreadArea uses direct style updates to avoid React work in this path.
Store the threshold result as a boolean. React will then skip updates until the pane crosses the threshold.
|
🚨 SLOP COP 🚨 · The browser test phase is complete. I started the development app at the pull request head. I opened two threads in a split workspace. I checked focus, narrow-header overflow, maximize, restore, and the right-panel toggle. The page produced no console errors. The app typecheck passed. All 2,251 tests in 303 app test files passed. The web app cannot show the native browser view. |
|
🚨 SLOP COP 🚨 · The code-quality and architecture phase is complete. I found one accessibility defect and one stale rename. The review also found duplicate pane-title and pointer-focus state recipes. These refactors are not blocking. |
| data-state={visibility.isExpanded ? "expanded" : "collapsed"} | ||
| role="region" | ||
| aria-label="Browser navigation" | ||
| aria-expanded={visibility.isExpanded} |
There was a problem hiding this comment.
🚨 slopcop/review — Remove the invalid expanded state from this region.
aria-expanded does not apply to role="region". Assistive software will ignore it, and accessibility checks can reject it.
Put this state on a real disclosure control, or remove the attribute. Do not hide this region while it contains focusable controls.
| export const HEADER_REDUCED_GLYPH_ICON_BUTTON_CLASS = | ||
| COARSE_POINTER_HEADER_REDUCED_GLYPH_ICON_BUTTON_CLASS; | ||
|
|
||
| export const HEADER_MAXIMIZE_ICON_BUTTON_CLASS = |
There was a problem hiding this comment.
🚨 slopcop/review — Complete the reduced-glyph token rename.
This alias keeps the old maximize-only name in three call sites. The token now applies to all dense header glyphs.
Update those imports to HEADER_REDUCED_GLYPH_ICON_BUTTON_CLASS. Then remove this stale alias.
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
I request changes. One blocking security issue remains.
The collapsed browser chrome removes the trusted URL and connection status above untrusted page content. Keep a trusted origin visible at all times.
I also found these non-blocking issues:
- Browser state events can cause repeated native view resizes.
- Pane divider movement rerenders each full pane header.
- The browser region uses an invalid
aria-expandedattribute. - The reduced-glyph token rename leaves a stale alias.
The architecture scan found duplicate pane-title and pointer-focus state recipes. A shared component or hook can reduce future drift.
The app typecheck passed. All 2,251 tests in 303 app test files passed.
I also tested two live split panes. Focus, narrow-header overflow, maximize, restore, and the right-panel toggle worked without console errors.
The web test could not exercise the native WebContentsView.
) ## Summary - delete `ConversationCollapsedRail` and restore the conversation from the right panel's own header control - collapse the two macOS traffic-light reserve constants into one now that both surfaces share a `px-4` base inset - drop the panel's `border-l` while the conversation is collapsed so it no longer doubles the sidebar's `border-r` ## Why The rail was a 32px placeholder whose only job was to carry the restore action. `resolveConversationCollapseControl` already resolves to "Restore conversation" while collapsed, but the panel header suppressed the control in that state so the rail could own it. Rendering it in both states keeps the expand/restore pair in one slot and removes a whole surface. Two consequences fell out of the deletion: **Traffic-light geometry.** The panel's reserve was `pl-[68px]`, sized to sit *behind* the rail. Without the rail that lands leading content at 84px — under the pinned sidebar trigger, which is BB-46. Both the page header and the collapsed panel now start from the same 16px `px-4` inset, so `MACOS_COLLAPSED_HEADER_RESERVE_CLASS` and `MACOS_COLLAPSED_PANEL_TRAFFIC_LIGHT_RESERVE_CLASS` merge into `MACOS_COLLAPSED_TOP_LEFT_RESERVE_CLASS` at `pl-[104px]`. The paired-geometry test was already stale — it hardcoded `RAIL_WIDTH = 36` after #934 shrank the rail to `w-8`, so it asserted a 120px target the app missed by 4px. **Double seam.** Collapsing drops the timeline panel to 0% and the resize handle to 0px, so the panel's `border-l border-border-seam` landed directly on the app sidebar's `border-r border-border-seam` and rendered as one 2px line. The panel gives up its border while collapsed; the sidebar owns that boundary. The split-workspace host was never affected — there the panel already omits its border and the host's resize handle is the seam. **Behavior dropped:** the rail showed a spinner while the agent ran with the conversation hidden. That signal is gone, by request. ## Verification - `pnpm exec turbo run typecheck --filter=@bb/app` - Vitest across `secondary-panel/`, `thread-detail/`, and `bb-desktop.test.ts` — 38 files, 279 tests - new `ThreadSecondaryPanel.collapseControl.test.tsx` pins both halves of the disclosure pair; without a rail this control is the only way back from a collapsed conversation, so losing it strands the user. Confirmed it fails when the old gating is restored. - ESLint on changed files — 0 errors - manual QA in the dev app, measuring the seam pixel columns at the sidebar/panel boundary: | state | seam columns | | --- | --- | | before fix, collapsed | 319, 320 — 2px | | after fix, collapsed | 319 — 1px | | after fix, conversation restored | 319 — 1px | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Stacked (column) splits could not be resized. This restores the divider drag. ## Cause [#934](dbdcc20) added a pane focus scrim at `z-20` and lifted the pane headers to `z-[21]` so titles and tabs stay above it. `SplitDivider` stayed at `z-[5]`. Panes are `relative` with no z-index, so they open no stacking context and the headers paint over the divider. The divider is a 1px line with a ±6px absolutely positioned grab target. In a column split, the lower pane's header starts exactly at the seam, so it covers that grab strip and takes all the pointer events. Row splits kept working because the header overlaps the seam for only one header row. ## Fix The divider now uses `z-[25]` — above the scrim and the headers, below a maximized pane at `z-30`. ## Tests - New regression test in `SplitThreadArea.test.tsx`: it renders a column split and asserts the divider layer beats the lower pane's real header and the focus scrim. It fails on `z-[5]` and passes on `z-[25]`. - `pnpm exec turbo run test --filter=@bb/app -- SplitThreadArea` — 37 passed - `pnpm exec turbo run typecheck --filter=@bb/app` — clean - ESLint and Prettier — clean - Manual check in the dev app: stacked and side-by-side splits both resize. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary - unify split, sidebar, and panel chrome so active context is clear and inactive splits recede - refine semantic panel controls, split icons, queued attachments, and shared tab styling - quiet the browser navigation with a compact idle state that remains recoverable by pointer and keyboard - align side chat surfaces with the contextual right panel and add representative story coverage ## Why The multi-split workspace accumulated competing borders, tab treatments, and controls. This pass reduces visual noise while preserving the hierarchy between the selected thread, its focused split, and the attached side panel. ## Verification - pnpm exec turbo run typecheck --filter=@bb/app - pnpm exec turbo run typecheck --filter=@bb/shared-ui - focused Vitest suites covering split headers, browser chrome/deck, tab pills, sidebar controls, side chat, and embedded chat - focused ESLint checks - git diff --check - visual review in the dev app and Ladle across representative split and side-panel configurations
…et-bb#951) ## Summary - delete `ConversationCollapsedRail` and restore the conversation from the right panel's own header control - collapse the two macOS traffic-light reserve constants into one now that both surfaces share a `px-4` base inset - drop the panel's `border-l` while the conversation is collapsed so it no longer doubles the sidebar's `border-r` ## Why The rail was a 32px placeholder whose only job was to carry the restore action. `resolveConversationCollapseControl` already resolves to "Restore conversation" while collapsed, but the panel header suppressed the control in that state so the rail could own it. Rendering it in both states keeps the expand/restore pair in one slot and removes a whole surface. Two consequences fell out of the deletion: **Traffic-light geometry.** The panel's reserve was `pl-[68px]`, sized to sit *behind* the rail. Without the rail that lands leading content at 84px — under the pinned sidebar trigger, which is BB-46. Both the page header and the collapsed panel now start from the same 16px `px-4` inset, so `MACOS_COLLAPSED_HEADER_RESERVE_CLASS` and `MACOS_COLLAPSED_PANEL_TRAFFIC_LIGHT_RESERVE_CLASS` merge into `MACOS_COLLAPSED_TOP_LEFT_RESERVE_CLASS` at `pl-[104px]`. The paired-geometry test was already stale — it hardcoded `RAIL_WIDTH = 36` after get-bb#934 shrank the rail to `w-8`, so it asserted a 120px target the app missed by 4px. **Double seam.** Collapsing drops the timeline panel to 0% and the resize handle to 0px, so the panel's `border-l border-border-seam` landed directly on the app sidebar's `border-r border-border-seam` and rendered as one 2px line. The panel gives up its border while collapsed; the sidebar owns that boundary. The split-workspace host was never affected — there the panel already omits its border and the host's resize handle is the seam. **Behavior dropped:** the rail showed a spinner while the agent ran with the conversation hidden. That signal is gone, by request. ## Verification - `pnpm exec turbo run typecheck --filter=@bb/app` - Vitest across `secondary-panel/`, `thread-detail/`, and `bb-desktop.test.ts` — 38 files, 279 tests - new `ThreadSecondaryPanel.collapseControl.test.tsx` pins both halves of the disclosure pair; without a rail this control is the only way back from a collapsed conversation, so losing it strands the user. Confirmed it fails when the old gating is restored. - ESLint on changed files — 0 errors - manual QA in the dev app, measuring the seam pixel columns at the sidebar/panel boundary: | state | seam columns | | --- | --- | | before fix, collapsed | 319, 320 — 2px | | after fix, collapsed | 319 — 1px | | after fix, conversation restored | 319 — 1px | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Stacked (column) splits could not be resized. This restores the divider drag. ## Cause [get-bb#934](get-bb@dbdcc20) added a pane focus scrim at `z-20` and lifted the pane headers to `z-[21]` so titles and tabs stay above it. `SplitDivider` stayed at `z-[5]`. Panes are `relative` with no z-index, so they open no stacking context and the headers paint over the divider. The divider is a 1px line with a ±6px absolutely positioned grab target. In a column split, the lower pane's header starts exactly at the seam, so it covers that grab strip and takes all the pointer events. Row splits kept working because the header overlaps the seam for only one header row. ## Fix The divider now uses `z-[25]` — above the scrim and the headers, below a maximized pane at `z-30`. ## Tests - New regression test in `SplitThreadArea.test.tsx`: it renders a column split and asserts the divider layer beats the lower pane's real header and the focus scrim. It fails on `z-[5]` and passes on `z-[25]`. - `pnpm exec turbo run test --filter=@bb/app -- SplitThreadArea` — 37 passed - `pnpm exec turbo run typecheck --filter=@bb/app` — clean - ESLint and Prettier — clean - Manual check in the dev app: stacked and side-by-side splits both resize. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Root cause The focused pane title chip cancels its own horizontal padding with `-mx-2` so the grey surface bleeds outward without shifting the title text. The header's center row separates its children with `gap-2` (`apps/app/src/components/layout/AppPageHeader.tsx:90`) — exactly the 8px that the right-side bleed removes. The chip's painted right edge therefore landed at 0px from the next sibling: the `child` / `side chat` pill, or the actions menu button's hover box when no pill is present. Measured in the running app before the fix: `chipRight: 1028, pillLeft: 1028`. This is not a recent regression. The focused-pane title surface arrived in 4422445 (#682, 2026-07-14) as an absolutely-positioned overlay with `-inset-x-2`, which produced the same flush edge; dbdcc20 (#934, 2026-08-01) rewrote the technique to padding plus negative margin and faithfully reproduced the same offsets. The pill (#85) and the row's `gap-2` both predate the surface, so the collision existed from the surface's first commit. It stayed unnoticed because the surface only paints on the *focused* pane, only in a split, and is only visibly flush when the thread carries a `child` / `side chat` pill — without a pill the neighbour is the actions button, which is transparent until hover. ## Change Keep the left bleed, which is load-bearing (it aligns the title text with the header's `px-4`), and drop the right bleed so the row gap survives. Applied to both headers that share the chip pattern: - `apps/app/src/views/thread-detail/ThreadDetailHeader.tsx:164` - `apps/app/src/views/thread-detail/SplitThreadArea.tsx:1134` ## Verification Drove a real dev instance with a parent thread, a child thread (so the `child` pill renders), and a new-thread pane, arranged as three split panes, and measured the live DOM: | | chip `margin-right` | gap to next sibling | | --- | --- | --- | | before | `-8px` | **0px** | | after | `0px` | **8px** | All three pane-header variants (thread, child-pill thread, new-thread pane) report `margin-right: 0px` and an 8px gap after the change, with the title text position unchanged (`margin-left` stays `-8px`). Checks: `pnpm exec turbo run typecheck lint test --filter='...[origin/main]'` — 533 test files, 4675 passed / 3 skipped, 0 lint errors, exit 0. > AGENT GENERATED Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
Why
The multi-split workspace accumulated competing borders, tab treatments, and controls. This pass reduces visual noise while preserving the hierarchy between the selected thread, its focused split, and the attached side panel.
Verification