@kabmo-labs/kabmo 0.27.0 → 0.28.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 (303) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +495 -467
  3. package/dist/client/static/js/index-81f7berm.css +1 -0
  4. package/dist/client/static/js/{index-e3qh2yps.js → index-xzvyrxya.js} +795 -795
  5. package/marketplace/plugins/command-runner/package.json +3 -17
  6. package/marketplace/plugins/command-runner/settings-schema.json +14 -0
  7. package/marketplace/plugins/git-forge/README.md +17 -7
  8. package/marketplace/plugins/git-forge/package.json +4 -30
  9. package/marketplace/plugins/git-forge/panel.css +16 -0
  10. package/marketplace/plugins/git-forge/settings-schema.json +27 -0
  11. package/marketplace/plugins/git-forge/src/panel/Badge.tsx +35 -22
  12. package/marketplace/plugins/git-forge/src/panel/Change.tsx +20 -24
  13. package/marketplace/plugins/git-forge/src/panel/CiBadge.tsx +16 -7
  14. package/marketplace/plugins/git-forge/src/panel/Credential.tsx +31 -26
  15. package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +18 -2
  16. package/marketplace/plugins/git-forge/src/panel/Header.tsx +160 -96
  17. package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +60 -44
  18. package/marketplace/plugins/git-forge/src/panel/List.tsx +150 -22
  19. package/marketplace/plugins/git-forge/src/panel/Row.tsx +11 -5
  20. package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +17 -15
  21. package/marketplace/plugins/git-forge/src/panel/Write.tsx +84 -61
  22. package/marketplace/plugins/git-forge/src/panel/format.test.ts +99 -0
  23. package/marketplace/plugins/git-forge/src/panel/format.ts +59 -16
  24. package/marketplace/plugins/git-forge/src/panel/index.test.tsx +109 -5
  25. package/marketplace/plugins/git-forge/src/panel/index.tsx +37 -4
  26. package/marketplace/plugins/git-forge/src/panel/use-forge.ts +17 -0
  27. package/marketplace/plugins/git-forge/src/panel/write.test.tsx +31 -0
  28. package/marketplace/plugins/session-info/package.json +2 -10
  29. package/marketplace/plugins/session-info/settings-schema.json +8 -0
  30. package/marketplace/plugins/stats/README.md +17 -5
  31. package/marketplace/plugins/stats/package.json +3 -23
  32. package/marketplace/plugins/stats/settings-schema.json +20 -0
  33. package/marketplace/plugins/stats/src/app.tsx +1 -1
  34. package/marketplace/plugins/stats/src/groups.test.ts +46 -1
  35. package/marketplace/plugins/stats/src/groups.ts +22 -11
  36. package/marketplace/plugins/stats/src/harness-leases.test.ts +84 -0
  37. package/marketplace/plugins/stats/src/harness-leases.ts +132 -0
  38. package/marketplace/plugins/stats/src/labels.test.ts +54 -1
  39. package/marketplace/plugins/stats/src/labels.ts +33 -7
  40. package/marketplace/plugins/stats/src/sampler.test.ts +61 -0
  41. package/marketplace/plugins/stats/src/sampler.ts +39 -5
  42. package/marketplace/plugins/stats/src/snapshot.ts +6 -0
  43. package/package.json +2 -2
  44. package/src/client/components/common/harness-glyph/index.tsx +18 -1
  45. package/src/client/components/common/session-actions-menu/index.test.tsx +106 -0
  46. package/src/client/components/common/session-actions-menu/index.tsx +43 -1
  47. package/src/client/components/common/session-row/TrailingSlot.tsx +9 -4
  48. package/src/client/components/common/session-row/index.tsx +4 -0
  49. package/src/client/components/common/session-row/session-row.test.tsx +6 -0
  50. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +2 -1
  51. package/src/client/components/layout/session-sidebar/SessionItem.tsx +9 -1
  52. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +2 -1
  53. package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +202 -0
  54. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +80 -19
  55. package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +23 -3
  56. package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +3 -0
  57. package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +156 -0
  58. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +41 -86
  59. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +2 -1
  60. package/src/client/components/mobile/mobile-session-sidebar/SessionRow.test.ts +6 -0
  61. package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +9 -1
  62. package/src/client/components/settings/Modal.tsx +6 -2
  63. package/src/client/components/settings/Sidebar.tsx +30 -3
  64. package/src/client/components/settings/categories/HarnessSettings.tsx +11 -7
  65. package/src/client/components/settings/categories/NotificationSettings.test.tsx +40 -15
  66. package/src/client/components/settings/categories/NotificationSettings.tsx +142 -64
  67. package/src/client/components/settings/categories/PanelPluginSettings.tsx +1 -1
  68. package/src/client/components/settings/categories/harness-settings/CustomHarnessForm.tsx +186 -0
  69. package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +11 -0
  70. package/src/client/components/settings/categories/panel-plugins/PluginCard.test.tsx +1 -0
  71. package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +15 -1
  72. package/src/client/components/settings/categories/panel-plugins/SettingsModal.test.tsx +165 -0
  73. package/src/client/components/settings/categories/panel-plugins/SettingsModal.tsx +260 -0
  74. package/src/client/components/workspace/chat-timeline/AiMessageFooter.fork.test.ts +24 -0
  75. package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +8 -4
  76. package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +34 -0
  77. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -2
  78. package/src/client/components/workspace/chat-timeline/MessageItem.fork.test.ts +80 -0
  79. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +9 -3
  80. package/src/client/components/workspace/chat-timeline/MessageList.tsx +3 -1
  81. package/src/client/components/workspace/chat-timeline/RunFooter.tsx +2 -1
  82. package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +2 -1
  83. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +8 -0
  84. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +9 -0
  85. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +4 -1
  86. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +24 -0
  87. package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +13 -20
  88. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +2 -0
  89. package/src/client/components/workspace/chat-timeline/chat-input/props.ts +5 -5
  90. package/src/client/components/workspace/chat-timeline/index.tsx +11 -5
  91. package/src/client/components/workspace/chat-timeline/target-picker/DraftTargetRow.tsx +1 -9
  92. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +101 -0
  93. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +2 -2
  94. package/src/client/components/workspace/editor/FilePane.tsx +9 -4
  95. package/src/client/components/workspace/editor/Notices.tsx +2 -2
  96. package/src/client/components/workspace/editor/Pane.tsx +2 -2
  97. package/src/client/components/workspace/editor/Toolbar.tsx +16 -10
  98. package/src/client/components/workspace/editor/index.tsx +6 -10
  99. package/src/client/components/workspace/editor/toolbar-clusters.test.ts +4 -3
  100. package/src/client/components/workspace/editor/toolbar-clusters.tsx +23 -14
  101. package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +9 -1
  102. package/src/client/components/workspace/terminal-panel/focus.test.ts +70 -0
  103. package/src/client/components/workspace/terminal-panel/focus.ts +46 -0
  104. package/src/client/components/workspace/terminal-panel/index.tsx +14 -1
  105. package/src/client/components/workspace/terminal-panel/mount.ts +17 -9
  106. package/src/client/components/workspace/terminal-panel/scroll-hold.test.ts +158 -0
  107. package/src/client/components/workspace/terminal-panel/scroll-hold.ts +136 -0
  108. package/src/client/hooks/chat/composer/use-draft.ts +45 -1
  109. package/src/client/hooks/chat/omp/pending-sessions.waiting.test.ts +11 -10
  110. package/src/client/hooks/chat/omp/pending-waiting.ts +15 -7
  111. package/src/client/hooks/chat/omp/prompt-send.test.ts +11 -0
  112. package/src/client/hooks/chat/omp/prompt-send.ts +3 -0
  113. package/src/client/hooks/chat/timeline/actions.ts +4 -4
  114. package/src/client/hooks/chat/timeline/composer-modes.ts +13 -2
  115. package/src/client/hooks/chat/timeline/fork-open.ts +52 -0
  116. package/src/client/hooks/chat/timeline/index.ts +5 -2
  117. package/src/client/hooks/chat/timeline/mode-availability.ts +7 -0
  118. package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
  119. package/src/client/hooks/chat/timeline/modes-hydrate.ts +93 -0
  120. package/src/client/hooks/chat/timeline/modes.ts +32 -52
  121. package/src/client/hooks/chat/timeline/new-chat-open.ts +7 -6
  122. package/src/client/hooks/chat/timeline/new-chat.ts +10 -1
  123. package/src/client/hooks/chat/timeline/pending-dispatch.ts +4 -0
  124. package/src/client/hooks/chat/timeline/pending-session-mode.test.ts +136 -0
  125. package/src/client/hooks/chat/timeline/pending-session-mode.ts +69 -0
  126. package/src/client/hooks/chat/timeline/pending-warmup.test.ts +147 -0
  127. package/src/client/hooks/chat/timeline/pending-warmup.ts +62 -0
  128. package/src/client/hooks/chat/timeline/run-identity.test.ts +12 -0
  129. package/src/client/hooks/chat/timeline/run-identity.ts +4 -1
  130. package/src/client/hooks/chat/timeline/send-props.ts +2 -0
  131. package/src/client/hooks/chat/timeline/send-steer.test.ts +1 -0
  132. package/src/client/hooks/chat/timeline/send.test-util.ts +1 -0
  133. package/src/client/hooks/chat/timeline/send.test.ts +1 -0
  134. package/src/client/hooks/chat/timeline/session-harness.ts +4 -0
  135. package/src/client/hooks/chat/timeline/use-fork-session.ts +9 -22
  136. package/src/client/hooks/chat/waiting/cancel.ts +13 -6
  137. package/src/client/hooks/chat/waiting/choice.ts +13 -16
  138. package/src/client/hooks/chat/waiting/composer-wait.ts +70 -0
  139. package/src/client/hooks/chat/waiting/dispatch.ts +48 -28
  140. package/src/client/hooks/chat/waiting/held.ts +37 -13
  141. package/src/client/hooks/chat/waiting/hold.test.ts +22 -0
  142. package/src/client/hooks/chat/waiting/hold.ts +20 -11
  143. package/src/client/hooks/chat/waiting/restore.test.ts +69 -0
  144. package/src/client/hooks/chat/waiting/restore.ts +34 -0
  145. package/src/client/hooks/chat/waiting/store.ts +9 -3
  146. package/src/client/hooks/editor/file-editor-types.ts +21 -12
  147. package/src/client/hooks/editor/save-file.test.ts +1 -1
  148. package/src/client/hooks/editor/save-file.ts +35 -8
  149. package/src/client/hooks/editor/target-key.ts +17 -0
  150. package/src/client/hooks/editor/use-disk-digest.test.ts +82 -0
  151. package/src/client/hooks/editor/use-disk-digest.ts +164 -0
  152. package/src/client/hooks/editor/use-disk-sync.ts +212 -0
  153. package/src/client/hooks/editor/use-file-cache.ts +113 -0
  154. package/src/client/hooks/editor/use-file-editor.test.ts +90 -0
  155. package/src/client/hooks/editor/use-file-editor.ts +90 -52
  156. package/src/client/hooks/editor/use-file-read.ts +24 -10
  157. package/src/client/hooks/editor/use-file-writes.ts +4 -4
  158. package/src/client/hooks/models/harness-catalog.ts +15 -0
  159. package/src/client/hooks/ui/notifications.ts +17 -8
  160. package/src/client/hooks/workspace/panel-registry.ts +1 -1
  161. package/src/client/hooks/workspace/scheduled-tasks.ts +26 -11
  162. package/src/client/lib/notifications/os.test.ts +1 -30
  163. package/src/client/lib/notifications/os.ts +0 -15
  164. package/src/client/lib/notifications/platform.test.ts +68 -0
  165. package/src/client/lib/notifications/platform.ts +36 -0
  166. package/src/server/index.ts +7 -0
  167. package/src/server/lib/harness/acp/client.ts +81 -87
  168. package/src/server/lib/harness/acp/prewarm.server.ts +237 -0
  169. package/src/server/lib/harness/acp/prewarm.test.ts +171 -0
  170. package/src/server/lib/harness/acp/prompt.test.ts +70 -1
  171. package/src/server/lib/harness/acp/prompt.ts +32 -1
  172. package/src/server/lib/harness/acp/protocol.ts +23 -0
  173. package/src/server/lib/harness/acp/session-handshake.test.ts +26 -0
  174. package/src/server/lib/harness/acp/session-handshake.ts +22 -20
  175. package/src/server/lib/harness/acp/session-options.ts +16 -0
  176. package/src/server/lib/harness/acp/session-process.ts +43 -0
  177. package/src/server/lib/harness/acp/session.ts +11 -12
  178. package/src/server/lib/harness/acp/stdio.ts +129 -0
  179. package/src/server/lib/harness/acp/verbs.test.ts +97 -0
  180. package/src/server/lib/harness/acp/verbs.ts +16 -6
  181. package/src/server/lib/harness/auto-probe.server.ts +4 -3
  182. package/src/server/lib/harness/capabilities.ts +8 -0
  183. package/src/server/lib/harness/config.server.ts +3 -2
  184. package/src/server/lib/harness/custom.server.ts +209 -0
  185. package/src/server/lib/harness/launch.ts +6 -1
  186. package/src/server/lib/harness/register.server.ts +8 -1
  187. package/src/server/lib/harness/schema.server.ts +21 -0
  188. package/src/server/lib/harness/session-lease.server.test.ts +99 -0
  189. package/src/server/lib/harness/session-lease.server.ts +193 -0
  190. package/src/server/lib/harness/session-store.server.test.ts +8 -8
  191. package/src/server/lib/harness/session-store.server.ts +25 -4
  192. package/src/server/lib/harness/session-title.server.ts +12 -2
  193. package/src/server/lib/harness/spawn.server.ts +123 -20
  194. package/src/server/lib/harness/update-queue.server.ts +3 -3
  195. package/src/server/lib/lifecycle/after-listen.ts +12 -1
  196. package/src/server/lib/lifecycle/paths.ts +19 -1
  197. package/src/server/lib/mcp/registry.server.ts +155 -0
  198. package/src/server/lib/mcp/registry.test.ts +169 -0
  199. package/src/server/lib/mcp/store.server.ts +38 -0
  200. package/src/server/lib/omp/rpc/frame-fold-contract.ts +59 -0
  201. package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +64 -1
  202. package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +2 -1
  203. package/src/server/lib/omp/rpc/frame-fold.test.ts +2 -1
  204. package/src/server/lib/omp/rpc/frame-fold.ts +6 -45
  205. package/src/server/lib/omp/rpc/prewarm-pool.ts +19 -5
  206. package/src/server/lib/omp/rpc/run-model.test.ts +116 -0
  207. package/src/server/lib/omp/rpc/run-model.ts +4 -2
  208. package/src/server/lib/omp/session/sidebar-data.harness.test.ts +6 -3
  209. package/src/server/lib/omp/session/standby.server.ts +13 -2
  210. package/src/server/lib/panels/manifest.test.ts +47 -1
  211. package/src/server/lib/panels/manifest.ts +19 -0
  212. package/src/server/lib/panels/registry.server.ts +19 -2
  213. package/src/server/lib/panels/scan.server.ts +26 -2
  214. package/src/server/lib/panels/settings-schema.server.ts +72 -0
  215. package/src/server/lib/plugins/background.server.ts +21 -3
  216. package/src/server/lib/plugins/background.test.ts +13 -0
  217. package/src/server/lib/plugins/loader.server.ts +35 -51
  218. package/src/server/lib/plugins/mcp.server.ts +100 -0
  219. package/src/server/lib/plugins/mcp.test.ts +75 -0
  220. package/src/server/lib/plugins/schedule-runner.server.ts +153 -0
  221. package/src/server/lib/plugins/schedule-runner.test.ts +186 -0
  222. package/src/server/lib/plugins/schedule-store.server.ts +107 -0
  223. package/src/server/lib/plugins/schema.server.ts +8 -0
  224. package/src/server/lib/plugins/settings.server.ts +56 -19
  225. package/src/server/lib/plugins/shutdown.server.ts +58 -0
  226. package/src/server/lib/plugins/shutdown.test.ts +28 -3
  227. package/src/server/lib/realtime/topics/global.server.ts +5 -1
  228. package/src/server/lib/schedule/rows.server.ts +9 -0
  229. package/src/server/lib/schedule/runtime.server.test.ts +91 -0
  230. package/src/server/lib/schedule/runtime.server.ts +101 -23
  231. package/src/server/lib/schedule/schema.server.ts +15 -0
  232. package/src/server/lib/schedule/store.server.test.ts +34 -0
  233. package/src/server/lib/schedule/store.server.ts +33 -9
  234. package/src/server/lib/sessions/fork.server.test.ts +47 -0
  235. package/src/server/lib/sessions/fork.server.ts +17 -1
  236. package/src/server/lib/sessions/spawn.server.ts +2 -2
  237. package/src/server/lib/waiting/runtime.server.test.ts +48 -0
  238. package/src/server/lib/waiting/runtime.server.ts +22 -0
  239. package/src/server/lib/waiting/schema.server.ts +8 -0
  240. package/src/server/lib/waiting/store.server.test.ts +14 -0
  241. package/src/server/lib/waiting/store.server.ts +6 -2
  242. package/src/server/routes/agent/command-resume.test.ts +9 -4
  243. package/src/server/routes/agent/new-mode.test.ts +40 -0
  244. package/src/server/routes/agent/new.ts +31 -10
  245. package/src/server/routes/agent/prewarm.ts +48 -7
  246. package/src/server/routes/fs/action.ts +9 -1
  247. package/src/server/routes/fs/digest.test.ts +100 -0
  248. package/src/server/routes/fs/digest.ts +106 -0
  249. package/src/server/routes/fs/index.ts +2 -0
  250. package/src/server/routes/fs/read.ts +6 -1
  251. package/src/server/routes/harness/custom.test.ts +131 -0
  252. package/src/server/routes/harness/import-action.ts +2 -2
  253. package/src/server/routes/harness/root.ts +41 -8
  254. package/src/server/routes/harness/update.ts +2 -2
  255. package/src/server/routes/panels/bindings.ts +2 -0
  256. package/src/server/routes/panels/settings.test.ts +165 -0
  257. package/src/server/routes/panels/settings.ts +106 -0
  258. package/src/server/routes/schedule/body.ts +14 -0
  259. package/src/server/routes/schedule/index.ts +28 -4
  260. package/src/server/routes/settings/mcp.ts +9 -26
  261. package/src/server/routes/waiting/index.ts +21 -2
  262. package/src/server/routes/waiting/routes.test.ts +21 -0
  263. package/src/shared/lib/chat/composer/delegation.ts +3 -3
  264. package/src/shared/lib/chat/timeline/fork-anchor.test.ts +97 -0
  265. package/src/shared/lib/chat/timeline/fork-anchor.ts +47 -0
  266. package/src/shared/lib/fs/content-hash.ts +29 -0
  267. package/src/shared/lib/harness/catalog.ts +48 -6
  268. package/src/shared/lib/harness/fork.ts +60 -0
  269. package/src/shared/lib/harness/mcp-facts.test.ts +30 -0
  270. package/src/shared/lib/harness/mcp-facts.ts +65 -0
  271. package/src/shared/lib/harness/menu.test.ts +16 -1
  272. package/src/shared/lib/harness/menu.ts +2 -2
  273. package/src/shared/lib/harness/rewind.ts +6 -6
  274. package/src/shared/lib/harness/session-modes.ts +31 -0
  275. package/src/shared/lib/harness/transcript.test.ts +29 -0
  276. package/src/shared/lib/harness/transcript.ts +19 -0
  277. package/src/shared/lib/notifications/settings.test.ts +21 -0
  278. package/src/shared/lib/notifications/settings.ts +24 -0
  279. package/src/shared/lib/omp/session/prewarm.test.ts +28 -4
  280. package/src/shared/lib/omp/session/prewarm.ts +25 -6
  281. package/src/shared/lib/omp/session/stream-state.server.test.ts +25 -0
  282. package/src/shared/lib/omp/session/stream-state.server.ts +8 -4
  283. package/src/shared/lib/panels/capabilities.test.ts +1 -1
  284. package/src/shared/lib/panels/capabilities.ts +3 -0
  285. package/src/shared/lib/plugins/settings.ts +22 -0
  286. package/src/shared/lib/schedule/parse.test.ts +48 -0
  287. package/src/shared/lib/schedule/parse.ts +69 -45
  288. package/src/shared/lib/schedule/timezone.ts +128 -0
  289. package/src/shared/lib/settings/defaults.ts +2 -0
  290. package/src/shared/lib/workspace/refresh-cadence.test.ts +25 -1
  291. package/src/shared/lib/workspace/relative-time.ts +16 -0
  292. package/src/shared/types/harness.ts +7 -0
  293. package/src/shared/types/omp/agent.ts +6 -0
  294. package/src/shared/types/panels-registry.ts +3 -3
  295. package/src/shared/types/panels.ts +4 -2
  296. package/src/shared/types/schedule.ts +13 -0
  297. package/src/shared/types/settings/state.ts +12 -1
  298. package/src/shared/types/waiting.ts +9 -0
  299. package/src/test-support/file-editor.test-util.ts +70 -5
  300. package/dist/client/static/js/index-32rpkj6b.css +0 -1
  301. package/src/client/hooks/editor/use-external-change-notice.ts +0 -71
  302. package/src/client/hooks/editor/use-external-change.test.ts +0 -88
  303. package/src/client/hooks/editor/use-external-change.ts +0 -146
