@kabmo-labs/kabmo 0.18.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +43 -13
  2. package/dist/client/index.html +3 -3
  3. package/dist/client/index.js +485 -484
  4. package/dist/client/static/js/index-0721wrkf.css +1 -0
  5. package/dist/client/static/js/{index-tc09dtca.js → index-zg32n2sk.js} +778 -777
  6. package/dist/client/static/{manifest-42r8wcmg.webmanifest → manifest-q6h8k9e0.webmanifest} +1 -1
  7. package/index.html +1 -1
  8. package/marketplace/plugins/command-runner/package.json +3 -2
  9. package/marketplace/plugins/git-forge/package.json +3 -2
  10. package/marketplace/plugins/session-info/package.json +3 -2
  11. package/marketplace/plugins/stats/package.json +3 -2
  12. package/package.json +3 -1
  13. package/public/manifest.webmanifest +1 -1
  14. package/src/client/components/auth/login-screen/index.tsx +2 -1
  15. package/src/client/components/common/ComposerPicker.tsx +1 -1
  16. package/src/client/components/common/FolderPicker.tsx +2 -2
  17. package/src/client/components/common/Modal.tsx +2 -2
  18. package/src/client/components/common/PWAInstallButton.tsx +2 -2
  19. package/src/client/components/common/ViewportSelector.tsx +1 -1
  20. package/src/client/components/common/anchored-menu/index.tsx +5 -1
  21. package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +2 -1
  22. package/src/client/components/common/brand-wordmark/index.test.tsx +13 -2
  23. package/src/client/components/common/brand-wordmark/index.tsx +13 -2
  24. package/src/client/components/common/checkbox/style.test.ts +142 -0
  25. package/src/client/components/common/checkbox/style.ts +51 -0
  26. package/src/client/components/common/context-usage-button/index.tsx +2 -2
  27. package/src/client/components/common/file-icon/index.tsx +23 -9
  28. package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
  29. package/src/client/components/common/markdown-review/ReviewPopover.tsx +1 -1
  30. package/src/client/components/common/panel-mark/index.test.tsx +124 -0
  31. package/src/client/components/common/panel-mark/index.tsx +105 -0
  32. package/src/client/components/common/provider-icon/glyphs.test.ts +1 -1
  33. package/src/client/components/common/provider-icon/index.test.ts +14 -0
  34. package/src/client/components/common/provider-icon/index.tsx +4 -0
  35. package/src/client/components/common/provider-icon/resolve.test.ts +8 -7
  36. package/src/client/components/common/provider-icon/resolve.ts +16 -3
  37. package/src/client/components/common/session-actions-menu/index.tsx +1 -1
  38. package/src/client/components/common/toolbar-row/index.tsx +1 -1
  39. package/src/client/components/layout/ActivityBar.tsx +22 -3
  40. package/src/client/components/layout/LeftDock.tsx +9 -2
  41. package/src/client/components/layout/PanelVisibilityMenu.tsx +1 -1
  42. package/src/client/components/layout/WindowAura.tsx +27 -0
  43. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -1
  44. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +2 -2
  45. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +11 -2
  46. package/src/client/components/layout/desktop-layout/index.tsx +3 -1
  47. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +3 -3
  48. package/src/client/components/layout/session-sidebar/Header.tsx +1 -1
  49. package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
  50. package/src/client/components/layout/session-sidebar/Toolbar.tsx +1 -1
  51. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +2 -2
  52. package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +1 -1
  53. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +13 -5
  54. package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
  55. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +2 -1
  56. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +2 -2
  57. package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
  58. package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
  59. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +1 -1
  60. package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
  61. package/src/client/components/mobile/panel-chips.tsx +10 -2
  62. package/src/client/components/settings/Modal.tsx +4 -4
  63. package/src/client/components/settings/ProjectSelectorDropdown.tsx +2 -2
  64. package/src/client/components/settings/apply-side-effects.test.ts +30 -0
  65. package/src/client/components/settings/apply-side-effects.ts +14 -0
  66. package/src/client/components/settings/categories/AppearanceSettings.tsx +6 -0
  67. package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -1
  68. package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -1
  69. package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +144 -0
  70. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.test.tsx +120 -0
  71. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +180 -0
  72. package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +2 -1
  73. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +2 -2
  74. package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +1 -1
  75. package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +1 -1
  76. package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +21 -3
  77. package/src/client/components/settings/categories/panel-plugins/GitFreshness.test.tsx +46 -0
  78. package/src/client/components/settings/categories/panel-plugins/GitFreshness.tsx +1 -1
  79. package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +7 -9
  80. package/src/client/components/settings/categories/panel-plugins/PluginCard.test.tsx +149 -0
  81. package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +34 -7
  82. package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +66 -2
  83. package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +47 -10
  84. package/src/client/components/settings/categories/panel-plugins/Section.tsx +7 -1
  85. package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +35 -2
  86. package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -1
  87. package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +2 -1
  88. package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +1 -1
  89. package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -1
  90. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +2 -2
  91. package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +3 -2
  92. package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
  93. package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +3 -2
  94. package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +2 -1
  95. package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +1 -1
  96. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
  97. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
  98. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +3 -3
  99. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +2 -2
  100. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
  101. package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +4 -3
  102. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
  103. package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +1 -1
  104. package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +2 -2
  105. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
  106. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
  107. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +2 -6
  108. package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +1 -1
  109. package/src/client/components/workspace/diff-panel/index.tsx +2 -2
  110. package/src/client/components/workspace/editor/PluginRail.tsx +1 -1
  111. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
  112. package/src/client/components/workspace/editor/TabContextMenu.tsx +1 -1
  113. package/src/client/components/workspace/editor/Tabs.tsx +1 -1
  114. package/src/client/components/workspace/file-explorer/ContextMenu.tsx +1 -1
  115. package/src/client/components/workspace/file-explorer/Modals.tsx +10 -10
  116. package/src/client/components/workspace/file-explorer/RootMenu.tsx +1 -1
  117. package/src/client/components/workspace/git-panel/BranchToolbar.test.tsx +130 -0
  118. package/src/client/components/workspace/git-panel/BranchToolbar.tsx +21 -11
  119. package/src/client/components/workspace/git-panel/CommitBox.tsx +2 -1
  120. package/src/client/components/workspace/git-panel/Modals.tsx +2 -2
  121. package/src/client/components/workspace/git-panel/StashSection.tsx +2 -1
  122. package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -1
  123. package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +2 -1
  124. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -2
  125. package/src/client/components/workspace/git-panel/index.tsx +7 -0
  126. package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
  127. package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
  128. package/src/client/components/workspace/plugin-panel/catalog.tsx +7 -0
  129. package/src/client/components/workspace/plugin-panel/resolve.tsx +4 -0
  130. package/src/client/components/workspace/search-panel/Body.tsx +1 -1
  131. package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +1 -1
  132. package/src/client/glass-sticky.test.ts +46 -0
  133. package/src/client/glass.css +795 -0
  134. package/src/client/glass.test.ts +306 -0
  135. package/src/client/hooks/ui/glass-support.ts +57 -0
  136. package/src/client/hooks/ui/icon-style.ts +59 -0
  137. package/src/client/hooks/ui/stuck-header.test.ts +213 -0
  138. package/src/client/hooks/ui/stuck-header.ts +122 -0
  139. package/src/client/hooks/ui/style-attributes.test.ts +120 -0
  140. package/src/client/hooks/ui/surface-style.ts +56 -0
  141. package/src/client/hooks/workspace/panel-hues.ts +23 -0
  142. package/src/client/hooks/workspace/panel-registry.ts +8 -4
  143. package/src/client/main.tsx +10 -0
  144. package/src/client/tailwind.css +264 -11
  145. package/src/server/lib/assets/shell-attributes.server.ts +80 -0
  146. package/src/server/lib/assets/shell-attributes.test.ts +86 -0
  147. package/src/server/lib/lifecycle/tls.test.ts +6 -1
  148. package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +1 -0
  149. package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +2 -30
  150. package/src/server/lib/omp/rpc/frame-fold.test.ts +55 -0
  151. package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
  152. package/src/server/lib/omp/rpc/manager.ts +2 -2
  153. package/src/server/lib/omp/rpc/process-helpers.ts +11 -0
  154. package/src/server/lib/omp/rpc/process.test.ts +106 -0
  155. package/src/server/lib/omp/rpc/process.ts +28 -4
  156. package/src/server/lib/omp/rpc/run-settle.server.ts +12 -0
  157. package/src/server/lib/omp/rpc/run-settle.test.ts +22 -0
  158. package/src/server/lib/omp/rpc/session-command-guards.ts +5 -0
  159. package/src/server/lib/omp/rpc/session-commands.test.ts +9 -1
  160. package/src/server/lib/omp/rpc/session-commands.ts +11 -0
  161. package/src/server/lib/omp/rpc/terminal-settle.ts +29 -7
  162. package/src/server/lib/panels/bundled-catalog.server.ts +1 -0
  163. package/src/server/lib/panels/git-update.server.test.ts +20 -0
  164. package/src/server/lib/panels/git-update.server.ts +20 -4
  165. package/src/server/lib/panels/manifest.test.ts +20 -0
  166. package/src/server/lib/panels/manifest.ts +12 -0
  167. package/src/server/lib/panels/scan.server.ts +4 -0
  168. package/src/server/lib/panels/sync.server.ts +9 -1
  169. package/src/server/lib/panels/update.server.test.ts +193 -0
  170. package/src/server/lib/panels/update.server.ts +210 -0
  171. package/src/server/lib/plugins/server-half.server.ts +42 -0
  172. package/src/server/lib/queue/delivery-dispatch.server.test.ts +48 -0
  173. package/src/server/lib/queue/delivery-harness.ts +8 -4
  174. package/src/server/lib/queue/delivery.server.test.ts +29 -0
  175. package/src/server/lib/queue/delivery.server.ts +39 -0
  176. package/src/server/lib/queue/store.server.test.ts +22 -2
  177. package/src/server/lib/queue/store.server.ts +33 -11
  178. package/src/server/lib/terminal/attach-replay.test.ts +26 -8
  179. package/src/server/plugins/ssr.ts +22 -5
  180. package/src/server/routes/panels/install-route.test.ts +238 -0
  181. package/src/server/routes/panels/install.ts +36 -64
  182. package/src/server/routes/panels/panel-routes.test-util.ts +6 -1
  183. package/src/server/routes/panels/routes.test.ts +1 -118
  184. package/src/shared/lib/icons/file-brand-color.ts +38 -0
  185. package/src/shared/lib/icons/icon-paint-css.test.ts +235 -0
  186. package/src/shared/lib/icons/icon-paint-css.ts +285 -0
  187. package/src/shared/lib/icons/icon-paint-panel.ts +109 -0
  188. package/src/shared/lib/icons/icon-tone.ts +166 -0
  189. package/src/shared/lib/icons/tint-hues.generated.ts +277 -0
  190. package/src/shared/lib/icons/tint.test.ts +333 -0
  191. package/src/shared/lib/icons/tint.ts +248 -0
  192. package/src/shared/lib/models/provider/brand-color.test.ts +116 -0
  193. package/src/shared/lib/models/provider/brand-color.ts +103 -0
  194. package/src/shared/lib/omp/rpc/frame.test.ts +65 -0
  195. package/src/shared/lib/omp/rpc/frame.ts +58 -3
  196. package/src/shared/lib/panels/update.test.ts +107 -0
  197. package/src/shared/lib/panels/update.ts +73 -0
  198. package/src/shared/lib/settings/defaults.ts +4 -0
  199. package/src/shared/lib/theme/catalog.test.ts +5 -4
  200. package/src/shared/lib/theme/catalog.ts +18 -3
  201. package/src/shared/lib/theme/color.ts +50 -0
  202. package/src/shared/lib/theme/glass-support.test.ts +38 -0
  203. package/src/shared/lib/theme/glass-support.ts +73 -0
  204. package/src/shared/lib/theme/icon-style.test.ts +74 -0
  205. package/src/shared/lib/theme/icon-style.ts +90 -0
  206. package/src/shared/lib/theme/legibility.ts +91 -0
  207. package/src/shared/lib/theme/palettes/dark-extended.ts +152 -0
  208. package/src/shared/lib/theme/palettes/light-extended.ts +157 -0
  209. package/src/shared/lib/theme/surface-style.test.ts +68 -0
  210. package/src/shared/lib/theme/surface-style.ts +91 -0
  211. package/src/shared/lib/theme/theme.test.ts +11 -7
  212. package/src/shared/lib/workspace/panel-hues.test.ts +68 -0
  213. package/src/shared/lib/workspace/panel-hues.ts +57 -0
  214. package/src/shared/types/panels-registry.ts +6 -0
  215. package/src/shared/types/panels.ts +14 -0
  216. package/src/shared/types/settings/state.ts +26 -0
  217. package/src/test-support/fake-omp-frames.ts +163 -0
  218. package/dist/client/static/js/index-hp75vsv9.css +0 -1
  219. /package/src/{client/components/common/file-icon/brand-paths.ts → shared/lib/icons/file-brand-paths.ts} +0 -0
