fix(desktop): preserve workbar tab scrollbar behavior - #5204
Open
colaforniaw wants to merge 1 commit into
Open
Conversation
colaforniaw
marked this pull request as draft
September 11, 2026 17:08
colaforniaw
force-pushed
the
fix/workbar-tab-scrollbar-cleanup
branch
2 times, most recently
from
September 11, 2026 17:13
435b5ef to
6b783ba
Compare
colaforniaw
marked this pull request as ready for review
September 11, 2026 17:24
colaforniaw
force-pushed
the
fix/workbar-tab-scrollbar-cleanup
branch
2 times, most recently
from
September 11, 2026 18:09
673d5be to
8ba258b
Compare
me2seeks
reviewed
Sep 12, 2026
Contributor
There was a problem hiding this comment.
PR 5204 Review
结论
CHANGES_REQUESTED
层机制修复本身正确且最小:把 universal scrollbar-width/scrollbar-color 从 layer(components)(base.css 经 styles.css:35 以 layer(components) 导入)移入 @layer base(maka-tokens.css:1228,cascade-layers.css:65 声明 base < astryx-components < components),Astryx TabList 的 scrollbar-width: none 因此重新胜出;story 测试同时断言两侧(strip=none、review panel=thin),契约完整。
发现
[P2] 同一 diff 里还删掉了整套 webkit 胶囊滚动条样式(33 行),但 PR 描述完全未提,这是全 app 的视觉变化
- 文件: apps/desktop/src/renderer/styles/base.css(删除的
*::-webkit-scrollbar*5 条规则) - 问题:删除的注释写明"Both reference systems converged on the same recipe: a slim pill inset in a transparent gutter"——即胶囊 thumb 是有意的设计基线。而 Desktop 渲染器是 Electron(Chromium),所有平台用户的滚动条都会从自定义胶囊回退到 UA 默认细条(
scrollbar-color在 Chromium 下仍着色,但 2px 内缩胶囊 + hover 加深消失)。这不是修 bug 所必需:TabList 复现条的问题是scrollbar-width的层冲突,把 webkit 规则一并移入@layer base就能同时保住两者;当前是"移了 width/color、删了 webkit",新旧行为不一致。 - 建议(二选一,请在 PR 中说明决策):
- 恢复 5 条 webkit 规则,与
scrollbar-width/scrollbar-color一起放进@layer base(保设计基线,改动同样最小);或 - 确认胶囊样式是有意退役——那请更新 PR 描述(当前只说"move it into @layer base"和"remove the old
:rootworkaround",未提 webkit 规则删除),并确认 Storybook 视觉基线已更新。
- 恢复 5 条 webkit 规则,与
[P3] 描述里"remove the old :root workaround so the default has one owner"指向的规则在本 diff 和当前树上都不存在
- 文件: PR 描述 / apps/desktop/src/renderer/styles/base.css
- 问题:全仓库 grep 不到任何
:root+ scrollbar 的规则(diff 前后都没有)。这句话可能是相对更早 base 写的过时描述,或在描述另一个已被合入的改动。 - 建议:把这句改成实际发生的事(若 P2 选方案 2,正好并入 webkit 退役的说明)。
验证
- 层序:
cascade-layers.css:65@layer reset, theme, base, astryx-components, astryx-tokens, components;→ base 低于 astryx-components/components,新默认让位成立。 - 例外规则全部保赢:
prompt-rail.css:66(none)、workhub.css:253/257、composer.css:540、terminal.css:48、runtime-host.css:75都在layer(components)或无层(无层恒胜层),不会被 base 默认覆盖。 - 修复面:
base.css经styles.css:35以layer(components)导入,正是原 bug 中 out-rank astryx-components 的来源;移入 base 后该冲突消除。 - story 测试:
play中within/waitFor/expect均来自已导入的storybook/test(:22);断言 strip 的scrollbarWidth === 'none'与 review panel 的'thin',双向覆盖。 - 无残留:renderer 下唯一幸存的 webkit 规则是
prompt-rail.css:67(width: 0,与本 PR 无关且保赢)。
Generated-by: Maka
colaforniaw
force-pushed
the
fix/workbar-tab-scrollbar-cleanup
branch
from
September 12, 2026 02:15
8ba258b to
a5be1da
Compare
Author
|
Addressed:
Lint, format, typecheck, Storybook build, and the targeted smoke all pass. The story still verifies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The app's global scrollbar default was a
*rule inlayer(components). A universal selector is an element-level declaration, so it competes by cascade layer — andcomponentsout-ranksastryx-components. That silently overrode thescrollbar-width: noneAstryx'sTabListsets on its overflow strip, re-showing a persistent bar under the Session Workbar tabs and nudging them off vertical center (a classic bar takes layout height).Keep the universal scrollbar default, because
scrollbar-widthis not inherited and nested app scrollports must remainthin, but move the standard properties and the existing WebKit capsule recipe into the existing@layer baseblock inmaka-tokens.css. The later Astryx and product component layers can then own exceptions on their elements: the TabList strip'snonewins while ordinary nested scrollports retain the app-widethindefault. Keeping the WebKit rules preserves the established capsule thumb, transparent gutter, and hover treatment; this PR changes their cascade layer, not the app's scrollbar visual baseline.Refs #2538
Verification
npm run lint,npm run format:check,npm --workspace @maka/desktop run typecheck,npm --workspace @maka/desktop run check:architecture, andnpm run check:asf-headerspass.scrollbar-width: none, while an ordinary nested review scrollport resolves tothin.layer(components)makes the TabList assertion fail (expected 'thin' to be 'none'), so the original regression cannot return silently.product-shell-official-appshell--tail-prefetches-history-until-the-band-is-fullfails in the same full-smoke run on this branch and on the base commit (pre-existing, unrelated).AI use
Select exactly one:
Tool(s) and scope: Maka — root-caused the regression, wrote the fix and the story assertion, and drafted this description.
Checklist
Does this PR entail a change in behavior?