@@ -1,10 +1,10 @@
1
1
  import { useCallback, useRef, useState } from 'preact/hooks';
2
- import { CodeSurface, type CodeSurfaceHandle } from '@/client/components/common/code-surface';
2
+ import type { CodeSurfaceHandle } from '@/client/components/common/code-surface';
3
3
  import { countConflicts } from '@/client/components/common/code-surface/conflict-markers';
4
- import { ImageViewer } from '@/client/components/common/image-viewer';
5
4
  import { EditorHeader } from '@/client/components/mobile/mobile-right-sidebar/Header';
6
- import { PreviewScroller } from '@/client/components/mobile/mobile-right-sidebar/PreviewScroller';
7
5
  import { SaveDeletedFileModal } from '@/client/components/workspace/editor/SaveDeletedFileModal';
6
+ import { ExternalChangeStrip } from '@/client/components/workspace/editor/ExternalChangeStrip';
7
+ import { MobileEditorSurface } from '@/client/components/mobile/mobile-right-sidebar/EditorSurface';
8
8
  import { MissingFileBanner } from '@/client/components/mobile/mobile-right-sidebar/MissingFileBanner';
9
9
  import { EditorStatusBar } from '@/client/components/mobile/mobile-right-sidebar/StatusBar';
10
10
  import { EditorDropOverlay } from '@/client/components/workspace/editor/EditorDropOverlay';
