@kabmo-labs/kabmo 0.18.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 (191) hide show
  1. package/README.md +10 -7
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +475 -474
  4. package/dist/client/static/js/{index-tc09dtca.js → index-fcee4c13.js} +766 -765
  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/Modal.tsx +2 -2
  15. package/src/client/components/common/PWAInstallButton.tsx +2 -2
  16. package/src/client/components/common/ViewportSelector.tsx +1 -1
  17. package/src/client/components/common/anchored-menu/index.tsx +5 -1
  18. package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +2 -1
  19. package/src/client/components/common/brand-wordmark/index.test.tsx +13 -2
  20. package/src/client/components/common/brand-wordmark/index.tsx +13 -2
  21. package/src/client/components/common/checkbox/style.test.ts +139 -0
  22. package/src/client/components/common/checkbox/style.ts +51 -0
  23. package/src/client/components/common/context-usage-button/index.tsx +2 -2
  24. package/src/client/components/common/file-icon/index.tsx +23 -9
  25. package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
  26. package/src/client/components/common/markdown-review/ReviewPopover.tsx +1 -1
  27. package/src/client/components/common/panel-mark/index.tsx +97 -0
  28. package/src/client/components/common/provider-icon/glyphs.test.ts +1 -1
  29. package/src/client/components/common/provider-icon/index.test.ts +14 -0
  30. package/src/client/components/common/provider-icon/index.tsx +4 -0
  31. package/src/client/components/common/provider-icon/resolve.test.ts +8 -7
  32. package/src/client/components/common/provider-icon/resolve.ts +16 -3
  33. package/src/client/components/common/session-actions-menu/index.tsx +1 -1
  34. package/src/client/components/common/toolbar-row/index.tsx +1 -1
  35. package/src/client/components/layout/ActivityBar.tsx +22 -3
  36. package/src/client/components/layout/LeftDock.tsx +9 -2
  37. package/src/client/components/layout/PanelVisibilityMenu.tsx +1 -1
  38. package/src/client/components/layout/WindowAura.tsx +27 -0
  39. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -1
  40. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +2 -2
  41. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +11 -2
  42. package/src/client/components/layout/desktop-layout/index.tsx +3 -1
  43. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +3 -3
  44. package/src/client/components/layout/session-sidebar/Header.tsx +1 -1
  45. package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
  46. package/src/client/components/layout/session-sidebar/Toolbar.tsx +1 -1
  47. package/src/client/components/layout/session-sidebar/about-modal/index.tsx +2 -2
  48. package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +1 -1
  49. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +13 -5
  50. package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
  51. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +2 -1
  52. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +2 -2
  53. package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
  54. package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
  55. package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +1 -1
  56. package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
  57. package/src/client/components/mobile/panel-chips.tsx +10 -2
  58. package/src/client/components/settings/Modal.tsx +4 -4
  59. package/src/client/components/settings/ProjectSelectorDropdown.tsx +2 -2
  60. package/src/client/components/settings/apply-side-effects.test.ts +30 -0
  61. package/src/client/components/settings/apply-side-effects.ts +14 -0
  62. package/src/client/components/settings/categories/AppearanceSettings.tsx +6 -0
  63. package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -1
  64. package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -1
  65. package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +144 -0
  66. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.test.tsx +120 -0
  67. package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +180 -0
  68. package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +2 -1
  69. package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +2 -2
  70. package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +1 -1
  71. package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +1 -1
  72. package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +21 -3
  73. package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +1 -1
  74. package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +51 -2
  75. package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +43 -10
  76. package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -1
  77. package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +2 -1
  78. package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +1 -1
  79. package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -1
  80. package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +2 -2
  81. package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +3 -2
  82. package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
  83. package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +3 -2
  84. package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +2 -1
  85. package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +1 -1
  86. package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
  87. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
  88. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +3 -3
  89. package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +2 -2
  90. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
  91. package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +4 -3
  92. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
  93. package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +1 -1
  94. package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +2 -2
  95. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
  96. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
  97. package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +2 -6
  98. package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +1 -1
  99. package/src/client/components/workspace/diff-panel/index.tsx +2 -2
  100. package/src/client/components/workspace/editor/PluginRail.tsx +1 -1
  101. package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
  102. package/src/client/components/workspace/editor/TabContextMenu.tsx +1 -1
  103. package/src/client/components/workspace/editor/Tabs.tsx +1 -1
  104. package/src/client/components/workspace/file-explorer/ContextMenu.tsx +1 -1
  105. package/src/client/components/workspace/file-explorer/Modals.tsx +10 -10
  106. package/src/client/components/workspace/file-explorer/RootMenu.tsx +1 -1
  107. package/src/client/components/workspace/git-panel/BranchToolbar.test.tsx +130 -0
  108. package/src/client/components/workspace/git-panel/BranchToolbar.tsx +21 -11
  109. package/src/client/components/workspace/git-panel/CommitBox.tsx +2 -1
  110. package/src/client/components/workspace/git-panel/Modals.tsx +2 -2
  111. package/src/client/components/workspace/git-panel/StashSection.tsx +2 -1
  112. package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -1
  113. package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +2 -1
  114. package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -2
  115. package/src/client/components/workspace/git-panel/index.tsx +7 -0
  116. package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
  117. package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
  118. package/src/client/components/workspace/plugin-panel/catalog.tsx +7 -0
  119. package/src/client/components/workspace/plugin-panel/resolve.tsx +4 -0
  120. package/src/client/components/workspace/search-panel/Body.tsx +1 -1
  121. package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +1 -1
  122. package/src/client/glass.css +785 -0
  123. package/src/client/glass.test.ts +346 -0
  124. package/src/client/hooks/ui/glass-support.ts +57 -0
  125. package/src/client/hooks/ui/icon-style.ts +59 -0
  126. package/src/client/hooks/ui/stuck-header.test.ts +188 -0
  127. package/src/client/hooks/ui/stuck-header.ts +91 -0
  128. package/src/client/hooks/ui/style-attributes.test.ts +120 -0
  129. package/src/client/hooks/ui/surface-style.ts +56 -0
  130. package/src/client/hooks/workspace/panel-hues.ts +23 -0
  131. package/src/client/main.tsx +10 -0
  132. package/src/client/tailwind.css +264 -11
  133. package/src/server/lib/assets/shell-attributes.server.ts +80 -0
  134. package/src/server/lib/assets/shell-attributes.test.ts +86 -0
  135. package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +1 -0
  136. package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +2 -30
  137. package/src/server/lib/omp/rpc/frame-fold.test.ts +55 -0
  138. package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
  139. package/src/server/lib/omp/rpc/manager.ts +2 -2
  140. package/src/server/lib/omp/rpc/process-helpers.ts +11 -0
  141. package/src/server/lib/omp/rpc/process.test.ts +106 -0
  142. package/src/server/lib/omp/rpc/process.ts +28 -4
  143. package/src/server/lib/omp/rpc/run-settle.server.ts +12 -0
  144. package/src/server/lib/omp/rpc/run-settle.test.ts +22 -0
  145. package/src/server/lib/omp/rpc/session-command-guards.ts +5 -0
  146. package/src/server/lib/omp/rpc/session-commands.test.ts +9 -1
  147. package/src/server/lib/omp/rpc/session-commands.ts +11 -0
  148. package/src/server/lib/omp/rpc/terminal-settle.ts +29 -7
  149. package/src/server/lib/panels/bundled-catalog.server.ts +1 -0
  150. package/src/server/lib/panels/manifest.test.ts +20 -0
  151. package/src/server/lib/panels/manifest.ts +12 -0
  152. package/src/server/lib/panels/scan.server.ts +4 -0
  153. package/src/server/lib/queue/delivery-dispatch.server.test.ts +48 -0
  154. package/src/server/lib/queue/delivery-harness.ts +8 -4
  155. package/src/server/lib/queue/delivery.server.test.ts +29 -0
  156. package/src/server/lib/queue/delivery.server.ts +39 -0
  157. package/src/server/lib/queue/store.server.test.ts +22 -2
  158. package/src/server/lib/queue/store.server.ts +33 -11
  159. package/src/server/plugins/ssr.ts +22 -5
  160. package/src/shared/lib/icons/file-brand-color.ts +38 -0
  161. package/src/shared/lib/icons/icon-paint-css.test.ts +234 -0
  162. package/src/shared/lib/icons/icon-paint-css.ts +284 -0
  163. package/src/shared/lib/icons/icon-paint-panel.ts +100 -0
  164. package/src/shared/lib/icons/tint-hues.generated.ts +230 -0
  165. package/src/shared/lib/icons/tint.test.ts +273 -0
  166. package/src/shared/lib/icons/tint.ts +219 -0
  167. package/src/shared/lib/models/provider/brand-color.test.ts +116 -0
  168. package/src/shared/lib/models/provider/brand-color.ts +103 -0
  169. package/src/shared/lib/omp/rpc/frame.test.ts +65 -0
  170. package/src/shared/lib/omp/rpc/frame.ts +58 -3
  171. package/src/shared/lib/settings/defaults.ts +4 -0
  172. package/src/shared/lib/theme/catalog.test.ts +5 -4
  173. package/src/shared/lib/theme/catalog.ts +18 -3
  174. package/src/shared/lib/theme/glass-support.test.ts +38 -0
  175. package/src/shared/lib/theme/glass-support.ts +73 -0
  176. package/src/shared/lib/theme/icon-style.test.ts +74 -0
  177. package/src/shared/lib/theme/icon-style.ts +90 -0
  178. package/src/shared/lib/theme/legibility.ts +91 -0
  179. package/src/shared/lib/theme/palettes/dark-extended.ts +152 -0
  180. package/src/shared/lib/theme/palettes/light-extended.ts +157 -0
  181. package/src/shared/lib/theme/surface-style.test.ts +68 -0
  182. package/src/shared/lib/theme/surface-style.ts +91 -0
  183. package/src/shared/lib/theme/theme.test.ts +11 -7
  184. package/src/shared/lib/workspace/panel-hues.test.ts +68 -0
  185. package/src/shared/lib/workspace/panel-hues.ts +57 -0
  186. package/src/shared/types/panels-registry.ts +6 -0
  187. package/src/shared/types/panels.ts +14 -0
  188. package/src/shared/types/settings/state.ts +26 -0
  189. package/src/test-support/fake-omp-frames.ts +163 -0
  190. package/dist/client/static/js/index-hp75vsv9.css +0 -1
  191. /package/src/{client/components/common/file-icon/brand-paths.ts → shared/lib/icons/file-brand-paths.ts} +0 -0
