Skip to content

fix(desktop): keep titlebar actions clear of workbar - #4829

Open
Sun-GLiang wants to merge 1 commit into
apache:mainfrom
Sun-GLiang:fix/issue-4826-titlebar-workbar-overlap
Open

fix(desktop): keep titlebar actions clear of workbar#4829
Sun-GLiang wants to merge 1 commit into
apache:mainfrom
Sun-GLiang:fix/issue-4826-titlebar-workbar-overlap

Conversation

@Sun-GLiang

@Sun-GLiang Sun-GLiang commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Publish the right Workbar width on the shared app frame so the window titlebar can use the same layout authority.
  • Reserve the expanded right panel's width in the titlebar, allowing existing session-title truncation to keep the title and Share action outside the panel's hit-test layer.
  • Add an end-to-end regression test covering a long session title, a maximum-width usage panel, layout separation, and a working Share action.

Fixes #4826

Before / after

Both captures use the same session and usage panel. The Workbar divider was dragged fully left until it reached the 600px maximum in both states. The Before capture reproduces the previous layout by disabling the new titlebar reserve; the After capture enables the fix.

Before — title and Share enter the Workbar toolbar After — title truncates and Share remains in the session area
Before: long session title and Share overlap the maximum-width Workbar After: long session title truncates before the maximum-width Workbar

Verification

  • npm --workspace @maka/desktop run build:with-deps
  • npm --workspace @maka/desktop run typecheck
  • npm --workspace @maka/desktop run check:architecture -- --base "$(git rev-parse upstream/main)" — 98 tests passed; renderer architecture check passed against the PR base
  • npx 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.ts
  • env -u ELECTRON_RUN_AS_NODE npx playwright test --config e2e/playwright.config.ts e2e/session-workbar.spec.ts --workers=1 — 9 passed
  • git diff --check upstream/main...HEAD

The 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:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

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

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 5, 2026
@Sun-GLiang
Sun-GLiang force-pushed the fix/issue-4826-titlebar-workbar-overlap branch 2 times, most recently from 920d9ab to a0754f2 Compare September 5, 2026 06:41
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
@Sun-GLiang
Sun-GLiang force-pushed the fix/issue-4826-titlebar-workbar-overlap branch from a0754f2 to 581982b Compare September 5, 2026 06:50

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

  1. CONFLICTING/DIRTY: author must rebase; the head will necessarily drift and this conclusion lapses entirely — re-review on the new head.
  2. 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 后结论作废重审),另预留左侧布局的条件。等人类拍板。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): prevent long session titles from blocking side panel actions

2 participants