@kabmo-labs/kabmo 0.17.0 → 0.19.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 (438) hide show
  1. package/README.md +10 -7
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +523 -441
  4. package/dist/client/static/js/{index-rerjq5th.js → index-fcee4c13.js} +828 -818
  5. package/dist/client/static/js/index-sxdw908m.css +1 -0
  6. package/marketplace/plugins/command-runner/package.json +3 -2
  7. package/marketplace/plugins/git-forge/package.json +3 -2
  8. package/marketplace/plugins/session-info/package.json +3 -2
  9. package/marketplace/plugins/stats/package.json +3 -2
  10. package/package.json +3 -1
  11. package/src/client/components/auth/login-screen/index.tsx +2 -1
  12. package/src/client/components/common/ComposerPicker.tsx +1 -1
  13. package/src/client/components/common/FolderPicker.tsx +2 -2
  14. package/src/client/components/common/MarkdownRenderer.tsx +136 -89
  15. package/src/client/components/common/Modal.tsx +2 -2
  16. package/src/client/components/common/PWAInstallButton.tsx +2 -2
  17. package/src/client/components/common/ViewportSelector.tsx +1 -1
  18. package/src/client/components/common/anchored-menu/index.test.tsx +141 -0
  19. package/src/client/components/common/anchored-menu/index.tsx +147 -0
  20. package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +2 -1
  21. package/src/client/components/common/brand-wordmark/index.test.tsx +13 -2
  22. package/src/client/components/common/brand-wordmark/index.tsx +13 -2
  23. package/src/client/components/common/checkbox/style.test.ts +139 -0
  24. package/src/client/components/common/checkbox/style.ts +51 -0
  25. package/src/client/components/common/context-usage-button/index.tsx +2 -2
  26. package/src/client/components/common/file-icon/index.tsx +23 -9
  27. package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
  28. package/src/client/components/common/markdown-review/ReviewPopover.tsx +144 -0
  29. package/src/client/components/common/markdown-review/ReviewSummary.tsx +108 -0
  30. package/src/client/components/common/markdown-review/index.tsx +129 -0
  31. package/src/client/components/common/panel-mark/index.tsx +97 -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/server-control/Panel.tsx +33 -23
  38. package/src/client/components/common/server-control/index.test.tsx +11 -5
  39. package/src/client/components/common/server-control/index.tsx +10 -8
  40. package/src/client/components/common/session-actions-menu/index.tsx +1 -1
  41. package/src/client/components/common/toolbar-row/index.tsx +1 -1
  42. package/src/client/components/layout/ActivityBar.tsx +22 -3
  43. package/src/client/components/layout/LeftDock.tsx +9 -2
  44. package/src/client/components/layout/PanelVisibilityMenu.tsx +1 -1
  45. package/src/client/components/layout/WindowAura.tsx +27 -0
  46. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -1
  47. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +2 -2
  48. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +11 -2
  49. package/src/client/components/layout/desktop-layout/index.tsx +3 -1
  50. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +44 -23
  51. package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +36 -17
  52. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -7
  53. package/src/client/components/layout/session-sidebar/Header.tsx +1 -1
  54. package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
  55. package/src/client/components/layout/session-sidebar/Toolbar.tsx +1 -1
  56. package/src/client/components/layout/session-sidebar/about-modal/NotesDialog.tsx +94 -0
  57. package/src/client/components/layout/session-sidebar/about-modal/VersionLine.test.tsx +68 -0
  58. package/src/client/components/layout/session-sidebar/about-modal/VersionLine.tsx +36 -0
  59. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +57 -34
  60. package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +1 -1
  61. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +40 -14
  62. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +7 -6
  63. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +1 -1
  64. package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
  65. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +2 -1
  66. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +2 -2
  67. package/src/client/components/layout/update-popup/ReleaseNotes.tsx +8 -3
  68. package/src/client/components/layout/update-popup/index.tsx +5 -1
  69. package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
  70. package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
  71. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +13 -15
  72. package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +23 -1
  73. package/src/client/components/mobile/mobile-right-sidebar/MissingFileBanner.tsx +30 -0
  74. package/src/client/components/mobile/mobile-right-sidebar/PreviewScroller.tsx +18 -2
  75. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +1 -1
  76. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +22 -67
  77. package/src/client/components/mobile/mobile-session-sidebar/ItemMenu.tsx +110 -0
  78. package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
  79. package/src/client/components/mobile/panel-chips.tsx +10 -2
  80. package/src/client/components/settings/Modal.tsx +4 -4
  81. package/src/client/components/settings/ProjectSelectorDropdown.tsx +2 -2
  82. package/src/client/components/settings/SettingsSidebarList.tsx +20 -0
  83. package/src/client/components/settings/apply-side-effects.test.ts +30 -0
  84. package/src/client/components/settings/apply-side-effects.ts +14 -0
  85. package/src/client/components/settings/categories/AgentSettings.tsx +23 -50
  86. package/src/client/components/settings/categories/AppearanceSettings.tsx +6 -0
  87. package/src/client/components/settings/categories/CommandSettings.tsx +2 -2
  88. package/src/client/components/settings/categories/McpSettings.tsx +4 -21
  89. package/src/client/components/settings/categories/OmpSettings.tsx +147 -194
  90. package/src/client/components/settings/categories/SkillSettings.tsx +2 -2
  91. package/src/client/components/settings/categories/TokenUsageSettings.tsx +211 -229
  92. package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +229 -237
  93. package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +71 -0
  94. package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +9 -2
  95. package/src/client/components/settings/categories/agent-settings/levels.ts +38 -0
  96. package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -1
  97. package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -1
  98. package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +144 -0
  99. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.test.tsx +120 -0
  100. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +180 -0
  101. package/src/client/components/settings/categories/behavior-settings/Editor.tsx +27 -7
  102. package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +23 -5
  103. package/src/client/components/settings/categories/command-settings/DetailPane.tsx +75 -33
  104. package/src/client/components/settings/categories/command-settings/SidebarList.tsx +7 -0
  105. package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +93 -77
  106. package/src/client/components/settings/categories/mcp-settings/EnvVarsSection.tsx +83 -0
  107. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +28 -15
  108. package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +20 -0
  109. package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +97 -36
  110. package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +151 -0
  111. package/src/client/components/settings/categories/omp-settings/ExtensionsPanel.tsx +68 -32
  112. package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +119 -0
  113. package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +14 -7
  114. package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +15 -6
  115. package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +165 -226
  116. package/src/client/components/settings/categories/omp-settings/types.ts +28 -0
  117. package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +1 -1
  118. package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +21 -3
  119. package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +1 -1
  120. package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +51 -2
  121. package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +43 -10
  122. package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -1
  123. package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +2 -1
  124. package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +1 -1
  125. package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -1
  126. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +2 -2
  127. package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +3 -2
  128. package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
  129. package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +3 -2
  130. package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +37 -8
  131. package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +34 -14
  132. package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +21 -0
  133. package/src/client/components/settings/categories/skill-settings/pane.test.tsx +15 -6
  134. package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +242 -102
  135. package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +130 -56
  136. package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +135 -0
  137. package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +55 -33
  138. package/src/client/components/settings/categories/token-usage-settings/Provenance.tsx +59 -0
  139. package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +239 -0
  140. package/src/client/components/workspace/browser-panel/Screencast.test.ts +1 -0
  141. package/src/client/components/workspace/browser-panel/Screencast.tsx +17 -22
  142. package/src/client/components/workspace/browser-panel/TabStrip.test.tsx +158 -0
  143. package/src/client/components/workspace/browser-panel/TabStrip.tsx +90 -0
  144. package/src/client/components/workspace/browser-panel/index.tsx +50 -4
  145. package/src/client/components/workspace/browser-toolbar/index.tsx +41 -1
  146. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
  147. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
  148. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +3 -3
  149. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +3 -1
  150. package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +2 -0
  151. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +2 -2
  152. package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +13 -2
  153. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
  154. package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +4 -3
  155. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
  156. package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +1 -1
  157. package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +2 -2
  158. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
  159. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
  160. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +2 -6
  161. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +88 -0
  162. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +24 -1
  163. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +34 -0
  164. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +5 -1
  165. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -6
  166. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +237 -0
  167. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +191 -0
  168. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +1 -1
  169. package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +1 -1
  170. package/src/client/components/workspace/diff-panel/MergeDiffView.tsx +21 -7
  171. package/src/client/components/workspace/diff-panel/changes.test.ts +51 -0
  172. package/src/client/components/workspace/diff-panel/changes.ts +28 -12
  173. package/src/client/components/workspace/diff-panel/index.tsx +2 -2
  174. package/src/client/components/workspace/diff-panel/merge.test.ts +28 -0
  175. package/src/client/components/workspace/diff-panel/merge.ts +21 -1
  176. package/src/client/components/workspace/editor/Body.tsx +7 -0
  177. package/src/client/components/workspace/editor/FileDocument.tsx +15 -21
  178. package/src/client/components/workspace/editor/FilePane.tsx +12 -0
  179. package/src/client/components/workspace/editor/PluginRail.tsx +1 -1
  180. package/src/client/components/workspace/editor/PreviewPane.tsx +70 -0
  181. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
  182. package/src/client/components/workspace/editor/TabContextMenu.tsx +1 -1
  183. package/src/client/components/workspace/editor/Tabs.tsx +1 -1
  184. package/src/client/components/workspace/editor/Toolbar.tsx +17 -1
  185. package/src/client/components/workspace/editor/index.tsx +25 -22
  186. package/src/client/components/workspace/editor/toolbar-clusters.test.ts +14 -0
  187. package/src/client/components/workspace/editor/toolbar-clusters.tsx +12 -86
  188. package/src/client/components/workspace/editor/toolbar-toggle.tsx +53 -0
  189. package/src/client/components/workspace/editor/toolbar-write-clusters.tsx +112 -0
  190. package/src/client/components/workspace/file-explorer/ContextMenu.tsx +1 -1
  191. package/src/client/components/workspace/file-explorer/Modals.tsx +10 -10
  192. package/src/client/components/workspace/file-explorer/RootMenu.tsx +1 -1
  193. package/src/client/components/workspace/git-panel/BranchToolbar.test.tsx +130 -0
  194. package/src/client/components/workspace/git-panel/BranchToolbar.tsx +21 -11
  195. package/src/client/components/workspace/git-panel/CommitBox.tsx +2 -1
  196. package/src/client/components/workspace/git-panel/Modals.tsx +2 -2
  197. package/src/client/components/workspace/git-panel/StashSection.tsx +2 -1
  198. package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -1
  199. package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +2 -1
  200. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -2
  201. package/src/client/components/workspace/git-panel/commit-modal.test.ts +5 -3
  202. package/src/client/components/workspace/git-panel/index.tsx +7 -0
  203. package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
  204. package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
  205. package/src/client/components/workspace/plugin-panel/catalog.tsx +7 -0
  206. package/src/client/components/workspace/plugin-panel/resolve.tsx +4 -0
  207. package/src/client/components/workspace/search-panel/Body.tsx +1 -1
  208. package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +1 -1
  209. package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +5 -0
  210. package/src/client/components/workspace/user-browser-panel/AnnotateBar.test.tsx +201 -0
  211. package/src/client/components/workspace/user-browser-panel/AnnotateBar.tsx +112 -0
  212. package/src/client/components/workspace/user-browser-panel/AnnotateLayer.test.tsx +225 -0
  213. package/src/client/components/workspace/user-browser-panel/AnnotateLayer.tsx +217 -0
  214. package/src/client/components/workspace/user-browser-panel/AnnotateTarget.tsx +99 -0
  215. package/src/client/components/workspace/user-browser-panel/Frame.tsx +30 -1
  216. package/src/client/components/workspace/user-browser-panel/index.tsx +81 -2
  217. package/src/client/data/agent-data/builtin.ts +0 -10
  218. package/src/client/data/agent-data/orchestrator.ts +0 -45
  219. package/src/client/data/agent-data/specialist.ts +0 -100
  220. package/src/client/data/mock/token-usage.ts +170 -120
  221. package/src/client/data/settings/omp-schema.json +33 -1
  222. package/src/client/glass.css +785 -0
  223. package/src/client/glass.test.ts +346 -0
  224. package/src/client/hooks/browser/use-annotate.test.ts +143 -0
  225. package/src/client/hooks/browser/use-annotate.ts +98 -0
  226. package/src/client/hooks/browser/use-close-tab.test.ts +148 -0
  227. package/src/client/hooks/browser/use-close-tab.ts +67 -0
  228. package/src/client/hooks/browser/use-screencast.ts +13 -1
  229. package/src/client/hooks/chat/composer/browser-context.test.ts +117 -0
  230. package/src/client/hooks/chat/composer/browser-context.ts +40 -16
  231. package/src/client/hooks/chat/composer/items.test.ts +1 -1
  232. package/src/client/hooks/chat/composer/review-context.ts +38 -0
  233. package/src/client/hooks/chat/composer/use-draft.test.ts +132 -0
  234. package/src/client/hooks/chat/composer/use-draft.ts +31 -2
  235. package/src/client/hooks/chat/timeline/row-window.test.ts +15 -2
  236. package/src/client/hooks/editor/use-document-annotations.ts +124 -0
  237. package/src/client/hooks/editor/use-editor-panel-ui.ts +52 -0
  238. package/src/client/hooks/editor/use-file-review-mode.ts +35 -0
  239. package/src/client/hooks/editor/use-preview-review.ts +148 -0
  240. package/src/client/hooks/settings/agents.ts +149 -0
  241. package/src/client/hooks/settings/crud-list.test.ts +28 -6
  242. package/src/client/hooks/settings/crud-list.ts +96 -57
  243. package/src/client/hooks/settings/omp-config.ts +164 -0
  244. package/src/client/hooks/settings/useTokenUsage.ts +125 -0
  245. package/src/client/hooks/settings/write-feedback.test.ts +104 -0
  246. package/src/client/hooks/settings/write-feedback.ts +63 -0
  247. package/src/client/hooks/ui/glass-support.ts +57 -0
  248. package/src/client/hooks/ui/icon-style.ts +59 -0
  249. package/src/client/hooks/ui/markdown-hydration.ts +125 -0
  250. package/src/client/hooks/ui/stuck-header.test.ts +188 -0
  251. package/src/client/hooks/ui/stuck-header.ts +91 -0
  252. package/src/client/hooks/ui/style-attributes.test.ts +120 -0
  253. package/src/client/hooks/ui/surface-style.ts +56 -0
  254. package/src/client/hooks/ui/updates/index.test.ts +100 -1
  255. package/src/client/hooks/ui/updates/index.ts +50 -0
  256. package/src/client/hooks/ui/updates/notes.test.ts +138 -0
  257. package/src/client/hooks/ui/updates/notes.ts +57 -0
  258. package/src/client/hooks/workspace/panel-hues.ts +23 -0
  259. package/src/client/lib/browser/element-at.test.ts +229 -0
  260. package/src/client/lib/browser/element-at.ts +139 -0
  261. package/src/client/lib/review/client.ts +73 -0
  262. package/src/client/lib/router/search-params.ts +42 -20
  263. package/src/client/main.tsx +10 -0
  264. package/src/client/tailwind.css +329 -11
  265. package/src/server/lib/assets/shell-attributes.server.ts +80 -0
  266. package/src/server/lib/assets/shell-attributes.test.ts +86 -0
  267. package/src/server/lib/btw/lifecycle.server.ts +2 -2
  268. package/src/server/lib/db/schema.ts +7 -0
  269. package/src/server/lib/db/seed-terminal.test.ts +4 -0
  270. package/src/server/lib/omp/config/agent-definitions.test.ts +273 -0
  271. package/src/server/lib/omp/config/agents.ts +231 -61
  272. package/src/server/lib/omp/config/definitions.test.ts +9 -105
  273. package/src/server/lib/omp/config/extensions.ts +16 -7
  274. package/src/server/lib/omp/config/omp-config-files.test.ts +27 -0
  275. package/src/server/lib/omp/rpc/constants.test.ts +11 -0
  276. package/src/server/lib/omp/rpc/constants.ts +15 -0
  277. package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +1 -0
  278. package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +2 -30
  279. package/src/server/lib/omp/rpc/frame-fold.test.ts +55 -0
  280. package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
  281. package/src/server/lib/omp/rpc/manager.ts +2 -2
  282. package/src/server/lib/omp/rpc/process-helpers.ts +11 -0
  283. package/src/server/lib/omp/rpc/process.test.ts +106 -0
  284. package/src/server/lib/omp/rpc/process.ts +39 -18
  285. package/src/server/lib/omp/rpc/run-settle.server.ts +12 -0
  286. package/src/server/lib/omp/rpc/run-settle.test.ts +22 -0
  287. package/src/server/lib/omp/rpc/session-command-guards.ts +5 -0
  288. package/src/server/lib/omp/rpc/session-commands.test.ts +9 -1
  289. package/src/server/lib/omp/rpc/session-commands.ts +17 -3
  290. package/src/server/lib/omp/rpc/terminal-settle.ts +29 -7
  291. package/src/server/lib/omp/rpc/utility-agent-dir.test.ts +134 -0
  292. package/src/server/lib/omp/rpc/utility-agent-dir.ts +138 -0
  293. package/src/server/lib/omp/rpc/utility.ts +12 -0
  294. package/src/server/lib/panels/bundled-catalog.server.ts +1 -0
  295. package/src/server/lib/panels/manifest.test.ts +20 -0
  296. package/src/server/lib/panels/manifest.ts +12 -0
  297. package/src/server/lib/panels/scan.server.ts +4 -0
  298. package/src/server/lib/queue/delivery-dispatch.server.test.ts +48 -0
  299. package/src/server/lib/queue/delivery-harness.ts +8 -4
  300. package/src/server/lib/queue/delivery.server.test.ts +29 -0
  301. package/src/server/lib/queue/delivery.server.ts +39 -0
  302. package/src/server/lib/queue/store.server.test.ts +22 -2
  303. package/src/server/lib/queue/store.server.ts +33 -11
  304. package/src/server/lib/review/schema.server.ts +45 -0
  305. package/src/server/lib/review/store.server.ts +138 -0
  306. package/src/server/lib/terminal/attach-replay.test.ts +132 -0
  307. package/src/server/lib/terminal/output.test.ts +166 -0
  308. package/src/server/lib/terminal/output.ts +104 -0
  309. package/src/server/lib/terminal/runtime.server.ts +5 -0
  310. package/src/server/lib/terminal/send-result.test.ts +33 -0
  311. package/src/server/lib/terminal/send-result.ts +32 -0
  312. package/src/server/lib/terminal/session.server.ts +45 -11
  313. package/src/server/lib/terminal/store-liveness.test.ts +4 -0
  314. package/src/server/lib/updates/active-notes.test.ts +149 -0
  315. package/src/server/lib/updates/active-notes.ts +75 -0
  316. package/src/server/lib/updates/changelog-file.ts +42 -11
  317. package/src/server/lib/updates/changelog.test.ts +15 -1
  318. package/src/server/lib/updates/omp.ts +42 -15
  319. package/src/server/lib/updates/release-url.ts +27 -1
  320. package/src/server/lib/usage/index-parse.test.ts +200 -0
  321. package/src/server/lib/usage/index-parse.ts +178 -0
  322. package/src/server/lib/usage/index-query.server.ts +248 -0
  323. package/src/server/lib/usage/index-scan.server.ts +343 -0
  324. package/src/server/lib/usage/index-schema.server.ts +82 -0
  325. package/src/server/lib/usage/index.test.ts +234 -0
  326. package/src/server/lib/usage/providers.server.ts +4 -53
  327. package/src/server/plugins/ssr.ts +22 -5
  328. package/src/server/routes/browser/index.ts +3 -0
  329. package/src/server/routes/browser/stream.ts +31 -2
  330. package/src/server/routes/browser/tabs.test.ts +94 -0
  331. package/src/server/routes/browser/tabs.ts +85 -0
  332. package/src/server/routes/index.ts +2 -0
  333. package/src/server/routes/review/bindings.ts +11 -0
  334. package/src/server/routes/review/index.ts +127 -0
  335. package/src/server/routes/review/routes.test.ts +191 -0
  336. package/src/server/routes/settings/agents.test.ts +180 -0
  337. package/src/server/routes/settings/agents.ts +95 -102
  338. package/src/server/routes/settings/mcp.test.ts +135 -0
  339. package/src/server/routes/settings/mcp.ts +14 -6
  340. package/src/server/routes/settings/settings-store-routes.test.ts +6 -113
  341. package/src/server/routes/telemetry/tokens.test.ts +145 -0
  342. package/src/server/routes/telemetry/tokens.ts +70 -149
  343. package/src/server/routes/terminal/ws.ts +6 -5
  344. package/src/server/routes/updates/index.ts +2 -0
  345. package/src/server/routes/updates/notes.ts +34 -0
  346. package/src/server/routes/updates/routes.test.ts +49 -0
  347. package/src/shared/lib/browser/annotate.test.ts +283 -0
  348. package/src/shared/lib/browser/annotate.ts +231 -0
  349. package/src/shared/lib/browser/browser-viewer.test.ts +26 -4
  350. package/src/shared/lib/browser/frame-gate.test.ts +91 -0
  351. package/src/shared/lib/browser/frame-gate.ts +69 -0
  352. package/src/shared/lib/browser/frame-params.test.ts +43 -0
  353. package/src/shared/lib/browser/frame-params.ts +60 -0
  354. package/src/shared/lib/browser/frame-pipeline.test.ts +132 -0
  355. package/src/shared/lib/browser/frame-pipeline.ts +80 -0
  356. package/src/shared/lib/browser/page-context.ts +60 -4
  357. package/src/shared/lib/browser/snapshot.test.ts +115 -0
  358. package/src/shared/lib/browser/snapshot.ts +112 -0
  359. package/src/shared/lib/browser/tab-close.test.ts +74 -0
  360. package/src/shared/lib/browser/tab-close.ts +77 -0
  361. package/src/shared/lib/browser/viewer.ts +45 -26
  362. package/src/shared/lib/chat/timeline/block-chrome.ts +19 -0
  363. package/src/shared/lib/chat/timeline/tool-render-mode.ts +17 -4
  364. package/src/shared/lib/chat/tool/artifact.ts +55 -20
  365. package/src/shared/lib/chat/tool/bash-facts.ts +96 -0
  366. package/src/shared/lib/chat/tool/minimized.test.ts +98 -0
  367. package/src/shared/lib/chat/tool/minimized.ts +64 -0
  368. package/src/shared/lib/chat/tool/summary.test.ts +28 -8
  369. package/src/shared/lib/chat/tool/summary.ts +3 -32
  370. package/src/shared/lib/icons/file-brand-color.ts +38 -0
  371. package/src/shared/lib/icons/icon-paint-css.test.ts +234 -0
  372. package/src/shared/lib/icons/icon-paint-css.ts +284 -0
  373. package/src/shared/lib/icons/icon-paint-panel.ts +100 -0
  374. package/src/shared/lib/icons/tint-hues.generated.ts +230 -0
  375. package/src/shared/lib/icons/tint.test.ts +273 -0
  376. package/src/shared/lib/icons/tint.ts +219 -0
  377. package/src/shared/lib/markdown/blocks/anchor.ts +63 -0
  378. package/src/shared/lib/markdown/blocks/blocks.test.ts +141 -0
  379. package/src/shared/lib/markdown/blocks/renderer.ts +120 -0
  380. package/src/shared/lib/markdown/blocks/scan.ts +100 -0
  381. package/src/shared/lib/markdown/blocks/types.ts +62 -0
  382. package/src/shared/lib/markdown/marked.ts +58 -147
  383. package/src/shared/lib/markdown/math-extensions.ts +168 -0
  384. package/src/shared/lib/markdown/review/prompt.ts +77 -0
  385. package/src/shared/lib/markdown/review/reconcile.ts +55 -0
  386. package/src/shared/lib/markdown/review/review.test.ts +96 -0
  387. package/src/shared/lib/markdown/xml-sections.test.ts +140 -0
  388. package/src/shared/lib/markdown/xml-sections.ts +139 -0
  389. package/src/shared/lib/models/provider/brand-color.test.ts +116 -0
  390. package/src/shared/lib/models/provider/brand-color.ts +103 -0
  391. package/src/shared/lib/models/provider/label.ts +57 -0
  392. package/src/shared/lib/omp/config/agent-file.test.ts +54 -0
  393. package/src/shared/lib/omp/config/agent-file.ts +43 -0
  394. package/src/shared/lib/omp/config/row-value.test.ts +95 -0
  395. package/src/shared/lib/omp/config/row-value.ts +97 -0
  396. package/src/shared/lib/omp/config/schema.test.ts +31 -0
  397. package/src/shared/lib/omp/config/schema.ts +6 -0
  398. package/src/shared/lib/omp/rpc/frame.test.ts +113 -47
  399. package/src/shared/lib/omp/rpc/frame.ts +107 -43
  400. package/src/shared/lib/settings/defaults.ts +4 -0
  401. package/src/shared/lib/theme/catalog.test.ts +5 -4
  402. package/src/shared/lib/theme/catalog.ts +18 -3
  403. package/src/shared/lib/theme/glass-support.test.ts +38 -0
  404. package/src/shared/lib/theme/glass-support.ts +73 -0
  405. package/src/shared/lib/theme/icon-style.test.ts +74 -0
  406. package/src/shared/lib/theme/icon-style.ts +90 -0
  407. package/src/shared/lib/theme/legibility.ts +91 -0
  408. package/src/shared/lib/theme/palettes/dark-extended.ts +152 -0
  409. package/src/shared/lib/theme/palettes/light-extended.ts +157 -0
  410. package/src/shared/lib/theme/surface-style.test.ts +68 -0
  411. package/src/shared/lib/theme/surface-style.ts +91 -0
  412. package/src/shared/lib/theme/theme.test.ts +11 -7
  413. package/src/shared/lib/ui/menu-anchor.test.ts +69 -0
  414. package/src/shared/lib/ui/menu-anchor.ts +89 -0
  415. package/src/shared/lib/usage/breakdown.test.ts +197 -0
  416. package/src/shared/lib/usage/breakdown.ts +241 -0
  417. package/src/shared/lib/usage/range.test.ts +204 -0
  418. package/src/shared/lib/usage/range.ts +240 -0
  419. package/src/shared/lib/usage/view.test.ts +85 -0
  420. package/src/shared/lib/usage/view.ts +74 -0
  421. package/src/shared/lib/workspace/panel-hues.test.ts +68 -0
  422. package/src/shared/lib/workspace/panel-hues.ts +57 -0
  423. package/src/shared/types/browser.ts +78 -0
  424. package/src/shared/types/index.ts +1 -0
  425. package/src/shared/types/panels-registry.ts +6 -0
  426. package/src/shared/types/panels.ts +14 -0
  427. package/src/shared/types/settings/agent.ts +28 -6
  428. package/src/shared/types/settings/state.ts +30 -3
  429. package/src/shared/types/settings/write.ts +6 -0
  430. package/src/shared/types/tokenUsage.ts +128 -21
  431. package/src/shared/types/updates.ts +20 -0
  432. package/src/test-support/fake-omp-frames.ts +163 -0
  433. package/dist/client/static/js/index-3ve31rzx.css +0 -1
  434. package/src/server/lib/omp/session/usage/aggregate-shaping.test.ts +0 -149
  435. package/src/server/lib/omp/session/usage/aggregate.test.ts +0 -243
  436. package/src/server/lib/omp/session/usage/aggregate.ts +0 -330
  437. package/src/server/lib/omp/session/usage/shaping.ts +0 -130
  438. /package/src/{client/components/common/file-icon/brand-paths.ts → shared/lib/icons/file-brand-paths.ts} +0 -0