@@ -20,7 +20,6 @@ import { MobileOutlineButton } from '@/client/components/mobile/mobile-right-sid
20
20
  import { useOutlineView } from '@/client/hooks/editor/use-outline-view';
21
21
  import {
22
22
  EDITOR_DEFAULT_FONT_SIZE,
23
- EDITOR_LINE_HEIGHT,
24
23
  EDITOR_MAX_FONT_SIZE,
25
24
  EDITOR_MIN_FONT_SIZE,
26
25
  } from '@/shared/lib/code/editor/typography';
@@ -30,7 +29,6 @@ import { indentUnitFor, useEditorIndent } from '@/client/hooks/editor/indent-set
30
29
  import { useEditorTyping } from '@/client/hooks/editor/typing-settings';
31
30
  import { useFileReviewMode } from '@/client/hooks/editor/use-file-review-mode';
32
31
  import { MOBILE_SCROLL_POSITIONS_KEY } from '@/shared/lib/workspace/scroll-positions';
33
- import { ViewerSurface, hasViewerSurface } from '@/client/components/workspace/editor/viewers/dispatch';
34
32
  import { BINARY_VIEWERS, RENDERED_VIEWERS, VIEWER_LABELS, viewerKindFor } from '@/shared/lib/fs/document-kind';
35
33
  import type { MobileFullEditorProps } from '@/client/components/mobile/mobile-right-sidebar/editor-props';