@@ -0,0 +1,130 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The Sync button's spinner contract.
8
+ *
9
+ * The button carries the ahead/behind counts and a pull+push can run for
10
+ * seconds; a static `RefreshCw` made it look unpressed. `syncing` is derived
11
+ * from the ACTION, not from `isBusy` — `isBusy` also covers the status read and
12
+ * every other mutation, and a commit must not spin this badge.
13
+ */
14
+
15
+ import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
16
+ import { Window } from 'happy-dom';
17
+ import { h, render } from 'preact';
18
+ import { act } from 'preact/test-utils';
19
+ import { GitBranchToolbar } from '@/client/components/workspace/git-panel/BranchToolbar';
20
+ import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
21
+
22
+ let container: HTMLElement;
23
+ let syncClicks: number;
24
+
25
+ beforeAll(() => {
26
+ installDomGlobals(new Window({ url: 'http://localhost' }));
27
+ });
28
+
29
+ afterEach(() => {
30
+ if (container) {
31
+ render(null, container);
32
+ container.remove();
33
+ }
34
+ });
35
+
36
+ afterAll(() => {
37
+ restoreDomGlobals();
38
+ });
39
+
40
+ function mount({ syncing = false, isBusy = false }: { syncing?: boolean; isBusy?: boolean } = {}): void {
41
+ syncClicks = 0;
42
+ container = document.createElement('div');
43
+ document.body.appendChild(container);
44
+ act(() => {
45
+ render(
46
+ h(GitBranchToolbar, {
47
+ branchRef: { current: null },
48
+ showBranchMenu: false,
49
+ setShowBranchMenu: () => {},
50
+ branch: 'main',
51
+ branches: ['main'],
52
+ remoteBranches: [],
53
+ onCheckout: () => {},
54
+ onMerge: () => {},
55
+ onOpenBranchPrompt: () => {},
56
+ onManageBranches: () => {},
57
+ optionsRef: { current: null },
58
+ showOptions: false,
59
+ setShowOptions: () => {},
60
+ onHistory: () => {},
61
+ onGraph: () => {},
62
+ viewMode: 'flat',
63
+ setViewMode: () => {},
64
+ isBusy,
65
+ syncCount: { ahead: 2, behind: 1 },
66
+ syncing,
67
+ onSync: () => {
68
+ syncClicks += 1;
69
+ },
70
+ onFetch: () => {},
71
+ }),
72
+ container,
73
+ );
74
+ });
75
+ }
76
+
77
+ function syncButton(): HTMLButtonElement {
78
+ const el = container.querySelector('button[aria-label="Sync with upstream"]');
79
+ if (!el) throw new Error('no Sync button rendered');
80
+ return el as HTMLButtonElement;
81
+ }
82
+
83
+ describe('GitBranchToolbar Sync spinner', () => {
84
+ test('idle: no rotation, counts still printed', () => {
85
+ mount();
86
+
87
+ const button = syncButton();
88
+ expect(button.querySelector('svg.animate-spin')).toBeNull();
89
+ expect(button.getAttribute('aria-busy')).not.toBe('true');
90
+ expect(button.textContent).toContain('↑2');
91
+ expect(button.textContent).toContain('↓1');
92
+ });
93
+
94
+ test('syncing: the SAME glyph rotates — the icon is not swapped', () => {
95
+ mount();
96
+ const idleGlyph = syncButton().querySelector('svg')?.innerHTML;
97
+ render(null, container);
98
+ container.remove();
99
+
100
+ mount({ syncing: true });
101
+ const spinning = syncButton().querySelector('svg');
102
+ expect(spinning).not.toBeNull();
103
+ expect(spinning!.classList.contains('animate-spin')).toBe(true);
104
+ // Rotating one glyph is the point: a swap would change the paths, and a
105
+ // different mark makes the control look like it changed identity mid-press.
106
+ expect(spinning!.innerHTML).toBe(idleGlyph ?? '');
107
+ expect(syncButton().getAttribute('aria-busy')).toBe('true');
108
+ expect(syncButton().getAttribute('title')).toBe('Syncing with upstream…');
109
+ // The counts stay visible — the spin marks the ACTION, the numbers mark
110
+ // how much work it covers.
111
+ expect(syncButton().textContent).toContain('↑2');
112
+ expect(syncButton().textContent).toContain('↓1');
113
+ });
114
+
115
+ test('clicking dispatches onSync', () => {
116
+ mount();
117
+
118
+ act(() => {
119
+ syncButton().click();
120
+ });
121
+
122
+ expect(syncClicks).toBe(1);
123
+ });
124
+
125
+ test('busy disables the button', () => {
126
+ mount({ isBusy: true, syncing: true });
127
+
128
+ expect(syncButton().disabled).toBe(true);
129
+ });
130
+ });
@@ -23,6 +23,8 @@ interface GitBranchToolbarProps {
23
23
  setViewMode: (mode: 'flat' | 'tree') => void;
24
24
  isBusy?: boolean;
25
25
  syncCount?: { ahead: number; behind: number };
26
+ /** A pull/push (the Sync action) is in flight — the button shows a spinner. */
27
+ syncing?: boolean;
26
28
  onSync: () => void;
27
29
  /** Refresh the remote-tracking refs without moving the branch. */
28
30
  onFetch: () => void;
@@ -50,6 +52,7 @@ export function GitBranchToolbar({
50
52
  setViewMode,
51
53
  isBusy = false,
52
54
  syncCount = { ahead: 0, behind: 0 },
55
+ syncing = false,
53
56
  onSync,
54
57
  onFetch,
55
58
  detached = false,
@@ -68,7 +71,7 @@ export function GitBranchToolbar({
68
71
  </button>
69
72
 
70
73
  {showBranchMenu && (
71
- <div className="absolute top-full left-0 mt-1 w-56 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
74
+ <div className="glass-popover absolute top-full left-0 mt-1 w-56 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
72
75
  <div className="max-h-48 scrollbar-overlay-container py-1">
73
76
  {branches.length > 0 && (
74
77
  <>
@@ -178,18 +181,25 @@ export function GitBranchToolbar({
178
181
  onClick={onSync}
179
182
  disabled={isBusy}
180
183
  title={
181
- syncCount.ahead > 0 && syncCount.behind > 0
182
- ? `Pull ${syncCount.behind} then push ${syncCount.ahead} commit(s)`
183
- : syncCount.ahead > 0
184
- ? `Push ${syncCount.ahead} commit(s)`
185
- : syncCount.behind > 0
186
- ? `Pull ${syncCount.behind} commit(s)`
187
- : 'Up to date — sync anyway'
184
+ syncing
185
+ ? 'Syncing with upstream…'
186
+ : syncCount.ahead > 0 && syncCount.behind > 0
187
+ ? `Pull ${syncCount.behind} then push ${syncCount.ahead} commit(s)`
188
+ : syncCount.ahead > 0
189
+ ? `Push ${syncCount.ahead} commit(s)`
190
+ : syncCount.behind > 0
191
+ ? `Pull ${syncCount.behind} commit(s)`
192
+ : 'Up to date — sync anyway'
188
193
  }
189
194
  aria-label="Sync with upstream"
190
- className="flex items-center gap-1 p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:opacity-40 disabled:cursor-not-allowed"
195
+ aria-busy={syncing}
196
+ className={`flex items-center gap-1 p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:cursor-not-allowed ${syncing ? '' : 'disabled:opacity-40'}`}
191
197
  >
192
- <RefreshCw size={13} />
198
+ {/* The glyph ROTATES rather than being swapped for a spinner: the
199
+ button keeps one identity (the refresh mark it always had), its
200
+ width cannot shift under the counts, and the spin is the same
201
+ idiom the panel's own Refresh uses (`RepoHeader`). */}
202
+ <RefreshCw size={13} className={syncing ? 'animate-spin' : ''} aria-hidden="true" />
193
203
  <span className="font-mono tabular-nums text-[10px]">↑{syncCount.ahead} ↓{syncCount.behind}</span>
194
204
  </button>
195
205
 
@@ -225,7 +235,7 @@ export function GitBranchToolbar({
225
235
  </button>
226
236
 
227
237
  {showOptions && (
228
- <div className="absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs">
238
+ <div className="glass-popover absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs">
229
239
  <button
230
240
  type="button"
231
241
  onClick={() => { setViewMode('flat'); setShowOptions(false); }}
@@ -1,3 +1,4 @@
1
+ import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
1
2
  import { Check } from 'lucide-preact';
2
3
 
3
4
  interface GitCommitBoxProps {
@@ -79,7 +80,7 @@ export function GitCommitBox({
79
80
  type="checkbox"
80
81
  checked={amend}
81
82
  onChange={(e) => onToggleAmend?.(e.currentTarget.checked)}
82
- className="accent-ink cursor-pointer"
83
+ className={`${CHECKBOX_CLASS} accent-ink cursor-pointer`}
83
84
  />
84
85
  Amend
85
86
  </label>
@@ -7,13 +7,13 @@ export { GitCommitModal as GitOutputModal } from '@/client/components/workspace/
7
7
  function ModalShell({ children, onClose }: { children: ReactNode; onClose: () => void }) {
8
8
  return (
9
9
  <div
10
- className="fixed inset-0 z-50 bg-canvas/80 flex items-center justify-center p-4"
10
+ className="fixed inset-0 z-50 modal-scrim flex items-center justify-center p-4"
11
11
  onClick={onClose}
12
12
  role="dialog"
13
13
  aria-modal="true"
14
14
  >
15
15
  <div
16
- className="bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]"
16
+ className="glass-overlay bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]"
17
17
  onClick={(e) => e.stopPropagation()}
18
18
  >
19
19
  {children}
@@ -1,3 +1,4 @@
1
+ import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
1
2
  import { useCallback, useEffect, useId, useState } from 'preact/hooks';
2
3
  import { Archive, Download, Plus, Trash2 } from 'lucide-preact';
3
4
  import type { GitStashEntry } from '@/shared/types/git';
@@ -176,7 +177,7 @@ export function GitStashSection({ rootPath, repo, isBusy, onAction }: GitStashSe
176
177
  type="checkbox"
177
178
  checked={untracked}
178
179
  onChange={(e) => setUntracked(e.currentTarget.checked)}
179
- className="accent-ink cursor-pointer"
180
+ className={`${CHECKBOX_CLASS} accent-ink cursor-pointer`}
180
181
  />
181
182
  -u
182
183
  </label>
@@ -1,3 +1,4 @@
1
+ import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
1
2
  import { AlertTriangle } from 'lucide-preact';
2
3
  import { Modal } from '@/client/components/common/Modal';
3
4
  import type { GitBranchDetail } from '@/shared/types/git';
@@ -73,7 +74,7 @@ export function DeleteBranchDialog({
73
74
  type="checkbox"
74
75
  checked={force}
75
76
  onChange={(e) => onForceChange(e.currentTarget.checked)}
76
- className="accent-error cursor-pointer mt-0.5"
77
+ className={`${CHECKBOX_CLASS} accent-error cursor-pointer mt-0.5`}
77
78
  />
78
79
  <span className="flex flex-col gap-0.5">
79
80
  <span className="text-error font-medium">Delete even if its commits are not merged</span>
@@ -1,3 +1,4 @@
1
+ import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
1
2
  import { useState } from 'preact/hooks';
2
3
  import { Modal } from '@/client/components/common/Modal';
3
4
  import type { GitBranchDetail } from '@/shared/types/git';
@@ -117,7 +118,7 @@ function RenameBranchForm({
117
118
  type="checkbox"
118
119
  checked={remote}
119
120
  onChange={(e) => setRemote(e.currentTarget.checked)}
120
- className="accent-ink cursor-pointer mt-0.5"
121
+ className={`${CHECKBOX_CLASS} accent-ink cursor-pointer mt-0.5`}
121
122
  />
122
123
  <span className="flex flex-col gap-0.5">
123
124
  <span>Also rename it on the remote</span>
@@ -224,13 +224,13 @@ export function GitCommitModal({
224
224
 
225
225
  return (
226
226
  <div
227
- className="fixed inset-0 z-50 bg-canvas/80 backdrop-blur-xs flex items-center justify-center p-0 lg:p-5"
227
+ className="fixed inset-0 z-50 modal-scrim backdrop-blur-xs flex items-center justify-center p-0 lg:p-5"
228
228
  onClick={onClose}
229
229
  role="dialog"
230
230
  aria-modal="true"
231
231
  >
232
232
  <div
233
- className="bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
233
+ className="glass-overlay bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
234
234
  w-full h-full rounded-none border-0
235
235
  lg:w-[min(94vw,1200px)] lg:h-[88vh] lg:rounded-xl lg:border
236
236
  pt-[env(safe-area-inset-top,0px)] lg:pt-0"
@@ -141,6 +141,12 @@ export function GitPanel({ className = '', enabled = true, rootPath, refreshKey
141
141
  // controls; a topic PUSH must not, or a background tool call would lock the
142
142
  // commit box for a beat.
143
143
  const isBusy = isReading || actionFetcher.state !== 'idle';
144
+ // The Sync button's own spinner. `isBusy` covers every action plus the status
145
+ // read, but only a pull/push is "syncing" — a commit or a stage must not spin
146
+ // the badge. `lastAction` is recorded by `execute` before the submit, so the
147
+ // first render after the fetch starts already names the right action.
148
+ const runningAction = actionFetcher.state === 'idle' ? null : actionFetcher.lastAction?.actionType ?? null;
149
+ const isSyncing = runningAction === 'sync' || runningAction === 'push' || runningAction === 'pull';
144
150
 
145
151
  // Unmerged pairs are excluded for the same reason `GitChangesList` excludes
146
152
  // them: their two letters are the two SIDES of a conflict, so the column test
@@ -264,6 +270,7 @@ export function GitPanel({ className = '', enabled = true, rootPath, refreshKey
264
270
  setViewMode={setViewMode}
265
271
  isBusy={isBusy}
266
272
  syncCount={syncCount}
273
+ syncing={isSyncing}
267
274
  onSync={() => executeAction('sync')}
268
275
  onFetch={() => executeAction('fetch')}
269
276
  detached={data?.state?.detached ?? false}
@@ -86,7 +86,7 @@ export function ModelDropdownPanel({
86
86
 
87
87
  return (
88
88
  <div className="absolute bottom-full left-0 mb-2.5 z-50 flex items-start">
89
- <div ref={panelRef} className="w-84 sm:w-96 bg-paper border border-ink/20 rounded-xl shadow-2xl flex flex-col overflow-hidden text-xs max-h-[460px] animate-in fade-in zoom-in-95 duration-100">
89
+ <div ref={panelRef} className="glass-popover w-84 sm:w-96 bg-paper border border-ink/20 rounded-xl shadow-2xl flex flex-col overflow-hidden text-xs max-h-[460px] animate-in fade-in zoom-in-95 duration-100">
90
90
  <ModelDropdownHeader
91
91
  search={search}
92
92
  onSearchChange={onSearchChange}
@@ -114,7 +114,7 @@ export function ModelSpecsTooltip({ model }: ModelSpecsTooltipProps) {
114
114
  // `pointer-events-none`: the card sits beside the list, so a card that
115
115
  // captured the pointer would take the hover off the row it describes and
116
116
  // flicker as the reader moved toward it.
117
- className="w-72 bg-paper/95 backdrop-blur-sm border border-ink/20 rounded-xl shadow-2xl p-3.5 text-xs text-ink select-none pointer-events-none animate-in fade-in zoom-in-95 duration-100"
117
+ className="glass-popover w-72 bg-paper/95 backdrop-blur-sm border border-ink/20 rounded-xl shadow-2xl p-3.5 text-xs text-ink select-none pointer-events-none animate-in fade-in zoom-in-95 duration-100"
118
118
  >
119
119
  {facts.length > 0 && (
120
120
  <dl className={GRID}>
@@ -66,6 +66,12 @@ export interface ResolvedPanel {
66
66
  icon?: ReactNode;
67
67
  /** A plugin's icon URL, when its manifest declares one. */
68
68
  iconUrl?: string;
69
+ /**
70
+ * The colour a plugin's mark is drawn in, when its manifest declares one.
71
+ * A built-in view never carries this: its mark is a glyph, and the palette
72
+ * decides its colour.
73
+ */
74
+ color?: string;
69
75
  /** The plugin's display name; empty for a built-in view. */
70
76
  name: string;
71
77
  builtin: boolean;
@@ -178,6 +184,7 @@ export function usePanelCatalog(side: PanelCatalogSide = 'right'): ResolvedPanel
178
184
  defaultWidth: widths.px,
179
185
  defaultFraction: widths.fraction,
180
186
  ...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
187
+ ...(panel.color ? { color: panel.color } : {}),
181
188
  // Wrapped so the kit's participant hooks resolve THIS plugin's id while
182
189
  // its panel renders — the scope is what `useRpc`/`useRealtime` read.
183
190
  // The boundary is the other half: a plugin component that throws must
@@ -19,6 +19,8 @@ export interface ResolvedPluginPanel {
19
19
  title: string;
20
20
  Component: ComponentType<RightPanelProps>;
21
21
  iconUrl?: string;
22
+ /** The mark colour the plugin's manifest declares, when it declares one. */
23
+ color?: string;
22
24
  /** Sizing the bundle declared, passed through to the width resolver. */
23
25
  minWidth?: number;
24
26
  defaultFraction?: number;
@@ -61,6 +63,7 @@ export function usePluginPanels(activePanel: string): PluginPanels {
61
63
  title: entry?.titles.rightPanel ?? panel.name,
62
64
  Component,
63
65
  ...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
66
+ ...(panel.color ? { color: panel.color } : {}),
64
67
  ...(size?.minWidth !== undefined ? { minWidth: size.minWidth } : {}),
65
68
  ...(size?.defaultFraction !== undefined ? { defaultFraction: size.defaultFraction } : {}),
66
69
  });
@@ -135,6 +138,7 @@ export function usePanelSlotPlugins(): ResolvedPluginPanel[] {
135
138
  title: entry?.titles.panel ?? panel.name,
136
139
  Component: Component as ResolvedPluginPanel['Component'],
137
140
  ...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
141
+ ...(panel.color ? { color: panel.color } : {}),
138
142
  ...(size?.minWidth !== undefined ? { minWidth: size.minWidth } : {}),
139
143
  ...(size?.defaultFraction !== undefined ? { defaultFraction: size.defaultFraction } : {}),
140
144
  });
@@ -160,7 +160,7 @@ export function SearchPanelBody({
160
160
  </button>
161
161
 
162
162
  {showMenu && (
163
- <div className="absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1">
163
+ <div className="glass-popover absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1">
164
164
  <button
165
165
  onClick={() => {
166
166
  setShowIncludeField(!showIncludeField);
@@ -144,7 +144,7 @@ export function ProviderSelect({ providers, value, onChange }: ProviderSelectPro
144
144
  </button>
145
145
 
146
146
  {open && (
147
- <div className="absolute top-full left-0 mt-1 w-52 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
147
+ <div className="glass-popover absolute top-full left-0 mt-1 w-52 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
148
148
  <div className="px-2 py-1.5 border-b border-ink/10 flex items-center gap-1.5">
149
149
  <Search size={11} className="text-ink/40 flex-shrink-0" />
150
150
  <input