@@ -0,0 +1,785 @@
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
+ [data-surface="glass"] .app-window .bg-canvas:not(.app-window) {
473
+ background-color: transparent;
474
+ }
475
+
476
+ /*
477
+ * …except a knob ON a switch, which is a SHAPE, not a well.
478
+ *
479
+ * `bg-canvas` is the app's ground, but a switch knob uses it as an OPAQUE
480
+ * contrasting disc: `bg-canvas` on `bg-ink/70` is what makes the control read as
481
+ * a toggle at all. Turning it transparent deleted the knob — measured on the
482
+ * plugin switches in dark, the 12px knob composited to `rgba(0,0,0,0)` and the
483
+ * control rendered as a plain pill with no "on" position ("ini juga dong",
484
+ * with a screenshot of exactly that button). The mark is the switch ROLE, not a
485
+ * class name: any control that declares itself a switch owns its knob, whatever
486
+ * it happens to paint it with.
487
+ */
488
+ [data-surface="glass"] .app-window [role="switch"] .bg-canvas {
489
+ background-color: var(--theme-canvas);
490
+ }
491
+
492
+ /*
493
+ * A STICKY header: NOTHING at rest, a surface only while PINNED.
494
+ *
495
+ * The folder header in the `modern` sidebar is `sticky top-0`, so it shipped an
496
+ * opaque `bg-paper` to separate its label from the rows sliding under it. Under
497
+ * `[data-surface="glass"]` that is a hard strip across a sidebar that is
498
+ * otherwise one translucent surface ("belang"). Two fills were measured and
499
+ * removed — opaque `rgb(255,255,254)` over rows at `rgb(243,241,237)`, then paper
500
+ * at 74% — and then the BLUR was removed too, because a `backdrop-filter` is
501
+ * still a visible patch: it smears whatever passes under it (rows, their
502
+ * coloured icons, the aura) into a rectangle whose average differs from the
503
+ * rows beside it. Measured with the blur still on: band `(47,55,67)` against the
504
+ * rows below `(45,51,60)` — close, and still a patch a reader can see while
505
+ * scrolling.
506
+ *
507
+ * Three treatments were measured here and every one of them was a band, because
508
+ * ANY paint or filter on a full-width sticky strip is a rectangle:
509
+ *
510
+ * 1. the opaque `bg-paper`/`bg-canvas` it shipped with — `rgb(255,255,254)` over
511
+ * rows at `rgb(243,241,237)`;
512
+ * 2. paper at 74% — still a lighter strip;
513
+ * 3. `blur(24px) saturate(150%)`, the DIALOG tier's filter — the saturate
514
+ * amplified the aura's blue inside the band, measured `(49,56,68)` against
515
+ * rows at `(53,59,68)`: chroma +4.8, a visibly blue patch. Dropping the
516
+ * saturate fixed the hue (−0.3) but the BLUR itself still reads as a patch,
517
+ * because it smears whatever passes beneath it into a field whose texture no
518
+ * neighbour has.
519
+ *
520
+ * So at rest the header paints nothing at all: `background: none`, no
521
+ * `backdrop-filter`. Its pixels are then literally the sidebar's own — measured
522
+ * `(50,56,64)` with the header drawn against `(49,55,63)` with it hidden,
523
+ * Δ(1,1,1), which is its own controls and no surface.
524
+ *
525
+ * The fill comes back only while the header is STUCK (`data-stuck`, from
526
+ * `useStuckHeader`) — the one state where a row really does slide underneath and
527
+ * the label needs a field. That is the distinction the band reports were really
528
+ * about: a header that paints while overlapping rows is doing its job, one that
529
+ * paints at rest is a stripe. The label's halo follows the same state, so a
530
+ * resting header has neither.
531
+ */
532
+ [data-surface="glass"] .glass-sticky {
533
+ background-color: transparent;
534
+ background-image: none;
535
+ backdrop-filter: none;
536
+ -webkit-backdrop-filter: none;
537
+ }
538
+
539
+ [data-surface="glass"] .glass-sticky[data-stuck] {
540
+ background-color: var(--glass-stuck);
541
+ /* NO sheen and NO blur: the fill is opaque, so a `backdrop-filter` has nothing
542
+ * left to sample — and the white gradient a card carries lightened this 26px
543
+ * strip by up to 6%, which measured `(47,55,65)` against a sidebar at
544
+ * `(40,48,60)`: a lighter band instead of a darker one. The rim alone is what
545
+ * separates it. */
546
+ box-shadow: var(--glass-edge);
547
+ }
548
+
549
+ [data-surface="glass"] .glass-sticky[data-stuck] .glass-sticky-label {
550
+ text-shadow:
551
+ 0 0 6px var(--glass-halo),
552
+ 0 0 3px var(--glass-halo),
553
+ 0 0 10px var(--glass-halo);
554
+ }
555
+
556
+ /*
557
+ * Tier 1 — the chrome. A flat tint over the plane, no blur of its own. The
558
+ * hairline is a border rather than a shadow so it scales with the element.
559
+ */
560
+ [data-surface="glass"] .glass-chrome {
561
+ background-color: var(--glass-chrome);
562
+ border-color: var(--glass-hairline);
563
+ }
564
+
565
+ /*
566
+ * The right panel's COLUMN is chrome, and its views' own `bg-paper` root steps
567
+ * aside for it.
568
+ *
569
+ * Every workspace view — the file tree, search, source control, the terminal,
570
+ * usage, todos, plan, wiki and every plugin panel — opens with its own
571
+ * `<div class="… bg-paper">`, which is right in the classic look and wrong under
572
+ * the glass surface: measured, the whole 293px column composited to the palette's
573
+ * solid paper `rgb(40,44,52)` while the sidebar beside it was the plane's chrome,
574
+ * so the two columns of the same window read as two different materials
575
+ * ("right panel juga belum glass banget").
576
+ *
577
+ * The rule is the slot's, not each view's (`data-panel-chrome` is stamped by
578
+ * `WorkspacePanels` and `LeftDock`), so a view added later inherits it — and it
579
+ * only reaches the column ROOT: the toolbars, rows and cards a view draws INSIDE
580
+ * it keep their own opaque paper, because those are read.
581
+ *
582
+ * **The second selector is for PLUGIN panels, and it is the whole difference
583
+ * between a built-in view and an installed one.** A plugin's component renders
584
+ * inside `<span data-plugin-surface="<id>" style="display: contents">` (the scope
585
+ * the server wraps its stylesheet in), and that span has a BOX in the DOM even
586
+ * though it paints none — so the direct-child combinator stops there. Measured
587
+ * on the three bundled marketplace plugins in dark, every one of them painted
588
+ * `rgb(40,44,52)` over the column while the built-in views beside them were
589
+ * chrome: Stats, Runner and Forge all open with the kit's `Panel`, whose root is
590
+ * `flex flex-col h-full w-full bg-paper text-ink` — a plugin ships its own
591
+ * opinion about its frame, and the host is what has to overrule it.
592
+ */
593
+ [data-surface="glass"] [data-panel-chrome] > .bg-paper,
594
+ [data-surface="glass"] [data-panel-chrome] > [data-plugin-surface] > .bg-paper {
595
+ background-color: transparent;
596
+ }
597
+
598
+ /*
599
+ * Tier 2 — dialogs.
600
+ *
601
+ * A dialog gets the material too: the frost samples the DIMMED app behind it,
602
+ * which is why the veil had to be fixed first (`.modal-scrim` darkens in both
603
+ * variants; the old `bg-ink/40` lit a dark theme from behind, so a translucent
604
+ * dialog there composited to a grey wash — measured `#3a3d44` against the app's
605
+ * `#282c34`). The tint is higher than a card's because a dialog carries prose,
606
+ * and the rim is what keeps its edge visible over the veil.
607
+ */
608
+ [data-surface="glass"] .glass-overlay,
609
+ [data-surface="glass"] .glass-popover {
610
+ /* The sheen is what makes a translucent panel read as glass rather than as a
611
+ * darker box: without it the tint only ever darkens the paper, which on a dark
612
+ * palette is indistinguishable from a shadow. */
613
+ background-image: linear-gradient(
614
+ 180deg,
615
+ color-mix(in srgb, #fff 7%, transparent) 0%,
616
+ transparent 42%
617
+ );
618
+ box-shadow: var(--glass-edge), var(--glass-shadow);
619
+ border-color: var(--glass-hairline);
620
+ backdrop-filter: var(--glass-overlay-filter);
621
+ -webkit-backdrop-filter: var(--glass-overlay-filter);
622
+ }
623
+
624
+ /*
625
+ * A POPOVER adds the bloom on top of that shared material.
626
+ *
627
+ * A dropdown is small, sits over a list it just covered, and has almost no
628
+ * interior — so the sheen alone still left it reading as a lifted box: measured
629
+ * on the session-actions menu, the top-left corner `(56,61,71)` against a body
630
+ * of `(41,44,52)` on a sidebar of `(51,58,67)`, i.e. no light anywhere and
631
+ * 1.09:1 against what it covers ("dropdown juga belum glass"). With the bloom
632
+ * the corner reads `(117,137,155)` and the bottom-right `(63,70,97)`, and the
633
+ * interior chroma goes 12.8 → 15.0 while the centre keeps its exact value — the
634
+ * pane glows at the corners and stays legible in the middle, which is the whole
635
+ * difference between glass and a darker rectangle.
636
+ *
637
+ * Not `--glass-bloom` itself, because a dropdown is a fifth the size of the
638
+ * composer card: the same radial at the same percentage would put the whole
639
+ * gradient INSIDE a 176px panel. The stops are tightened so the peak stays off
640
+ * the panel and only the corner catches it.
641
+ */
642
+ [data-surface="glass"] .glass-popover {
643
+ background-image: var(--glass-sheen), var(--glass-popover-bloom);
644
+ }
645
+
646
+ /*
647
+ * A dialog's own HEADER and FOOTER strips are chrome too, and they have to step
648
+ * aside for the same reason a workspace column does.
649
+ *
650
+ * `.glass-overlay` is the panel; its chrome strips write `bg-paper` for the
651
+ * classic look, and an opaque strip along the top of a 1200x792 panel covers
652
+ * exactly the edge the material is legible at. Measured on the git commit
653
+ * history modal, its 1198x109 header painted `rgb(40,44,52)` — the palette's
654
+ * solid paper — across the whole top edge, so the panel's highlight and its
655
+ * top-left bloom never appeared and the face read as one flat value
656
+ * ("git history commit modal juga belum glass"). With the strip transparent the
657
+ * same panel shows the light: corner chroma 11 → 26.
658
+ *
659
+ * The direct child only, exactly like `[data-panel-chrome]`: a dialog's BODY
660
+ * keeps every card, row and notice it draws, because those are read.
661
+ */
662
+ [data-surface="glass"] .glass-overlay > .bg-paper {
663
+ background-color: transparent;
664
+ }
665
+
666
+ /*
667
+ * A DIALOG adds ITS light, and it is a different one: local, not spread.
668
+ *
669
+ * Measured on the settings panel (1280x810) in dark, the shared sheen plus a
670
+ * panel-wide bloom left the corners within 1.06:1 of the middle — a flat sheet.
671
+ * A local light with its peak just OUTSIDE the frame reads `(53,63,76)` against
672
+ * a body of `(65,69,75)`: the corner sits 23 chroma above its own body while the
673
+ * middle keeps its exact value, and the nav labels hold 4.14:1 — against 3.77:1
674
+ * before, because the light never lands on the text.
675
+ */
676
+ [data-surface="glass"] .glass-overlay {
677
+ background-image: var(--glass-dialog-bloom);
678
+ }
679
+
680
+ /*
681
+ * A raised card: one tint, no blur.
682
+ *
683
+ * Scoped to a TOOL ROW rather than to `.bg-paper` everywhere, and that scope is
684
+ * the whole safety argument: the transcript's tool cards are a closed region
685
+ * (they carry `data-tool-row`), so one rule reaches every panel's inner surface
686
+ * — 70-odd files that each wrote `bg-paper` for a code block, a result list or a
687
+ * notice — without turning the assistant's own message bubble, a dropdown or a
688
+ * dialog translucent. Those are reading surfaces and keep their opaque paper.
689
+ */
690
+ /* The row's OWN frame carries both the marker and `bg-paper`, so it needs its
691
+ * own compound — a descendant selector alone would leave the card opaque. */
692
+ [data-surface="glass"] [data-tool-row].bg-paper,
693
+ [data-surface="glass"] [data-tool-row] .bg-paper {
694
+ background-color: var(--glass-card);
695
+ }
696
+
697
+ [data-surface="glass"] .glass-overlay {
698
+ background-color: var(--glass-overlay);
699
+ }
700
+
701
+ [data-surface="glass"] .glass-popover {
702
+ background-color: var(--glass-popover);
703
+ }
704
+
705
+ /* A browser that cannot blur, or a user who asked for less transparency: the
706
+ * opaque palette. `--glass-panel` IS the plane's fill, so overriding it here
707
+ * also fixes the sheen's contrast, which is why the sheen is switched off too.
708
+ *
709
+ * The token list below is repeated in the media query under it, and that is a
710
+ * limit of the language rather than an oversight: CSS has no way to OR a
711
+ * `@supports` with a `@media`, so one of the two has to restate it. Edit them
712
+ * together — the drift is visible as a translucent plane with no blur behind it,
713
+ * which is exactly the state `@supports` exists to prevent.
714
+ *
715
+ * **The selectors are `:root[data-surface="glass"]`, and the `:root` is not
716
+ * decoration.** The dark palette's tokens live in
717
+ * `[data-surface="glass"][data-theme-variant="dark"]` — (0,2,0) — and a plain
718
+ * `[data-surface="glass"]` here is (0,1,0), so on EVERY dark palette the
719
+ * fallback lost and the tokens it was meant to replace stayed translucent:
720
+ * measured with the block's own declarations applied, `--glass-panel` on
721
+ * `one-dark-pro-soft` kept `color-mix(… 62%, transparent)` and `.glass-chrome`
722
+ * kept alpha `0.38` — a translucent plane with no blur behind it, i.e. the exact
723
+ * state this block exists to prevent, and it went unnoticed because the light
724
+ * theme has no such competitor. `:root` adds one pseudo-class (0,2,0), which
725
+ * TIES the dark block and, being later in the file, wins. Every token in the
726
+ * list has to beat that tie, so both blocks carry it. */
727
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
728
+ :root[data-surface="glass"] {
729
+ --glass-glow: none;
730
+ --glass-panel: var(--theme-paper);
731
+ --glass-chrome: var(--theme-paper);
732
+ --glass-overlay: var(--theme-paper);
733
+ --glass-popover: var(--theme-paper);
734
+ --glass-card: var(--theme-paper);
735
+ --glass-stuck: var(--theme-paper);
736
+ --glass-bloom: none;
737
+ --glass-popover-bloom: none;
738
+ --glass-dialog-bloom: none;
739
+ --glass-overlay-filter: none;
740
+ }
741
+
742
+ [data-surface="glass"] .app-window::after {
743
+ opacity: 0;
744
+ }
745
+
746
+ /* The veil's frost goes with the rest of the material: a blurred backdrop
747
+ * behind a dialog that no longer has a blur of its own is decoration with no
748
+ * subject. */
749
+ [data-surface="glass"] .modal-scrim {
750
+ backdrop-filter: none;
751
+ -webkit-backdrop-filter: none;
752
+ }
753
+ }
754
+
755
+ @media (prefers-reduced-transparency: reduce) {
756
+ :root[data-surface="glass"] {
757
+ --glass-glow: none;
758
+ --glass-panel: var(--theme-paper);
759
+ --glass-chrome: var(--theme-paper);
760
+ --glass-overlay: var(--theme-paper);
761
+ --glass-popover: var(--theme-paper);
762
+ --glass-card: var(--theme-paper);
763
+ --glass-stuck: var(--theme-paper);
764
+ --glass-bloom: none;
765
+ --glass-popover-bloom: none;
766
+ --glass-dialog-bloom: none;
767
+ --glass-overlay-filter: none;
768
+ }
769
+
770
+ [data-surface="glass"] .app-window::after {
771
+ opacity: 0;
772
+ }
773
+
774
+ [data-surface="glass"] .app-window-aura {
775
+ display: none;
776
+ }
777
+
778
+ /* The veil's frost goes with the rest of the material: a blurred backdrop
779
+ * behind a dialog that no longer has a blur of its own is decoration with no
780
+ * subject. */
781
+ [data-surface="glass"] .modal-scrim {
782
+ backdrop-filter: none;
783
+ -webkit-backdrop-filter: none;
784
+ }
785
+ }