fix(desktop): keep titlebar actions clear of workbar - #4829
Conversation
920d9ab to
a0754f2
Compare
Hoist the right workbar width to the shared frame and reserve that space in the titlebar while the panel is open. Add a regression test for a long session title with the maximum-width usage panel and verify Share remains clickable. Fixes apache#4826 Generated-by: Maka
a0754f2 to
581982b
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed current head 581982bdcfd5c1bfe907ed4ba13f6865a0f87b26 (OPEN). Technical GO — no P0–P2, two non-blocking P3 observations. Note: the PR is currently CONFLICTING, so a rebase is required and will invalidate this review — it is bound to this head only.
What it does and why it holds
Titlebar actions are pushed clear of the workbar by switching the width variable's source without changing its value (rightWidth: layout.workbarWidth vs the frame-inherited workbar width rule; --agents-content-area-gap stays 4px from :root, so the calc cannot break). Both screenshots were examined individually: before, the long title runs to x≈1200 under the panel starting x≈820, overlapping the Share icon; after, the title truncates ~620px with Share fully outside the panel's left edge — matching the fix claim. The new e2e asserts geometry (identity-box right edge ≤ workbar-box left edge), not just visibility, and Share still opens its dialog; the helper's selector move (.maka-workbar-layout-vars → .appFrame) tracks the variable migration, and the old class still carries bottom-panel height (not dead code). The test actually ran and passed in this CI run (Desktop e2e step). Single commit; renderer-architecture metric deltas verified by CI.
P3s (non-blocking)
- CONFLICTING/DIRTY: author must rebase; the head will necessarily drift and this conclusion lapses entirely — re-review on the new head.
- Defensive:
getFrameStyle's reserve has no placement predicate — correct today only because placements are right/bottom. If a left placement ever appears, this needs a matching condition; worth a comment now.
What I could not judge
Real-window rendering on macOS/Windows (gutter variables differ from Linux) — geometry logic, Linux CI e2e, and the author's screenshots interlock under Linux semantics; other platforms should get author/maintainer eyeballs.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
简体中文
评审结论来自自动化审查流程;发布者没有读这份 diff,核的是当前 head 有没有漂移、以及 exact-head 的门禁状态。当前 head 是 581982b,未关闭。技术上无阻断问题,两条观察:先解冲突(rebase 后结论作废重审),另预留左侧布局的条件。等人类拍板。
Summary
Fixes #4826
Before / after
Both captures use the same session and usage panel. The Workbar divider was dragged fully left until it reached the
600pxmaximum in both states. The Before capture reproduces the previous layout by disabling the new titlebar reserve; the After capture enables the fix.Verification
npm --workspace @maka/desktop run build:with-depsnpm --workspace @maka/desktop run typechecknpm --workspace @maka/desktop run check:architecture -- --base "$(git rev-parse upstream/main)"— 98 tests passed; renderer architecture check passed against the PR basenpx biome lint apps/desktop/src/renderer/app-shell.tsx apps/desktop/src/renderer/features/workbar/controller/use-workbar-controller.ts apps/desktop/src/renderer/features/workbar/ui/workbar-host.tsx apps/desktop/src/renderer/styles/shell-layout.css apps/desktop/e2e/session-workbar.spec.tsenv -u ELECTRON_RUN_AS_NODE npx playwright test --config e2e/playwright.config.ts e2e/session-workbar.spec.ts --workers=1— 9 passedgit diff --check upstream/main...HEADThe regression test checks that the titlebar identity ends before the right panel and then clicks Share to confirm the dialog opens.
AI use
Select exactly one:
Tool(s) and scope:
Maka (GPT-5.6 Sol) inspected the layout, implemented the shared-width CSS fix, added the regression test, generated the Before/After evidence, and prepared the commit and PR description.
Checklist
Does this PR entail a change in behavior?