From d0cd95689f25b5b99d35bd4d0140c62cf2745eb2 Mon Sep 17 00:00:00 2001 From: JUN Date: Sat, 26 Sep 2026 21:34:50 +0900 Subject: [PATCH 1/2] fix(gui): size desktop Combos under the title strip and keep the narrow header usable Three layout defects from the integrated title bar (#5910), found by a post-merge review: - The Combos sizing rules matched only a quota bar directly under .main; in the desktop shell the bar sits in .main-top, so the 100dvh shell overflowed the page by the 40px strip. The same rules now key on .main-top. - At <=760px the sticky .main-top painted over the sticky mobile header while scrolling. It now scrolls with the page (static, z-index auto), and the mobile header carries the window drag handlers so the window stays draggable after scrolling. - The titlebar metrics floored the points-to-CSS ratio at 1, so at 300% zoom a 360pt window kept an 80px inset and pushed the 44px menu off a 120px viewport. Zoomed in, only the lights share of the clearance shrinks (27px inset at 300%); the row keeps its 40px floor. --- .../030_post_merge_fixes.md | 32 +++++++++++++++++++ gui/src/App.tsx | 6 ++-- gui/src/components/app-titlebar.css | 24 ++++++++++++++ gui/src/lib/window-chrome.ts | 16 ++++++++-- gui/tests/app-titlebar.test.tsx | 25 +++++++++++++++ 5 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 devlog/_plan/260926_bug_train_6/030_post_merge_fixes.md diff --git a/devlog/_plan/260926_bug_train_6/030_post_merge_fixes.md b/devlog/_plan/260926_bug_train_6/030_post_merge_fixes.md new file mode 100644 index 00000000000..be94c1ecaf7 --- /dev/null +++ b/devlog/_plan/260926_bug_train_6/030_post_merge_fixes.md @@ -0,0 +1,32 @@ +# Post-merge fixes after batches 6–7 and #5910 + +A second review of `dev` at `f32f9aabd7` by independent Sol reviewers (union, batch 6 runtime, batch 7 + #5910, new +PR triage) found three verified P2 layout defects from #5910 and one shared CI hang. The batch 6 finding about a failed +replacement surfacing as a generic `upstream_sse_error` matches the Responses post-header path +(`deferProtocolSafeResetRecovery` also preserves the original stream error), so it is a cross-lane design question, +not a batch 6 regression, and is out of scope here. + +## Fixes (branch `codex/post-merge-fixes`) + +1. Combos overflow in the desktop shell. `quota-summary-bar.css` sizes the Combos shell only when the bar is a direct + child of `.main`; the desktop shell wraps it in `.main-top`, so the `100dvh` shell sits under a 40px strip and the page + overflows by 40px. Add the same two rules (and the ≤760px `height: 100%` rule) keyed on `.main:has(> .main-top)` in + `gui/src/components/app-titlebar.css`, which owns `.main-top`. +2. Narrow desktop window: `.main-top` is `position: sticky; top: 0` like `.mobile-topbar`, and paints over the menu while + scrolling. At `max-width: 760px` make `.main-top` static, as the quota bar already was there. +3. High page zoom: `watchMacTitlebarMetrics` floors the points→CSS ratio at 1, so at 300% on a 360pt window the 80px + inset pushes the 44px menu off a 120px viewport. For ratio < 1 set `--tl-inset` to `ceil(80 × ratio)` and + `--chrome-clear` to that plus 44 (toggle 28 + padding 16, which are CSS pixels); keep `--titlebar-h` at 40 and keep the + ratio ≥ 1 branch unchanged. + +Tests: extend `gui/tests/app-titlebar.test.tsx` (zoom-in case: DPR 6 on a 2x window → inset 27px, clear 71px, +titlebar 40px; CSS assertions for the static strip and the `.main-top` Combos rules). GUI screenshot for the PR. + +4. CI hang (`test 4/4` batch of `tests/cli/*` timing out at 120s on Linux in dev, #5924 and #5928): root cause is being + investigated in a separate lane; its fix lands in this branch if it is ready and verified, otherwise separately. + +## Check + +`bun x tsc --noEmit`, `bun run lint:gui`, `bun run build:gui`, gui tests for the titlebar and quota bar, structure and +privacy checks, exact-head CI, then `--admin --match-head-commit`. + diff --git a/gui/src/App.tsx b/gui/src/App.tsx index bb2a5027471..0d28feeaa21 100644 --- a/gui/src/App.tsx +++ b/gui/src/App.tsx @@ -31,7 +31,7 @@ import { confirmAction } from "./action-dialogs"; import { hostOs, isDesktopShell, isExternalLink, openDesktopUpdatePage } from "./lib/desktop-shell"; import { useSidebarCollapse } from "./use-sidebar-collapse"; import { MainTopStrip, SidebarTopStrip } from "./components/app-titlebar"; -import { watchMacTitlebarMetrics } from "./lib/window-chrome"; +import { watchMacTitlebarMetrics, windowChromeHandlers } from "./lib/window-chrome"; type Theme = "light" | "dark" | "system"; @@ -394,7 +394,9 @@ export default function App() { )} {/* inert while the drawer is open: keeps focus and assistive tech inside the drawer */} -
+ {/* At narrow widths the sidebar strip is hidden and the main strip scrolls away, so in + the desktop shell the sticky header is the window's drag surface. */} +