36
34
 
@@ -211,6 +209,17 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
211
209
 
212
210
  {missing && <MissingFileBanner />}
213
211
 
212
+ {/* The same strip the desktop pane draws, from the same verdict: the disk
213
+ bytes differ from a buffer that has edits. A clean buffer never reaches
214
+ here — the watcher re-reads it, because there is nothing to lose. */}
215
+ {editor.diskChange && (
216
+ <ExternalChangeStrip
217
+ fileName={file.name}
218
+ onReload={editor.reloadFromDisk}
219
+ onKeepMine={editor.keepMineAgainstDisk}
220
+ />
221
+ )}
222
+
214
223
  {/* Find/replace, as a ROW under the header rather than a floating card: the
215
224
  desktop bar is 330px wide, and on a 390px screen a floating card would cover
216
225
  the very lines it is searching. `FindWidget` is absolutely positioned in its
@@ -221,87 +230,33 @@ export function MobileFullEditor({ file, missing = false, onClose, onFileSaved,
221
230
  </div>
222
231
  )}
223
232
 
224
- {/* Editor Content Area - Desktop styled: bg-paper text-ink. An image owns
225
- its own pan/zoom, so it replaces the scrolling text container rather
226
- than living inside it; the same is true of every other byte viewer and
227
- of the rendered text views (a CSV grid, an SVG picture). */}
228
- {editor.isImage && editor.imageUrl ? (
229
- <ImageViewer src={editor.imageUrl} name={file.name} className="flex-1 min-h-0" />
230
- ) : editor.isImage ? (
231
- <ViewerSurface
232
- kind="image"
233
- path={file.path ?? file.name}
234
- name={file.name}
235
- source={editor.byteSource}
236
- content={editor.content}
237
- revision={editor.revision}
238
- />
239
- ) : hasViewerSurface(viewerKind) && (byteViewer || isPreview) ? (
240
- <ViewerSurface
241
- kind={viewerKind}
242
- path={file.path ?? file.name}
243
- name={file.name}
244
- source={editor.byteSource}
245
- content={editor.content}
246
- revision={editor.revision}
247
- />
248
- ) : editor.isLoading || editor.unsupported || editor.loadError || (isMd && isPreview) ? (
249
- // The states that draw their own scrolling content — and the markdown
250
- // preview, which is a document, not an editor — share one scroller. The
251
- // outline's table of contents finds its headings inside it, which is why
252
- // the ref is the same one the scroll restore uses.
253
- <PreviewScroller
254
- fileName={file.name}
255
- content={content}
256
- path={file.path ?? file.name}
257
- root={file.root}
258
- repo={file.repo}
259
- fontSize={fontSize}
260
- scrollRef={previewRef}
261
- onScroll={scroll.onScroll}
262
- isLoading={editor.isLoading}
263
- unsupported={editor.unsupported}
264
- loadError={editor.loadError}
265
- reviewActive={hasReview && review.active}
266
- onExitReview={review.toggle}
267
- />
268
- ) : (
269
- /* The code surface owns its own scroller (CodeMirror's), so it is NOT
270
- wrapped in one: an outer `overflow-auto` resolves the editor's
271
- `height: 100%` against an auto-height box, so the editor grew to the
272
- document's full height and the panel had nothing to scroll. */
273
- <CodeSurface
274
- ref={surfaceRef}
275
- value={content}
276
- onValueChange={editor.onChange}
277
- language={lang}
278
- wordWrap={wordWrap}
279
- documentKey={fileKey}
280
- marks={revealMarks}
281
- currentMark={currentMark}
282
- onScroller={setCodeScroller}
283
- scrollTestId="editor-scroller"
284
- // No `bg-paper`: an explicit editor theme paints its own surface, and
285
- // the panel's colour under it would be a border of the wrong shade.
286
- // `select-text` is the desktop pane's rule, and it matters more here:
287
- // the sheet's own root is `select-none` (it is a header-and-status
288
- // layout), and the editor is now a `contenteditable` whose selection
289
- // and caret are the BROWSER's business — an inherited `user-select:
290
- // none` is the one thing that can take that away on a phone.
291
- className="flex-1 min-h-0 text-ink select-text"
292
- themeVars={editorTheme.vars}
293
- themes={editorTheme.themes}
294
- indentUnitText={indentUnitFor(editorIndent)}
295
- typing={editorTyping}
296
- padding={12}
297
- placeholder="This file is empty"
298
- style={{
299
- fontFamily: editorFontFamily,
300
- fontSize: `${fontSize}px`,
301
- lineHeight: EDITOR_LINE_HEIGHT,
302
- }}
303
- />
304
- )}
233
+ {/* Which surface draws this file — see `EditorSurface.tsx` for the dispatch
234
+ and why the code surface is never wrapped in a scroller. */}
235
+ <MobileEditorSurface
236
+ file={file}
237
+ editor={editor}
238
+ viewerKind={viewerKind}
239
+ byteViewer={byteViewer}
240
+ isPreview={isPreview}
241
+ isMd={isMd}
242
+ content={content}
243
+ language={lang}
244
+ wordWrap={wordWrap}
245
+ fileKey={fileKey}
246
+ revealMarks={revealMarks}
247
+ currentMark={currentMark}
248
+ surfaceRef={surfaceRef}
249
+ setCodeScroller={setCodeScroller}
250
+ previewRef={previewRef}
251
+ scroll={scroll}
252
+ fontSize={fontSize}
253
+ reviewActive={hasReview && review.active}
254
+ onExitReview={review.toggle}
255
+ editorTheme={editorTheme}
256
+ editorFontFamily={editorFontFamily}
257
+ indentUnitText={indentUnitFor(editorIndent)}
258
+ typing={editorTyping}
259
+ />
305
260
 
