You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/06 04:03:44 UTC

[PR] fix(desktop): hug the right edge and ease the workbar column open and shut [maka]

Astro-Han opened a new pull request, #4890:
URL: https://github.com/apache/maka/pull/4890

   ## Summary
   
   Two things the right workbar got wrong next to the sidebar it mirrors.
   
   **The collapse toggle sat 24px in from the plate's right edge on macOS**, where the OS draws nothing on that side. The titlebar strip and the workbar's own bar each spelled the right gutter out as `--space-6 + --maka-titlebar-overlay-right-width`. That is now one token, `--maka-titlebar-gutter-right`, built from the bar's own `--space-2` inset plus whatever the platform reports: 0 on macOS and Linux, the caption-button width on Windows. Both bands read it, so the toggle keeps the same x whether the column is open or collapsed, and only Windows caption buttons push it inward.
   
   **The column snapped between `display: none` and its width.** The sidebar eases with `--duration-large` / `--ease-out-strong`; the workbar had nothing. The frame and the overlay panel that shares its grid area now animate `width` and `margin-left`, with `visibility` gated by the same duration so a hidden column takes no focus or hit-testing. Their children hold the open width during the transition, so the content slides past the clip edge like a drawer instead of re-wrapping on every frame. A pointer drag on the resize handle disables the ease the way the sidebar does. The bottom placement keeps `display: none`.
   
   Also removed: the `min-width: 320px` / `max-width: 600px` on the column. `workbar-layout.ts` already clamps the value to 340–600, and a CSS floor would stop the collapse short of 0.
   
   Refs #2188. That tracker's "8px / 8px toolbar padding" box is ticked, but #4789's description says it left that open; this PR is what lands it.
   
   ## Verification
   
   - New story `product-session-workbar--collapse-and-restore` wires the bar's collapse and the titlebar's restore into `rightCollapsed` and asserts the 8px gutter, then samples frame and panel widths with `requestAnimationFrame` through both directions: ≥6 distinct values, monotonic, panel width equal to frame width on every sample, panel not visible when shut, region visible when open. `npm run smoke:storybook` runs it; it passes. The same run reports 4 unrelated failures (session-list project groups, plus-menu during skill refresh, two slash-menu stories) that fail identically against a Storybook built from `main` at a03dd577bb.
   - `e2e/session-workbar.spec.ts` passes (8/8) in Electron. The "restores an existing tool" test now polls for the toggle's resting x, since it rides in with the column instead of appearing there.
   - Cost of keeping the panels mounted and easing them: a CDP performance trace of one 280ms collapse in Electron measures ~95ms of main-thread work across 33 frames with 0 dropped frames at 120Hz, in line with the sidebar's ease.
   - `npm run format`, `npm run lint`, `npm run build:renderer`, `npm run build-storybook` all clean.
   - Found while measuring, not caused here: the transcript's first-column glyph stems ("F", "T") are clipped by a pixel at DPR 2 when the workbar is open. Reproduced on a renderer built from `main`; left alone in this PR.
   
   Same story, same 1280×900 viewport, Storybook built from `main` on the left and from this branch on the right. The BEFORE frames set the collapse attributes directly because `main`'s story has no state wiring; the app writes the same attributes.
   
   ![Light, open: toggle position](https://github.com/user-attachments/assets/a394aeec-1229-4ac0-a9d6-285635e0ce94)
   
   ![Dark, open: toggle position](https://github.com/user-attachments/assets/302aa0e3-62ad-47ab-9a38-5f9228151240)
   
   ![Light, 45ms after collapse](https://github.com/user-attachments/assets/62f973a1-9738-45a0-8b15-108d9fcbe876)
   
   ![Dark, 45ms after collapse](https://github.com/user-attachments/assets/ec1841bb-c1e9-4e1c-95ac-a174213dd03b)
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: Claude Code (Fable 5.1) diagnosed the gap and the missing motion over CDP, wrote the CSS, the `WorkbarPanel` change, the story and the E2E adjustment, and ran the measurements; reviewed and directed by the author.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(desktop): hug the right edge and ease the workbar column open and shut [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4890:
URL: https://github.com/apache/maka/pull/4890


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(desktop): hug the right edge and ease the workbar column open and shut [maka]

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on PR #4890:
URL: https://github.com/apache/maka/pull/4890#issuecomment-5557787056

   **Two corrections to my previous comment, and the re-check I said I would do.**
   
   **The head moved while I was posting.** That comment reads "exact head `1e6ac506`" but GitHub attached it to `8556eed3`. Everything in it was derived from `1e6ac506`; treat the head line as wrong and the content as bound to `1e6ac506`.
   
   **The [P2] is discharged — the rebase resolved it correctly.** I said I would rather re-check the resolved bytes than approve across the rebase, so here is that check on `8556eed3`:
   
   - **The motion guard survived**: the rAF sampling, `getAnimations()` and the `toggleX` set are all still in `WorkbarCollapseKeepsOneToggleInPlace` (13 occurrences across those three markers).
   - **#4895's typecheck fix survived too**: `WorkbarInShell` still reads through `isSessionWorkbarCollapsed`.
   - **The budget is 31 tests in 16 files.**
   
   Both of the failures I warned about were avoided — the resolution kept this PR's guard *and* the helper `main` needs, rather than either one at the other's cost. The PR is no longer `CONFLICTING`.
   
   That removes the reason I withheld approval. **I am holding it only until required `test` reports on this head — it is still pending right now** — rather than binding an approval to a head whose gate has not answered. Nothing else from the review is outstanding: no P0/P1, and the token, gutter-arithmetic and clamp findings all stand as written.
   
   <details><summary>简体中文</summary>
   
   **对上一条评论的两点更正,以及我说过要做的复核。**
   
   **发布过程中 head 移动了。** 那条评论写的是 exact head `1e6ac506`,但 GitHub 把它挂到了 `8556eed3`。其中所有内容都是基于 `1e6ac506` 得出的;**请把那行 head 视为写错,内容按绑定 `1e6ac506` 理解。**
   
   **那条 [P2] 已经消解 —— rebase 解得是对的。** 我说过宁愿复核解决后的字节、也不愿让批准跨过那次 rebase,所以这是在 `8556eed3` 上的复核:
   
   - **动效守卫保住了**:rAF 采样、`getAnimations()` 与 `toggleX` 集合仍在 `WorkbarCollapseKeepsOneToggleInPlace` 里(三个标记合计 13 处)。
   - **#4895 的 typecheck 修复也保住了**:`WorkbarInShell` 仍经 `isSessionWorkbarCollapsed` 读取。
   - **预算为 31 tests / 16 files。**
   
   我警告的两种失败**都没有发生** —— 这次解决同时留住了本 PR 的守卫**和** `main` 需要的那个取值,而不是以一方为代价换另一方。该 PR 已不再是 `CONFLICTING`。
   
   这也消除了我此前不批准的理由。**我现在只是在等本 head 上必需的 `test` 报告 —— 它此刻仍是 pending** —— 而不愿把批准绑到一个门禁尚未回答的 head 上。评审其余部分没有遗留:无 P0/P1,token、gutter 算术与钳制三项结论均按原文成立。
   
   </details>
   
   ---
   
   > **Automated review notice:** This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org