@@ -0,0 +1,795 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /*
7
+ * The GLASS surface material, as one recipe.
8
+ *
9
+ * `[data-surface="glass"]` on `<html>` switches the shell from opaque panels to
10
+ * one frosted plane over a palette-coloured glow. The tokens below are the whole
11
+ * system; every rule in this file reads them, and so does the composer's own
12
+ * `glass` style — a second recipe for the same material is the defect, not the
13
+ * feature.
14
+ *
15
+ * Four facts are load-bearing, each measured against the reference this follows
16
+ * (ghostex.dev's demo window) with `getComputedStyle`:
17
+ *
18
+ * 1. **The PLANE owns the blur, not the panels.** One `backdrop-filter` per
19
+ * window; the sidebar, navbar and cards above it are flat tints. Blurring
20
+ * every panel costs one pass per panel and is what makes a frosted UI drop
21
+ * frames while a transcript streams.
22
+ * 2. **The blur needs something behind it.** The `.app-window-aura` blobs are
23
+ * the only colour under the plane — without them a frosted plane over a flat
24
+ * canvas is indistinguishable from a translucent one.
25
+ * 3. **Tint rises and rim falls on a dark palette.** The reference ships
26
+ * `--gxd-glass-a: .5` / a white rim in light and `.62` / `#ffffff12` in dark;
27
+ * reusing the light rim on a dark theme paints a glowing outline.
28
+ * 4. **Contrast comes from the tint, never the blur.** The plane keeps the
29
+ * palette's paper at 50% (light) / 62% (dark) and the chrome at 34-38%, so
30
+ * body text stays above the 4.5:1 floor. A raised surface — a card, a
31
+ * dropdown, a tool call — keeps its own opaque `bg-paper` instead: those are
32
+ * read, and a translucent one would put the transcript behind its text.
33
+ *
34
+ * A browser without `backdrop-filter`, or a user who asked for reduced
35
+ * transparency, gets the opaque palette instead of a translucent pane with no
36
+ * blur behind it — a 50% paper plane over the canvas is legible, a 50% plane
37
+ * over the transcript is not.
38
+ */
39
+
40
+ :root {
41
+ /* The shared material. Every value here is what the composer's `glass` style
42
+ * shipped alone; with `data-surface="classic"` (no attribute) it is still the
43
+ * only consumer, so nothing about the classic look moves. */
44
+ --glass-blur: 16px;
45
+ --glass-sat: 115%;
46
+ --glass-bright: 100%;
47
+ --glass-tint: 58%;
48
+ --glass-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
49
+ /* A CARD's own frost, deliberately NOT the plane's: a 30px blur behind a card
50
+ * floating over a static transcript is a pass nobody can see. One token so the
51
+ * composer and any later card agree on the number — the composer's `glass`
52
+ * style is its only consumer today.
53
+ *
54
+ * 24px and saturate 160%, not the old 16/115: the card sits over the aura, and
55
+ * at 16px with a 15% saturation the frost had nothing to show — measured, the
56
+ * composer composited 1.09:1 against the surface beside it, i.e. an invisible
57
+ * card ("composer type style glass sepertinya kurang glass"). */
58
+ --glass-card-filter: blur(24px) saturate(160%);
59
+ /* A dialog's frost. Wider than a card's because it covers a dimmed app rather
60
+ * than a static surface, and the blur is the only thing that reveals the veil
61
+ * is there at all. */
62
+ --glass-overlay-filter: blur(24px) saturate(150%);
63
+ /* The flat tint: the plane's fill, the chrome's, the overlay's, and the
64
+ * composer card's. The window additionally layers `--glass-glow` on top. */
65
+ --glass-panel: color-mix(in srgb, var(--theme-paper) var(--glass-tint), transparent);
66
+ /* The window plane's light: IMAGE layers only. A colour cannot live in a
67
+ * `background-image` layer (the browser drops the whole layer to `none`, which
68
+ * measured as an untinted plane), so the tint is `--glass-panel` on
69
+ * `background-color` and this token carries the gradients. */
70
+ --glass-glow: none;
71
+ /* A CARD's sheen: ONE soft highlight along the top, and nothing else.
72
+ *
73
+ * It used to be a 118deg `#fff 26%` sweep plus a second gradient plus an ink
74
+ * shade. Measured along the card's top margin, that made the edge itself a
75
+ * ramp from luminance 0.054 to 0.278 — a bright diagonal streak across the top
76
+ * of a 620px card, which is exactly what "composernya jelek, gk perlu silau
77
+ * gitu" was looking at. One highlight at 12% (light) / 7% (dark) keeps the
78
+ * card lit at its top edge and measures a 0.012 spread across the same margin
79
+ * instead of 0.224.
80
+ *
81
+ * The ink shade is gone with it: a card whose fill is already paper does not
82
+ * need a darkening pass on its face to prove it is a surface — the rim and the
83
+ * shadow say that, and they say it without touching the text's background. */
84
+ --glass-sheen: linear-gradient(
85
+ 180deg,
86
+ color-mix(in srgb, #fff 12%, transparent) 0%,
87
+ transparent 32%
88
+ );
89
+ /* A CARD's own light — in the DARK variant only, and the split is measured.
90
+ *
91
+ * `--theme-info` is darker than paper, so a corner wash on a light theme does
92
+ * not read as light: it reads as a smudge. Measured on the docked card, the
93
+ * top-left box came out BELOW the card's own body in luminance at every alpha
94
+ * tried — `(230,232,233)` against `(241,247,236)` at 14%, and the corner's
95
+ * chroma never cleared 12 against the body's own 11. On a dark theme the same
96
+ * token is brighter than ink, so it LIFTS the corner, which is the effect the
97
+ * token exists for. Light therefore has no bloom at all and leans on the rim,
98
+ * the sheen and the shadow; dark gets one low-alpha wash.
99
+ *
100
+ * Two hues was the "silau" report: a blue corner AND a violet corner measured
101
+ * 3.76:1 (top-left) and 2.59:1 (bottom-right) above the card's own body — two
102
+ * coloured glows competing with the draft text between them. One wash at 12%
103
+ * measures 1.83:1, chroma 20 instead of 46. */
104
+ --glass-bloom: none;
105
+ /* A RAISED CARD — a tool call, a notice, a result panel, and the composer's
106
+ * `glass` frame. Tint only, no blur: a transcript can hold a hundred of them,
107
+ * and a `backdrop-filter` each is a pass each.
108
+ *
109
+ * **Surface-INDEPENDENT, because a composer STYLE is not a surface style**: the
110
+ * `glass` composer is offered in the classic look too, so the token lives here
111
+ * and in the variant block rather than under `[data-surface="glass"]`. Read
112
+ * from the surface-scoped block it was undefined in the classic look, and
113
+ * `background-color: var(--glass-card)` computed to `rgba(0,0,0,0)` — a card
114
+ * with no fill at all.
115
+ *
116
+ * 66%, and the number is nearly free: measured across 55-92% the composited
117
+ * card stays within a few points of paper and `text-ink` holds 17.2-17.5:1
118
+ * (light) / 6.3-6.8:1 (dark), because the plane under it is already half paper.
119
+ * The lowest value that still reads as a card is chosen, so the aura's colour
120
+ * shows through instead of being covered by a near-opaque tint. */
121
+ --glass-card: color-mix(in srgb, var(--theme-paper) 66%, transparent);
122
+ /* A POPOVER's bloom: one low-alpha wash, dark variant only.
123
+ *
124
+ * A dropdown sits over live content, so unlike the docked composer its
125
+ * `backdrop-filter` has something real to sample and the material works in
126
+ * light without any colour. On a dark theme the tint over dark content gives no
127
+ * lift at all, so a single wash in the top-left keeps the panel reading as a
128
+ * lit pane. Two hues measured as two competing glows (the "silau" report);
129
+ * 16% measures colour without becoming a gradient. */
130
+ --glass-popover-bloom: none;
131
+ /* A DIALOG's light. A dialog is the largest surface in the app — the settings
132
+ * panel is 1280x810 — so it needs the material most and shows it worst: at 96%
133
+ * tint the veil behind contributes 4%, which measured as a uniform fill and
134
+ * nothing else ("setting modal juga belum glass"). A bloom SPREAD over a panel
135
+ * that size is a wash; the light has to be LOCAL, so the radii are narrow (36%
136
+ * x 44%) and pinned to the corners.
137
+ *
138
+ * Light takes a WHITE corner and a top highlight and NO hue: `--theme-info` is
139
+ * darker than paper, so a coloured corner there darkens the panel instead of
140
+ * lighting it (measured 212 against 220 on the bottom-right). Dark takes the
141
+ * palette's two hues, because over ink they lift.
142
+ *
143
+ * **The peak sits OUTSIDE the panel (`-4% -8%`), not on its corner.** Pinned
144
+ * at `0% 0%` the light lands on the settings nav and drags its 12px labels from
145
+ * 3.8:1 to 3.0:1; moved outside it lifts the corner chroma 17 → 22 while the
146
+ * labels hold 3.97:1, i.e. the material becomes visible without printing on the
147
+ * text. The alphas are the quiet ones: this surface is the largest in the app,
148
+ * and a loud bloom here is the "silau" report again. */
149
+ --glass-dialog-bloom:
150
+ linear-gradient(
151
+ 180deg,
152
+ color-mix(in srgb, #fff 16%, transparent) 0%,
153
+ transparent 24%
154
+ ),
155
+ radial-gradient(
156
+ 36% 44% at 0% 0%,
157
+ color-mix(in srgb, #fff 26%, transparent),
158
+ transparent 100%
159
+ ),
160
+ radial-gradient(
161
+ 30% 38% at 100% 100%,
162
+ color-mix(in srgb, #fff 12%, transparent),
163
+ transparent 100%
164
+ );
165
+ /* A CARD's rim, softer than the window's.
166
+ *
167
+ * The window's `--glass-edge` includes `inset 0 1.5px 0 #fff 95%` — a hard
168
+ * white line, which is right for a 1400px app frame and reads as a lit strip
169
+ * across the top of a 620px composer. A card gets a hairline plus a gentle top
170
+ * light instead; the edge is still the thing that makes the surface legible
171
+ * (measured 1.15:1 against the paper beside it), it just stops glowing. */
172
+ --glass-card-edge: inset 0 0 0 1px color-mix(in srgb, var(--theme-ink) 8%, transparent),
173
+ inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
174
+ --glass-edge: inset 0 0 0 1px color-mix(in srgb, var(--theme-ink) 12%, transparent);
175
+ --glass-shadow: 0 1px 0 0 color-mix(in srgb, var(--theme-ink) 6%, transparent);
176
+ --glass-hairline: color-mix(in srgb, var(--theme-ink) 10%, transparent);
177
+ --glass-chrome: var(--theme-paper);
178
+ }
179
+
180
+ /*
181
+ * The app window. Light: paper at half strength under a white highlight and a
182
+ * cool bottom-right wash. Dark: ink at 62% with a 16%-white top rim, because a
183
+ * bright rim on a dark palette reads as a glow.
184
+ */
185
+ [data-surface="glass"] {
186
+ --glass-blur: 30px;
187
+ --glass-sat: 185%;
188
+ --glass-bright: 103%;
189
+ --glass-tint: 50%;
190
+ --glass-glow:
191
+ radial-gradient(
192
+ 120% 70% at 0% 0%,
193
+ color-mix(in srgb, #fff 50%, transparent),
194
+ transparent 55%
195
+ ),
196
+ radial-gradient(
197
+ 80% 60% at 100% 100%,
198
+ color-mix(in srgb, var(--theme-info) 40%, transparent),
199
+ transparent 65%
200
+ );
201
+ --glass-edge:
202
+ inset 0 0 0 1px color-mix(in srgb, #fff 60%, transparent),
203
+ inset 0 1.5px 0 color-mix(in srgb, #fff 95%, transparent),
204
+ inset 0 -1px 0 color-mix(in srgb, var(--theme-ink) 18%, transparent);
205
+ --glass-shadow:
206
+ 0 1px 2px color-mix(in srgb, var(--theme-ink) 6%, transparent),
207
+ 0 26px 50px -22px color-mix(in srgb, var(--theme-ink) 30%, transparent),
208
+ 0 70px 140px -40px color-mix(in srgb, var(--theme-ink) 30%, transparent);
209
+ --glass-hairline: color-mix(in srgb, var(--theme-ink) 7.5%, transparent);
210
+ --glass-chrome: color-mix(in srgb, var(--theme-paper) 34%, transparent);
211
+ /* A DIALOG's fill. It sits over a veil that now darkens in both variants
212
+ * (`.modal-scrim`), so the frost samples a dimmed app — which is what makes a
213
+ * translucent dialog read as glass instead of a grey wash.
214
+ *
215
+ * **96%, and the number is a contrast budget, not a taste.** The veil behind a
216
+ * dialog is much darker than the paper (light: ink at 40%; dark: black at
217
+ * 42%), so every point of transparency darkens the panel: measured, 88% put a
218
+ * light dialog at `rgb(233,230,225)` against its own paper `#faf8f3` and 94%
219
+ * still read 10 points low — a grey panel, which is the "kok gelap" report this
220
+ * tier started with. At 96% the panel is its paper within 4 points in both
221
+ * variants, and the material reads through the sheen, the rim and the blur at
222
+ * the edges — which is where glass is legible anyway, not in the middle of a
223
+ * paragraph. */
224
+ --glass-overlay: color-mix(in srgb, var(--theme-paper) 96%, transparent);
225
+ /* A POPOVER floats over live content with no veil, so its blur is the only
226
+ * thing separating it from what it covers — hence a slightly lighter tint
227
+ * than a dialog, and a sheen so the panel reads as lifted.
228
+ *
229
+ * **84% on light, 92% on dark, and the split is measured.** Light paper is
230
+ * within 3 points of white, so the tint is nearly free there: worst-case menu
231
+ * text over a WHITE backdrop (a screenshot under a dropdown) reads 4.93:1 at
232
+ * 84% and 4.89:1 at 92% — the same number, so the lower tint buys the
233
+ * transparency at no cost. On dark it is NOT free: the same text at 78% drops
234
+ * to 2.88:1 while 92% holds 4.59:1, because bright code behind a menu is what
235
+ * a dark theme actually has under it. */
236
+ --glass-popover: color-mix(in srgb, var(--theme-paper) 84%, transparent);
237
+ /* A STUCK sticky header's fill — see `.glass-sticky[data-stuck]`.
238
+ *
239
+ * OPAQUE, and mixed toward the CANVAS, not transparent. Two measured reasons.
240
+ * Transparent paper darkens whatever it lands on, so the header read darker
241
+ * than the column it belongs to ("hitam banget"). And plain paper is not the
242
+ * column's colour either: the sidebar is chrome over the plane, i.e.
243
+ * `paper 34%` over `paper 50% over canvas`, which composites to about
244
+ * `67% paper + 33% canvas`. Mixing to THAT is what makes the stuck header the
245
+ * sidebar's own surface instead of a darker patch of it.
246
+ *
247
+ * The last 4% is `--theme-info`: the column's colour is not neutral, it is the
248
+ * plane's aura showing through, and a neutral fill read as BLACK against it
249
+ * ("kenapa warnanya hitam banget, tidak sama dengan sidebar background") even
250
+ * when its luminance matched. Measured: neutral `(45,51,59)` against the
251
+ * sidebar's `(40,48,60)` — same brightness, half the chroma (14 against 20). */
252
+ --glass-stuck: color-mix(
253
+ in srgb,
254
+ color-mix(in srgb, var(--theme-paper) 67%, var(--theme-canvas)) 96%,
255
+ var(--theme-info)
256
+ );
257
+ /* The colour a stuck label's halo is drawn in: the sidebar's own composite,
258
+ * opaque so it can occlude glyphs behind. */
259
+ --glass-halo: color-mix(in srgb, var(--theme-paper) 78%, var(--theme-canvas));
260
+ /* Light needs LESS glow than dark: on paper the same alpha reads as a wash of
261
+ * colour, while on ink it is the only thing making the frost visible. */
262
+ --glass-aura: 0.42;
263
+ }
264
+
265
+ /*
266
+ * The card's bloom is the one material value that does NOT follow the surface
267
+ * style: the composer's `glass` style is offered in the classic look too, so the
268
+ * token is keyed to the variant alone.
269
+ */
270
+ [data-theme-variant="dark"] {
271
+ --glass-sheen: linear-gradient(
272
+ 180deg,
273
+ color-mix(in srgb, #fff 7%, transparent) 0%,
274
+ transparent 32%
275
+ );
276
+ --glass-bloom: radial-gradient(
277
+ 70% 82% at 0% -16%,
278
+ color-mix(in srgb, var(--theme-info) 12%, transparent),
279
+ transparent 54%
280
+ );
281
+ --glass-card-edge: inset 0 0 0 1px color-mix(in srgb, #fff 6%, transparent),
282
+ inset 0 1px 0 color-mix(in srgb, #fff 9%, transparent);
283
+ --glass-popover-bloom: radial-gradient(
284
+ 85% 100% at 0% -18%,
285
+ color-mix(in srgb, var(--theme-info) 16%, transparent),
286
+ transparent 52%
287
+ );
288
+ --glass-dialog-bloom:
289
+ linear-gradient(
290
+ 180deg,
291
+ color-mix(in srgb, #fff 3%, transparent) 0%,
292
+ transparent 22%
293
+ ),
294
+ radial-gradient(
295
+ 30% 36% at -4% -8%,
296
+ color-mix(in srgb, var(--theme-info) 7%, transparent),
297
+ transparent 100%
298
+ ),
299
+ radial-gradient(
300
+ 26% 32% at 104% 106%,
301
+ color-mix(in srgb, var(--theme-meta) 14%, transparent),
302
+ transparent 100%
303
+ );
304
+ /* The dark plane is 62% paper, so the same measurement holds: the card
305
+ * composites to `(36,42,49)`-`(42,48,51)` against paper `(40,44,52)`, and
306
+ * `text-ink` reads 6.3-6.8:1 — the same as an opaque card. */
307
+ --glass-card: color-mix(in srgb, var(--theme-paper) 70%, transparent);
308
+ }
309
+
310
+ [data-surface="glass"][data-theme-variant="dark"] {
311
+ --glass-blur: 34px;
312
+ --glass-sat: 170%;
313
+ --glass-bright: 100%;
314
+ --glass-tint: 62%;
315
+ --glass-glow:
316
+ radial-gradient(
317
+ 120% 70% at 0% 0%,
318
+ color-mix(in srgb, #fff 10%, transparent),
319
+ transparent 55%
320
+ ),
321
+ radial-gradient(
322
+ 80% 60% at 100% 100%,
323
+ color-mix(in srgb, var(--theme-meta) 22%, transparent),
324
+ transparent 65%
325
+ );
326
+ --glass-edge:
327
+ inset 0 0 0 1px color-mix(in srgb, #fff 7%, transparent),
328
+ inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent),
329
+ inset 0 -1px 0 color-mix(in srgb, #000 45%, transparent);
330
+ --glass-chrome: color-mix(in srgb, var(--theme-paper) 38%, transparent);
331
+ --glass-overlay: color-mix(in srgb, var(--theme-paper) 96%, transparent);
332
+ --glass-popover: color-mix(in srgb, var(--theme-paper) 92%, transparent);
333
+ /* The same composite for the DARK chrome: `paper 38%` over `paper 62% over
334
+ * canvas` is about `76% paper + 24% canvas`, which is lighter than the paper
335
+ * itself — the reason a transparent fill read as black here. The 6% info is
336
+ * the aura's cast, measured: it brings the fill from `(45,51,59)` to the
337
+ * sidebar's `(40,48,60)` chroma. */
338
+ --glass-stuck: color-mix(
339
+ in srgb,
340
+ color-mix(in srgb, var(--theme-paper) 76%, var(--theme-canvas)) 94%,
341
+ var(--theme-info)
342
+ );
343
+ --glass-halo: color-mix(in srgb, var(--theme-paper) 78%, var(--theme-canvas));
344
+ --glass-aura: 0.55;
345
+ }
346
+
347
+ /*
348
+ * The window itself.
349
+ *
350
+ * `isolation: isolate` keeps the aura's negative z-index inside this element, so
351
+ * the glow cannot escape over a modal. The plane is a pseudo-element rather than
352
+ * a wrapper because `<div id="app">` is the app's only mount point — a wrapper
353
+ * div would become the flex parent the whole layout measures against.
354
+ */
355
+ [data-surface="glass"] .app-window {
356
+ isolation: isolate;
357
+ box-shadow: var(--glass-shadow);
358
+ }
359
+
360
+ [data-surface="glass"] .app-window::before {
361
+ content: '';
362
+ position: absolute;
363
+ inset: 0;
364
+ z-index: -1;
365
+ pointer-events: none;
366
+ background-color: var(--glass-panel);
367
+ background-image: var(--glass-glow);
368
+ box-shadow: var(--glass-edge);
369
+ backdrop-filter: var(--glass-filter);
370
+ -webkit-backdrop-filter: var(--glass-filter);
371
+ }
372
+
373
+ /* The specular sheen. Its own element in the reference (`i.gxd-sheen`); a second
374
+ * pseudo-element here, because the plane already owns `::before` and a
375
+ * background blend of both would put the highlight under the tint. */
376
+ [data-surface="glass"] .app-window::after {
377
+ content: '';
378
+ position: absolute;
379
+ inset: 0;
380
+ z-index: -1;
381
+ pointer-events: none;
382
+ background:
383
+ linear-gradient(
384
+ 118deg,
385
+ color-mix(in srgb, #fff 42%, transparent) 0%,
386
+ transparent 26%
387
+ ),
388
+ radial-gradient(
389
+ 60% 40% at 78% 0%,
390
+ color-mix(in srgb, #fff 35%, transparent),
391
+ transparent 70%
392
+ );
393
+ opacity: 0.55;
394
+ mix-blend-mode: screen;
395
+ }
396
+ /* The plane and the sheen sit at NEGATIVE z-index, and `isolation: isolate` on
397
+ * the window keeps them inside it. That is the whole trick: no descendant is
398
+ * touched, so a `fixed inset-0` modal stays fixed and a transformed panel keeps
399
+ * its own stacking context. Forcing every direct child to `position: relative`
400
+ * would have made the first `fixed` child relative instead — and a modal that
401
+ * scrolls with the page is a defect, not a z-order preference. */
402
+
403
+ /*
404
+ * The glow under the plane: three palette-derived blobs, no hex. This is what
405
+ * the blur samples — the reference calls them `gxd-aura` and draws them just
406
+ * outside the window so the colour bleeds past its edge; a full-screen app has
407
+ * no outside, so they sit inside and the plane's rim does the bleeding.
408
+ */
409
+ [data-surface="glass"] .app-window-aura {
410
+ position: absolute;
411
+ inset: 0;
412
+ /* Behind the plane, which is behind everything else: the aura is what the
413
+ * blur samples, so it has to be the bottom-most layer of the window. */
414
+ z-index: -2;
415
+ pointer-events: none;
416
+ overflow: hidden;
417
+ }
418
+
419
+ [data-surface="glass"] .app-window-aura > i {
420
+ position: absolute;
421
+ display: block;
422
+ border-radius: 50%;
423
+ opacity: var(--glass-aura, 0.5);
424
+ background: radial-gradient(
425
+ closest-side,
426
+ color-mix(in srgb, var(--aura) 55%, transparent),
427
+ color-mix(in srgb, var(--aura) 18%, transparent) 60%,
428
+ transparent
429
+ );
430
+ }
431
+
432
+ [data-surface="glass"] .app-window-aura > i:nth-child(1) {
433
+ --aura: var(--theme-info);
434
+ width: 62%;
435
+ height: 86%;
436
+ top: 14%;
437
+ left: -12%;
438
+ }
439
+
440
+ [data-surface="glass"] .app-window-aura > i:nth-child(2) {
441
+ --aura: var(--theme-meta);
442
+ width: 68%;
443
+ height: 78%;
444
+ top: -16%;
445
+ right: -14%;
446
+ }
447
+
448
+ [data-surface="glass"] .app-window-aura > i:nth-child(3) {
449
+ --aura: var(--theme-success);
450
+ width: 66%;
451
+ height: 62%;
452
+ bottom: -18%;
453
+ right: 2%;
454
+ }
455
+
456
+ /*
457
+ * Canvas wells go transparent; paper surfaces stay opaque.
458
+ *
459
+ * This is the one structural rule of the material, and the split is the whole
460
+ * reason it is safe: `bg-canvas` is the app's GROUND (a chat well, an editor
461
+ * pane, the transcript's gutter), so revealing the plane there is exactly the
462
+ * intent. `bg-paper` is a SURFACE with content on it — a dropdown, a card, a
463
+ * dialog — and making 470 of those translucent would put the transcript behind
464
+ * every popover's text. A raised surface keeps its own `bg-paper` — it is READ,
465
+ * and translucency there costs contrast for a material nobody asked it for.
466
+ *
467
+ * The window itself is excluded: it keeps the palette's canvas as the material's
468
+ * ground, so the plane never depends on `<body>` — whose colour is pinned once
469
+ * per request by the first-frame style, which is exactly the layer that would go
470
+ * stale when the palette changes without a reload.
471
+ *
472
+ * A STICKY header is excluded too, and that exclusion is load-bearing rather than
473
+ * tidy: the phone drawer's header paints `bg-canvas` (its rows sit on canvas, see
474
+ * `WorkspaceHeader`), so it is a `.bg-canvas` inside `.app-window` — and THIS
475
+ * selector is (0,5,0) against the stuck fill's (0,4,0), so the well won and the
476
+ * pinned header stayed transparent. Measured at 412x900 with the drawer open and
477
+ * 420px scrolled: `data-stuck` set (after the scrollport fix), header pinned at
478
+ * the container's top edge, computed `background-color: rgba(0,0,0,0)` — an
479
+ * active sticky folder header with no surface, while the desktop column's
480
+ * `bg-paper` header (which this rule never matched) painted its fill. A sticky
481
+ * header is never a well: its own state decides, one rule below.
482
+ *
483
+ * A switch KNOB is excluded for the same reason, and it has to be excluded
484
+ * HERE: `bg-canvas` is the app's ground, but a knob uses it as an OPAQUE
485
+ * contrasting disc, and `bg-canvas` on `bg-ink/70` is what makes the control
486
+ * read as a toggle at all. Making it transparent deleted the knob — measured on
487
+ * the plugin switches, the 12px disc composited to `rgba(0,0,0,0)` and the
488
+ * control became a plain pill with no "on" position.
489
+ *
490
+ * It was first written as a SECOND rule ("…except a knob on a switch"), and that
491
+ * rule never applied once: `[role="switch"] .bg-canvas` is (0,4,0) and this
492
+ * selector is (0,5,0), so the well won and every knob on every surface — desktop
493
+ * and phone alike — painted nothing. A same-property override is a specificity
494
+ * race; an exclusion in the ONE rule that causes the problem is not. The mark is
495
+ * the switch ROLE rather than a class name, so any control that declares itself
496
+ * a switch owns its knob, whatever it paints it with.
497
+ */
498
+ [data-surface="glass"] .app-window .bg-canvas:not(.app-window):not(.glass-sticky):not([role="switch"] *) {
499
+ background-color: transparent;
500
+ }
501
+
502
+ /*
503
+ * A STICKY header: NOTHING at rest, a surface only while PINNED.
504
+ *
505
+ * The folder header in the `modern` sidebar is `sticky top-0`, so it shipped an
506
+ * opaque `bg-paper` to separate its label from the rows sliding under it. Under
507
+ * `[data-surface="glass"]` that is a hard strip across a sidebar that is
508
+ * otherwise one translucent surface ("belang"). Two fills were measured and
509
+ * removed — opaque `rgb(255,255,254)` over rows at `rgb(243,241,237)`, then paper
510
+ * at 74% — and then the BLUR was removed too, because a `backdrop-filter` is
511
+ * still a visible patch: it smears whatever passes under it (rows, their
512
+ * coloured icons, the aura) into a rectangle whose average differs from the
513
+ * rows beside it. Measured with the blur still on: band `(47,55,67)` against the
514
+ * rows below `(45,51,60)` — close, and still a patch a reader can see while
515
+ * scrolling.
516
+ *
517
+ * Three treatments were measured here and every one of them was a band, because
518
+ * ANY paint or filter on a full-width sticky strip is a rectangle:
519
+ *
520
+ * 1. the opaque `bg-paper`/`bg-canvas` it shipped with — `rgb(255,255,254)` over
521
+ * rows at `rgb(243,241,237)`;
522
+ * 2. paper at 74% — still a lighter strip;
523
+ * 3. `blur(24px) saturate(150%)`, the DIALOG tier's filter — the saturate
524
+ * amplified the aura's blue inside the band, measured `(49,56,68)` against
525
+ * rows at `(53,59,68)`: chroma +4.8, a visibly blue patch. Dropping the
526
+ * saturate fixed the hue (−0.3) but the BLUR itself still reads as a patch,
527
+ * because it smears whatever passes beneath it into a field whose texture no
528
+ * neighbour has.
529
+ *
530
+ * So at rest the header paints nothing at all: `background: none`, no
531
+ * `backdrop-filter`. Its pixels are then literally the sidebar's own — measured
532
+ * `(50,56,64)` with the header drawn against `(49,55,63)` with it hidden,
533
+ * Δ(1,1,1), which is its own controls and no surface.
534
+ *
535
+ * The fill comes back only while the header is STUCK (`data-stuck`, from
536
+ * `useStuckHeader`) — the one state where a row really does slide underneath and
537
+ * the label needs a field. That is the distinction the band reports were really
538
+ * about: a header that paints while overlapping rows is doing its job, one that
539
+ * paints at rest is a stripe. The label's halo follows the same state, so a
540
+ * resting header has neither.
541
+ */
542
+ [data-surface="glass"] .glass-sticky {
543
+ background-color: transparent;
544
+ background-image: none;
545
+ backdrop-filter: none;
546
+ -webkit-backdrop-filter: none;
547
+ }
548
+
549
+ [data-surface="glass"] .glass-sticky[data-stuck] {
550
+ background-color: var(--glass-stuck);
551
+ /* NO sheen and NO blur: the fill is opaque, so a `backdrop-filter` has nothing
552
+ * left to sample — and the white gradient a card carries lightened this 26px
553
+ * strip by up to 6%, which measured `(47,55,65)` against a sidebar at
554
+ * `(40,48,60)`: a lighter band instead of a darker one. The rim alone is what
555
+ * separates it. */
556
+ box-shadow: var(--glass-edge);
557
+ }
558
+
559
+ [data-surface="glass"] .glass-sticky[data-stuck] .glass-sticky-label {
560
+ text-shadow:
561
+ 0 0 6px var(--glass-halo),
562
+ 0 0 3px var(--glass-halo),
563
+ 0 0 10px var(--glass-halo);
564
+ }
565
+
566
+ /*
567
+ * Tier 1 — the chrome. A flat tint over the plane, no blur of its own. The
568
+ * hairline is a border rather than a shadow so it scales with the element.
569
+ */
570
+ [data-surface="glass"] .glass-chrome {
571
+ background-color: var(--glass-chrome);
572
+ border-color: var(--glass-hairline);
573
+ }
574
+
575
+ /*
576
+ * The right panel's COLUMN is chrome, and its views' own `bg-paper` root steps
577
+ * aside for it.
578
+ *
579
+ * Every workspace view — the file tree, search, source control, the terminal,
580
+ * usage, todos, plan, wiki and every plugin panel — opens with its own
581
+ * `<div class="… bg-paper">`, which is right in the classic look and wrong under
582
+ * the glass surface: measured, the whole 293px column composited to the palette's
583
+ * solid paper `rgb(40,44,52)` while the sidebar beside it was the plane's chrome,
584
+ * so the two columns of the same window read as two different materials
585
+ * ("right panel juga belum glass banget").
586
+ *
587
+ * The rule is the slot's, not each view's (`data-panel-chrome` is stamped by
588
+ * `WorkspacePanels` and `LeftDock`), so a view added later inherits it — and it
589
+ * only reaches the column ROOT: the toolbars, rows and cards a view draws INSIDE
590
+ * it keep their own opaque paper, because those are read.
591
+ *
592
+ * **The second selector is for PLUGIN panels, and it is the whole difference
593
+ * between a built-in view and an installed one.** A plugin's component renders
594
+ * inside `<span data-plugin-surface="<id>" style="display: contents">` (the scope
595
+ * the server wraps its stylesheet in), and that span has a BOX in the DOM even
596
+ * though it paints none — so the direct-child combinator stops there. Measured
597
+ * on the three bundled marketplace plugins in dark, every one of them painted
598
+ * `rgb(40,44,52)` over the column while the built-in views beside them were
599
+ * chrome: Stats, Runner and Forge all open with the kit's `Panel`, whose root is
600
+ * `flex flex-col h-full w-full bg-paper text-ink` — a plugin ships its own
601
+ * opinion about its frame, and the host is what has to overrule it.
602
+ */
603
+ [data-surface="glass"] [data-panel-chrome] > .bg-paper,
604
+ [data-surface="glass"] [data-panel-chrome] > [data-plugin-surface] > .bg-paper {
605
+ background-color: transparent;
606
+ }
607
+
608
+ /*
609
+ * Tier 2 — dialogs.
610
+ *
611
+ * A dialog gets the material too: the frost samples the DIMMED app behind it,
612
+ * which is why the veil had to be fixed first (`.modal-scrim` darkens in both
613
+ * variants; the old `bg-ink/40` lit a dark theme from behind, so a translucent
614
+ * dialog there composited to a grey wash — measured `#3a3d44` against the app's
615
+ * `#282c34`). The tint is higher than a card's because a dialog carries prose,
616
+ * and the rim is what keeps its edge visible over the veil.
617
+ */
618
+ [data-surface="glass"] .glass-overlay,
619
+ [data-surface="glass"] .glass-popover {
620
+ /* The sheen is what makes a translucent panel read as glass rather than as a
621
+ * darker box: without it the tint only ever darkens the paper, which on a dark
622
+ * palette is indistinguishable from a shadow. */
623
+ background-image: linear-gradient(
624
+ 180deg,
625
+ color-mix(in srgb, #fff 7%, transparent) 0%,
626
+ transparent 42%
627
+ );
628
+ box-shadow: var(--glass-edge), var(--glass-shadow);
629
+ border-color: var(--glass-hairline);
630
+ backdrop-filter: var(--glass-overlay-filter);
631
+ -webkit-backdrop-filter: var(--glass-overlay-filter);
632
+ }
633
+
634
+ /*
635
+ * A POPOVER adds the bloom on top of that shared material.
636
+ *
637
+ * A dropdown is small, sits over a list it just covered, and has almost no
638
+ * interior — so the sheen alone still left it reading as a lifted box: measured
639
+ * on the session-actions menu, the top-left corner `(56,61,71)` against a body
640
+ * of `(41,44,52)` on a sidebar of `(51,58,67)`, i.e. no light anywhere and
641
+ * 1.09:1 against what it covers ("dropdown juga belum glass"). With the bloom
642
+ * the corner reads `(117,137,155)` and the bottom-right `(63,70,97)`, and the
643
+ * interior chroma goes 12.8 → 15.0 while the centre keeps its exact value — the
644
+ * pane glows at the corners and stays legible in the middle, which is the whole
645
+ * difference between glass and a darker rectangle.
646
+ *
647
+ * Not `--glass-bloom` itself, because a dropdown is a fifth the size of the
648
+ * composer card: the same radial at the same percentage would put the whole
649
+ * gradient INSIDE a 176px panel. The stops are tightened so the peak stays off
650
+ * the panel and only the corner catches it.
651
+ */
652
+ [data-surface="glass"] .glass-popover {
653
+ background-image: var(--glass-sheen), var(--glass-popover-bloom);
654
+ }
655
+
656
+ /*
657
+ * A dialog's own HEADER and FOOTER strips are chrome too, and they have to step
658
+ * aside for the same reason a workspace column does.
659
+ *
660
+ * `.glass-overlay` is the panel; its chrome strips write `bg-paper` for the
661
+ * classic look, and an opaque strip along the top of a 1200x792 panel covers
662
+ * exactly the edge the material is legible at. Measured on the git commit
663
+ * history modal, its 1198x109 header painted `rgb(40,44,52)` — the palette's
664
+ * solid paper — across the whole top edge, so the panel's highlight and its
665
+ * top-left bloom never appeared and the face read as one flat value
666
+ * ("git history commit modal juga belum glass"). With the strip transparent the
667
+ * same panel shows the light: corner chroma 11 → 26.
668
+ *
669
+ * The direct child only, exactly like `[data-panel-chrome]`: a dialog's BODY
670
+ * keeps every card, row and notice it draws, because those are read.
671
+ */
672
+ [data-surface="glass"] .glass-overlay > .bg-paper {
673
+ background-color: transparent;
674
+ }
675
+
676
+ /*
677
+ * A DIALOG adds ITS light, and it is a different one: local, not spread.
678
+ *
679
+ * Measured on the settings panel (1280x810) in dark, the shared sheen plus a
680
+ * panel-wide bloom left the corners within 1.06:1 of the middle — a flat sheet.
681
+ * A local light with its peak just OUTSIDE the frame reads `(53,63,76)` against
682
+ * a body of `(65,69,75)`: the corner sits 23 chroma above its own body while the
683
+ * middle keeps its exact value, and the nav labels hold 4.14:1 — against 3.77:1
684
+ * before, because the light never lands on the text.
685
+ */
686
+ [data-surface="glass"] .glass-overlay {
687
+ background-image: var(--glass-dialog-bloom);
688
+ }
689
+
690
+ /*
691
+ * A raised card: one tint, no blur.
692
+ *
693
+ * Scoped to a TOOL ROW rather than to `.bg-paper` everywhere, and that scope is
694
+ * the whole safety argument: the transcript's tool cards are a closed region
695
+ * (they carry `data-tool-row`), so one rule reaches every panel's inner surface
696
+ * — 70-odd files that each wrote `bg-paper` for a code block, a result list or a
697
+ * notice — without turning the assistant's own message bubble, a dropdown or a
698
+ * dialog translucent. Those are reading surfaces and keep their opaque paper.
699
+ */
700
+ /* The row's OWN frame carries both the marker and `bg-paper`, so it needs its
701
+ * own compound — a descendant selector alone would leave the card opaque. */
702
+ [data-surface="glass"] [data-tool-row].bg-paper,
703
+ [data-surface="glass"] [data-tool-row] .bg-paper {
704
+ background-color: var(--glass-card);
705
+ }
706
+
707
+ [data-surface="glass"] .glass-overlay {
708
+ background-color: var(--glass-overlay);
709
+ }
710
+
711
+ [data-surface="glass"] .glass-popover {
712
+ background-color: var(--glass-popover);
713
+ }
714
+
715
+ /* A browser that cannot blur, or a user who asked for less transparency: the
716
+ * opaque palette. `--glass-panel` IS the plane's fill, so overriding it here
717
+ * also fixes the sheen's contrast, which is why the sheen is switched off too.
718
+ *
719
+ * The token list below is repeated in the media query under it, and that is a
720
+ * limit of the language rather than an oversight: CSS has no way to OR a
721
+ * `@supports` with a `@media`, so one of the two has to restate it. Edit them
722
+ * together — the drift is visible as a translucent plane with no blur behind it,
723
+ * which is exactly the state `@supports` exists to prevent.
724
+ *
725
+ * **The selectors are `:root[data-surface="glass"]`, and the `:root` is not
726
+ * decoration.** The dark palette's tokens live in
727
+ * `[data-surface="glass"][data-theme-variant="dark"]` — (0,2,0) — and a plain
728
+ * `[data-surface="glass"]` here is (0,1,0), so on EVERY dark palette the
729
+ * fallback lost and the tokens it was meant to replace stayed translucent:
730
+ * measured with the block's own declarations applied, `--glass-panel` on
731
+ * `one-dark-pro-soft` kept `color-mix(… 62%, transparent)` and `.glass-chrome`
732
+ * kept alpha `0.38` — a translucent plane with no blur behind it, i.e. the exact
733
+ * state this block exists to prevent, and it went unnoticed because the light
734
+ * theme has no such competitor. `:root` adds one pseudo-class (0,2,0), which
735
+ * TIES the dark block and, being later in the file, wins. Every token in the
736
+ * list has to beat that tie, so both blocks carry it. */
737
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
738
+ :root[data-surface="glass"] {
739
+ --glass-glow: none;
740
+ --glass-panel: var(--theme-paper);
741
+ --glass-chrome: var(--theme-paper);
742
+ --glass-overlay: var(--theme-paper);
743
+ --glass-popover: var(--theme-paper);
744
+ --glass-card: var(--theme-paper);
745
+ --glass-stuck: var(--theme-paper);
746
+ --glass-bloom: none;
747
+ --glass-popover-bloom: none;
748
+ --glass-dialog-bloom: none;
749
+ --glass-overlay-filter: none;
750
+ }
751
+
752
+ [data-surface="glass"] .app-window::after {
753
+ opacity: 0;
754
+ }
755
+
756
+ /* The veil's frost goes with the rest of the material: a blurred backdrop
757
+ * behind a dialog that no longer has a blur of its own is decoration with no
758
+ * subject. */
759
+ [data-surface="glass"] .modal-scrim {
760
+ backdrop-filter: none;
761
+ -webkit-backdrop-filter: none;
762
+ }
763
+ }
764
+
765
+ @media (prefers-reduced-transparency: reduce) {
766
+ :root[data-surface="glass"] {
767
+ --glass-glow: none;
768
+ --glass-panel: var(--theme-paper);
769
+ --glass-chrome: var(--theme-paper);
770
+ --glass-overlay: var(--theme-paper);
771
+ --glass-popover: var(--theme-paper);
772
+ --glass-card: var(--theme-paper);
773
+ --glass-stuck: var(--theme-paper);
774
+ --glass-bloom: none;
775
+ --glass-popover-bloom: none;
776
+ --glass-dialog-bloom: none;
777
+ --glass-overlay-filter: none;
778
+ }
779
+
780
+ [data-surface="glass"] .app-window::after {
781
+ opacity: 0;
782
+ }
783
+
784
+ [data-surface="glass"] .app-window-aura {
785
+ display: none;
786
+ }
787
+
788
+ /* The veil's frost goes with the rest of the material: a blurred backdrop
789
+ * behind a dialog that no longer has a blur of its own is decoration with no
790
+ * subject. */
791
+ [data-surface="glass"] .modal-scrim {
792
+ backdrop-filter: none;
793
+ -webkit-backdrop-filter: none;
794
+ }
795
+ }