306
261
  {/* The outline is a floating control rather than a panel section: on a
307
262
  phone the drawer and this editor are separate screens, so a section
@@ -13,7 +13,7 @@ import { useWorkspaceFolderActions } from '@/client/hooks/workspace/workspace-fo
13
13
  import { useSessionDelete } from '@/client/hooks/workspace/session-delete';
14
14
  import { SessionDeleteModal } from '@/client/components/common/session-delete-modal';
15
15
  import { getProjectIcon } from '@/shared/lib/workspace/project-icon';
16
- import { relativeTimeAgo } from '@/shared/lib/workspace/relative-time';
16
+ import { formatFullDate, relativeTimeAgo } from '@/shared/lib/workspace/relative-time';
17
17
  import { isPendingSessionId } from '@/shared/lib/omp/session/default-title';
18
18
  import { useSidebarData } from '@/client/hooks/chat/omp/session-list';
19
19
  import type { SessionItemData, WorkspaceFolderData } from '@/shared/types';
@@ -137,6 +137,7 @@ export function MobileSessionCategory({
137
137
  status={sessionStatus[sessionKey]}
138
138
  awaitingInput={Boolean(session.awaitingInput)}
139
139
  timeAgo={relativeTimeAgo(session.updated_at ?? session.created_at)}
140
+ timeTitle={formatFullDate(session.updated_at ?? session.created_at)}
140
141
  expandable={control.expandable} isChild={control.isChild}
141
142
  isExpanded={control.isExpanded}
142
143
  onToggleExpand={control.onToggleExpand}
@@ -94,6 +94,12 @@ describe('mobile session row status slot', () => {
94
94
  const el = await mount({ isChild: true });
95
95
  expect(el.querySelector('[data-testid="child-indicator"] svg')).not.toBeNull();
96
96
  });
97
+
98
+ test('the age carries the full timestamp as its hover tooltip', async () => {
99
+ const el = await mount({ timeAgo: '3w', timeTitle: 'Wed, 12 Nov 2026, 02:30 PM' });
100
+ const age = el.querySelector('[title="Wed, 12 Nov 2026, 02:30 PM"]');
101
+ expect(age?.textContent).toBe('3w');
102
+ });
97
103
  });
98
104
 
99
105
  /**
@@ -29,6 +29,8 @@ export interface MobileSessionRowProps {
29
29
  awaitingInput?: boolean;
30
30
  /** Relative age of the session, or null when no usable timestamp exists. */
31
31
  timeAgo: string | null;
32
+ /** Full timestamp shown as the age's hover tooltip. */
33
+ timeTitle?: string | null;
32
34
  /** The session has a branch (child sessions and/or a subagent roster). */
33
35
  expandable?: boolean;
34
36
  isExpanded?: boolean;
@@ -66,6 +68,7 @@ export function MobileSessionRow({
66
68
  status,
67
69
  awaitingInput = false,
68
70
  timeAgo,
71
+ timeTitle,
69
72
  expandable = false,
70
73
  isExpanded = false,
71
74
  onToggleExpand,
@@ -221,7 +224,12 @@ export function MobileSessionRow({
221
224
  </span>
222
225
  </div>
223
226
 
224
- <span className="text-[11px] text-ink/45 font-mono flex-shrink-0 ml-2">{timeAgo ?? ''}</span>
227
+ <span
228
+ className="text-[11px] text-ink/45 font-mono flex-shrink-0 ml-2"
229
+ title={timeTitle ?? undefined}
230
+ >
231
+ {timeAgo ?? ''}
232
+ </span>
225
233
  </button>
226
234
 
227
235
  {/* One trigger for rename / archive / delete, always visible: a touch
@@ -11,7 +11,7 @@ import { applySettingsSideEffects } from '@/client/components/settings/apply-sid
11
11
  import { useKabmoEvent } from '@/client/hooks/ui/window-event';
12
12
  import { useToasts } from '@/client/hooks/ui/toasts';
13
13
  import { useDialogBehaviour } from '@/client/hooks/ui/dialog-behaviour';
14
- import { SETTINGS_CATEGORIES, SettingsSidebar } from '@/client/components/settings/Sidebar';
14
+ import { SettingsSidebar, settingsCategoriesFor } from '@/client/components/settings/Sidebar';
15
15
  import { harnessIdFromCategory } from '@/shared/lib/harness/menu';
16
16
  import { useHarnesses } from '@/client/hooks/models/use-harnesses';
17
17
  import { AppearanceSettings } from '@/client/components/settings/categories/AppearanceSettings';
@@ -145,7 +145,10 @@ export function SettingsModal({
145
145
 
146
146
  if (!isOpen) return null;
147
147
 
148
- const currentCategoryDef = SETTINGS_CATEGORIES.find(c => c.id === activeCategory) || SETTINGS_CATEGORIES[0];
148
+ // The roster's own list: a user-added harness has a page but no entry in the
149
+ // build's static table, so the header would otherwise fall back to Appearance.
150
+ const categories = settingsCategoriesFor(harnesses.map((entry) => entry.id));
151
+ const currentCategoryDef = categories.find(c => c.id === activeCategory) || categories[0];
149
152
 
150
153
  const renderCategoryContent = () => {
151
154
  switch (activeCategory) {
@@ -234,6 +237,7 @@ export function SettingsModal({
234
237
  onRestartKabmo={handleRestartKabmo}
235
238
  isRestarting={isRestarting}
236
239
  disabledHarnesses={disabledHarnesses}
240
+ categories={categories}
237
241
  className="w-full"
238
242
  />
239
243
  </div>
@@ -23,10 +23,10 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
23
23
  // KABMO
24
24
  { id: 'appearance', label: 'Appearance', icon: Palette, section: 'KABMO', description: 'Custom themes, typography scale, and layout density.' },
25
25
  { id: 'chats', label: 'Chats', icon: MessageSquare, section: 'KABMO', description: 'Chat width, composer style, tool call rendering, session titles, goal mode, and keybindings.' },
26
- { id: 'notifications', label: 'Notifications', icon: Bell, section: 'KABMO', description: 'Completion sound, plus system notifications for finished, waiting-for-you and failed runs.' },
26
+ { id: 'notifications', label: 'Notifications', icon: Bell, section: 'KABMO', description: 'Completion sound, separate Desktop and Mobile delivery switches, and the finished, waiting-for-you and failed run triggers.' },
27
27
  { id: 'usage', label: 'Usage', icon: BarChart3, section: 'KABMO', description: 'Build minutes quota, storage, and general usage.' },
28
28
  { id: 'token-usage', label: 'Token Usage', icon: Coins, section: 'KABMO', description: 'Token telemetry, cache, and cost breakdown.' },
29
- { id: 'panel-plugins', label: 'Panel Plugins', icon: Puzzle, section: 'KABMO', description: 'Panels a plugin adds to Kabmo: right-panel views, navbar readouts and editor tabs.' },
29
+ { id: 'panel-plugins', label: 'Plugins Kabmo', icon: Puzzle, section: 'KABMO', description: 'Plugins installed into Kabmo: panels, background services, and the MCP servers they register.' },
30
30
  // WORKSPACE
31
31
  { id: 'projects', label: 'Projects', icon: FolderGit, section: 'WORKSPACE', description: 'Workspace directories, roots, and ignored paths.' },
32
32
  // OMP
@@ -55,6 +55,30 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
55
55
  { id: 'skills-catalog', label: 'Skills Catalog', icon: BookOpen, section: 'LIBRARY', description: 'Browse and install new skills.' },
56
56
  ];
57
57
 
58
+ /**
59
+ * The category list for a roster.
60
+ *
61
+ * `SETTINGS_CATEGORIES` is the build's own list; a user-added harness is not in
62
+ * it, so the HARNESSES section is rebuilt from the ids the catalog answered.
63
+ * The rest of the list keeps its order, which is why the harness block is
64
+ * spliced back in front of LIBRARY rather than appended.
65
+ */
66
+ export function settingsCategoriesFor(harnessIds?: readonly string[]): CategoryDef[] {
67
+ // Before the catalog answers, the build's own list is the honest one: an
68
+ // empty roster would hide every built-in harness page until the fetch lands.
69
+ const harnessEntries = harnessMenuEntries(harnessIds && harnessIds.length > 0 ? harnessIds : undefined).map((entry) => ({
70
+ id: entry.id,
71
+ label: entry.label,
72
+ icon: Waypoints,
73
+ section: 'HARNESSES' as const,
74
+ ...(entry.harness ? { harness: entry.harness } : {}),
75
+ description: entry.description,
76
+ }));
77
+ const rest = SETTINGS_CATEGORIES.filter((category) => category.section !== 'HARNESSES');
78
+ const library = rest.findIndex((category) => category.section === 'LIBRARY');
79
+ return [...rest.slice(0, library), ...harnessEntries, ...rest.slice(library)];
80
+ }
81
+
58
82
  interface SettingsSidebarProps {
59
83
  activeCategory: SettingsCategoryId;
60
84
  onSelectCategory: (id: SettingsCategoryId) => void;
@@ -66,6 +90,8 @@ interface SettingsSidebarProps {
66
90
  isRestarting: boolean;
67
91
  /** Harness ids the user switched OFF: their rows leave the drawer. */
68
92
  disabledHarnesses?: string[];
93
+ /** The roster's categories, when the caller has a live harness list. */
94
+ categories?: CategoryDef[];
69
95
  className?: string;
70
96
  }
71
97
 
@@ -79,6 +105,7 @@ export function SettingsSidebar({
79
105
  onRestartKabmo,
80
106
  isRestarting,
81
107
  disabledHarnesses = [],
108
+ categories = SETTINGS_CATEGORIES,
82
109
  className = ''
83
110
  }: SettingsSidebarProps) {
84
111
  // A switched-off agent has no row here. The catalog list above stays complete
@@ -86,7 +113,7 @@ export function SettingsSidebar({
86
113
  // every entry in it with the switch that decides this. The ids arrive as a
87
114
  // PROP rather than from `useHarnesses()` so the drawer stays presentational:
88
115
  // it is drawn in table tests that must not fire a catalog read.
89
- const filteredCategories = SETTINGS_CATEGORIES.filter(cat => {
116
+ const filteredCategories = categories.filter(cat => {
90
117
  if (cat.harness && disabledHarnesses.includes(cat.harness)) return false;
91
118
  if (!searchQuery.trim()) return true;
92
119
  const q = searchQuery.toLowerCase();
@@ -29,6 +29,7 @@ import { RefreshCw } from 'lucide-preact';
29
29
  import { useHarnesses } from '@/client/hooks/models/use-harnesses';
30
30
  import { HarnessCard } from '@/client/components/settings/categories/harness-settings/HarnessCard';
31
31
  import { HarnessToggleList } from '@/client/components/settings/categories/harness-settings/ToggleList';
32
+ import { CustomHarnessForm } from '@/client/components/settings/categories/harness-settings/CustomHarnessForm';
32
33
  import { SettingsNotice, SettingsSearchField } from '@/client/components/settings/categories/harness-settings/parts';
33
34
  import { harnessCategoryId } from '@/shared/lib/harness/menu';
34
35
 
@@ -194,13 +195,16 @@ export function HarnessSettings({ only }: HarnessSettingsProps = {}) {
194
195
  No harness matches “{query}”.
195
196
  </div>
196
197
  ) : (
197
- <HarnessToggleList
198
- harnesses={filtered}
199
- busy={busy}
200
- onSetEnabled={(id, enabled) => void toggle(id, enabled)}
201
- onOpen={openHarness}
202
- onProbe={(id) => void check(id)}
203
- />
198
+ <>
199
+ <HarnessToggleList
200
+ harnesses={filtered}
201
+ busy={busy}
202
+ onSetEnabled={(id, enabled) => void toggle(id, enabled)}
203
+ onOpen={openHarness}
204
+ onProbe={(id) => void check(id)}
205
+ />
206
+ <CustomHarnessForm harnesses={harnesses} onChanged={reload} />
207
+ </>
204
208
  )}
205
209
  </div>
206
210
  );
@@ -4,13 +4,14 @@
4
4
  */
5
5
 
6
6
  /**
7
- * The three system-notification preferences.
7
+ * The system-notification preferences: two delivery switches and three events.
8
8
  *
9
- * They ship FALSE, and the UI is where that promise becomes a user-visible
10
- * fact: a default of `true` would show three switches already on, and the first
11
- * agent run would ask the OS for permission nobody chose. The toggle must also
12
- * write ONE key — the settings modal persists the diff, so a handler that
13
- * touched the others would republish values the user never changed.
9
+ * The events ship FALSE, and the UI is where that promise becomes a
10
+ * user-visible fact: a default of `true` would show three switches already on,
11
+ * and the first agent run would ask the OS for permission nobody chose. The two
12
+ * platform masters are the opposite — they ship ON so an install that already
13
+ * opted into an event keeps receiving it — and every toggle must write ONE key,
14
+ * because the settings modal persists the diff.
14
15
  */
15
16
 
16
17
  import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
@@ -57,20 +58,45 @@ function switches(): HTMLElement[] {
57
58
  return [...document.querySelectorAll('[role="switch"]')] as HTMLElement[];
58
59
  }
59
60
 
61
+ function switchNamed(label: string): HTMLElement | undefined {
62
+ return switches().find((toggle) => toggle.getAttribute('aria-label')?.includes(label));
63
+ }
64
+
60
65
  describe('NotificationSettings', () => {
61
- test('the three system toggles are off on a fresh install', () => {
66
+ test('both delivery sections are on and the three events are off on a fresh install', () => {
62
67
  mount(() => {});
63
- // The sound switch is first and keeps its shipped-on default; the three
64
- // system preferences follow it.
65
- const system = switches().slice(1);
66
- expect(system).toHaveLength(3);
67
- for (const toggle of system) expect(toggle.getAttribute('aria-checked')).toBe('false');
68
+ // Sound, Desktop, Mobile, then the three event preferences.
69
+ const [, desktop, mobile, ...events] = switches();
70
+ expect(desktop.getAttribute('aria-checked')).toBe('true');
71
+ expect(mobile.getAttribute('aria-checked')).toBe('true');
72
+ expect(events).toHaveLength(3);
73
+ for (const toggle of events) expect(toggle.getAttribute('aria-checked')).toBe('false');
74
+ });
75
+
76
+ test('disabling the Desktop section writes only its key', () => {
77
+ const updates: Updater[] = [];
78
+ mount((update) => updates.push(update));
79
+
80
+ act(() => {
81
+ switchNamed('Desktop notifications')?.click();
82
+ });
83
+ expect(updates).toEqual([{ notifyDesktopEnabled: false }]);
84
+ });
85
+
86
+ test('disabling the Mobile section writes only its key', () => {
87
+ const updates: Updater[] = [];
88
+ mount((update) => updates.push(update));
89
+
90
+ act(() => {
91
+ switchNamed('Mobile notifications')?.click();
92
+ });
93
+ expect(updates).toEqual([{ notifyMobileEnabled: false }]);
68
94
  });
69
95
 
70
96
  test('turning Run finished on writes only that key', () => {
71
97
  const updates: Updater[] = [];
72
98
  mount((update) => updates.push(update));
73
- const finish = switches().find((toggle) => toggle.getAttribute('aria-label')?.includes('Run finished'));
99
+ const finish = switchNamed('Run finished');
74
100
  expect(finish).toBeDefined();
75
101
 
76
102
  act(() => {
@@ -82,10 +108,9 @@ describe('NotificationSettings', () => {
82
108
  test('turning Waiting for you on writes its own key', () => {
83
109
  const updates: Updater[] = [];
84
110
  mount((update) => updates.push(update));
85
- const ask = switches().find((toggle) => toggle.getAttribute('aria-label')?.includes('Waiting for you'));
86
111
 
87
112
  act(() => {
88
- ask?.click();
113
+ switchNamed('Waiting for you')?.click();
89
114
  });
90
115
  expect(updates).toEqual([{ notifyOnAsk: true }]);
91
116
  });