fix(window): align traffic lights with the sidebar icon column - #2144
Merged
Conversation
The close button's centre sat 3pt left of the sidebar icon column, so the window's top-left read as two near-miss columns. Moves trafficLightPosition.x 14 -> 17 to put the two on one vertical line. 17 rather than 18: the centre is x + 7, because the disc measures 14pt, not the 12pt it is usually quoted as. Read off screenshots of the running window (Playwright cannot capture OS chrome), and all three values were built and re-measured rather than extrapolated: x=14 is off by 3.08pt, x=17 by 0.08pt, x=18 by 0.92pt the other way. Collapsed state needs no separate value: the collapsed rail is --spacing-12 = 48 = 8 + 32 + 8, so the icon slot centres on 24 in both states.
AidenNovak
pushed a commit
to AidenNovak/maka-agent
that referenced
this pull request
Aug 7, 2026
…c lights The macOS traffic-light cluster is ~54px wide (x 17..71: 14px discs on 20px centres — main-window.ts, apache#2144) but the collapsed rail is 48px, so the yellow disc straddled the rail/plate seam and the green disc sat on the plate's own top-left corner. No position fits the cluster inside a 48px rail, so the seam is removed from under it instead. Collapsed, the rail puts on the plate's material (--agents-content-area-bg) and the plate docks flush under the titlebar (top margin and top corners to zero): one continuous surface where the lights sit. All three properties ease with the existing collapse width animation (--duration-large). Expanded keeps the floating-plate design untouched. This is the deliberate successor to the repaint apache#2187 removed: that one wore --color-background-surface, which light mode happened to share with the plate and dark mode did not — a third tone under the light cluster. Wearing the plate's own token fuses light and dark by construction. The sidebar-geometry material contract moves with the change: expanded still asserts rail == column (the apache#2187 regression lock), collapsed now asserts rail == plate plus flush margin/radius, compared as painted RGBA bytes so palettes and themes survive.
AidenNovak
pushed a commit
to AidenNovak/maka-agent
that referenced
this pull request
Aug 9, 2026
…c lights The macOS traffic-light cluster is ~54px wide (x 17..71: 14px discs on 20px centres — main-window.ts, apache#2144) but the collapsed rail is 48px, so the yellow disc straddled the rail/plate seam and the green disc sat on the plate's own top-left corner. No position fits the cluster inside a 48px rail, so the seam is removed from under it instead. Collapsed, the rail puts on the plate's material (--agents-content-area-bg) and the plate docks flush under the titlebar (top margin and top corners to zero): one continuous surface where the lights sit. All three properties ease with the existing collapse width animation (--duration-large). Expanded keeps the floating-plate design untouched. This is the deliberate successor to the repaint apache#2187 removed: that one wore --color-background-surface, which light mode happened to share with the plate and dark mode did not — a third tone under the light cluster. Wearing the plate's own token fuses light and dark by construction. The sidebar-geometry material contract moves with the change: expanded still asserts rail == column (the apache#2187 regression lock), collapsed now asserts rail == plate plus flush margin/radius, compared as painted RGBA bytes so palettes and themes survive.
M4n5ter
pushed a commit
to AidenNovak/maka-agent
that referenced
this pull request
Aug 26, 2026
…c lights The macOS traffic-light cluster is ~54px wide (x 17..71: 14px discs on 20px centres — main-window.ts, apache#2144) but the collapsed rail is 48px, so the yellow disc straddled the rail/plate seam and the green disc sat on the plate's own top-left corner. No position fits the cluster inside a 48px rail, so the seam is removed from under it instead. Collapsed, the rail puts on the plate's material (--agents-content-area-bg) and the plate docks flush under the titlebar (top margin and top corners to zero): one continuous surface where the lights sit. All three properties ease with the existing collapse width animation (--duration-large). Expanded keeps the floating-plate design untouched. This is the deliberate successor to the repaint apache#2187 removed: that one wore --color-background-surface, which light mode happened to share with the plate and dark mode did not — a third tone under the light cluster. Wearing the plate's own token fuses light and dark by construction. The sidebar-geometry material contract moves with the change: expanded still asserts rail == column (the apache#2187 regression lock), collapsed now asserts rail == plate plus flush margin/radius, compared as painted RGBA bytes so palettes and themes survive.
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.
改了什么
main-window.ts的MAIN_WINDOW_TRAFFIC_LIGHT_POSITION.x14 → 17。y 不动。为什么
关闭按钮圆心比侧栏图标列中心偏左 3pt,窗口左上角读起来是两条差一点的竖线,不是一条。
是 17 不是 18:首灯中心 =
x + 7,因为灯径实测 14pt,不是常被引用的 12pt。对齐目标是图标列中心 24(item 左缘 8 + 32pt 图标槽的一半),所以 x = 24 − 7 = 17。
收起态不需要单独处理:收起轨宽
--spacing-12= 48 = 8 + 32 + 8,图标槽中心同样是 24,一个常量两态都对。
怎么验的
Playwright 截不到 OS 原生 chrome,所以直接读运行窗口截图的像素(Retina 2x,量差值不量绝对坐标)。
三个值都改常量 + 重新构建 + 重启 + 重新量,没有靠外推:
测量自检:红盘 bbox 中心 == 亮度加权质心(差 0.00px);图标列取 3 个图标,sd = 0.24 物理像素。
build / typecheck / format:check / lint / check:release 全绿。全仓无任何测试引用这个常量。