@kabmo-labs/kabmo 0.27.0 → 0.29.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.
- package/bunfig.toml +6 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.js +530 -493
- package/dist/client/static/js/{index-e3qh2yps.js → index-43z47ngg.js} +1178 -1034
- package/dist/client/static/js/index-naa91727.css +1 -0
- package/dist/client/static/{manifest-q6h8k9e0.webmanifest → manifest-vdvdqpre.webmanifest} +1 -0
- package/marketplace/plugins/command-runner/package.json +3 -17
- package/marketplace/plugins/command-runner/settings-schema.json +14 -0
- package/marketplace/plugins/git-forge/README.md +17 -7
- package/marketplace/plugins/git-forge/package.json +4 -30
- package/marketplace/plugins/git-forge/panel.css +16 -0
- package/marketplace/plugins/git-forge/settings-schema.json +27 -0
- package/marketplace/plugins/git-forge/src/panel/Badge.tsx +35 -22
- package/marketplace/plugins/git-forge/src/panel/Change.tsx +20 -24
- package/marketplace/plugins/git-forge/src/panel/CiBadge.tsx +16 -7
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +31 -26
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +18 -2
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +160 -96
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +60 -44
- package/marketplace/plugins/git-forge/src/panel/List.tsx +150 -22
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +11 -5
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +17 -15
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +84 -61
- package/marketplace/plugins/git-forge/src/panel/format.test.ts +99 -0
- package/marketplace/plugins/git-forge/src/panel/format.ts +59 -16
- package/marketplace/plugins/git-forge/src/panel/index.test.tsx +109 -5
- package/marketplace/plugins/git-forge/src/panel/index.tsx +37 -4
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +17 -0
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +31 -0
- package/marketplace/plugins/session-info/package.json +2 -10
- package/marketplace/plugins/session-info/settings-schema.json +8 -0
- package/marketplace/plugins/stats/README.md +17 -5
- package/marketplace/plugins/stats/package.json +3 -23
- package/marketplace/plugins/stats/settings-schema.json +20 -0
- package/marketplace/plugins/stats/src/app.tsx +1 -1
- package/marketplace/plugins/stats/src/groups.test.ts +46 -1
- package/marketplace/plugins/stats/src/groups.ts +22 -11
- package/marketplace/plugins/stats/src/harness-leases.test.ts +84 -0
- package/marketplace/plugins/stats/src/harness-leases.ts +132 -0
- package/marketplace/plugins/stats/src/labels.test.ts +54 -1
- package/marketplace/plugins/stats/src/labels.ts +33 -7
- package/marketplace/plugins/stats/src/sampler.test.ts +61 -0
- package/marketplace/plugins/stats/src/sampler.ts +39 -5
- package/marketplace/plugins/stats/src/snapshot.ts +6 -0
- package/package.json +4 -3
- package/public/manifest.webmanifest +1 -0
- package/src/client/components/common/ComposerTextarea.test.tsx +109 -0
- package/src/client/components/common/ComposerTextarea.tsx +6 -0
- package/src/client/components/common/ReloadPageButton.test.tsx +14 -0
- package/src/client/components/common/ReloadPageButton.tsx +11 -2
- package/src/client/components/common/diagram-viewer/read-block.test.ts +71 -0
- package/src/client/components/common/diagram-viewer/read-block.ts +40 -16
- package/src/client/components/common/file-icon/index.tsx +7 -1
- package/src/client/components/common/harness-glyph/brands.ts +7 -1
- package/src/client/components/common/harness-glyph/index.tsx +18 -1
- package/src/client/components/common/image-viewer/index.tsx +37 -165
- package/src/client/components/common/picker-search/index.tsx +70 -0
- package/src/client/components/common/search-select/index.tsx +2 -7
- package/src/client/components/common/session-actions-menu/index.test.tsx +106 -0
- package/src/client/components/common/session-actions-menu/index.tsx +43 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +9 -4
- package/src/client/components/common/session-row/index.tsx +4 -0
- package/src/client/components/common/session-row/session-row.test.tsx +6 -0
- package/src/client/components/common/zoom-pan-stage/index.tsx +258 -0
- package/src/client/components/common/zoom-pan-stage/zoom-pan-stage.test.tsx +87 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +2 -1
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +1 -1
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +9 -1
- package/src/client/components/layout/session-sidebar/SessionListNotice.tsx +7 -3
- package/src/client/components/layout/session-sidebar/about-modal/HarnessRow.tsx +4 -1
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.tsx +12 -1
- package/src/client/components/layout/session-sidebar/about-modal/UpdateLogLine.test.tsx +82 -0
- package/src/client/components/layout/session-sidebar/about-modal/UpdateLogLine.tsx +23 -3
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +1 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +2 -1
- package/src/client/components/layout/session-sidebar/modern/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +202 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +80 -19
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +29 -7
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +3 -0
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +8 -0
- package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +181 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +41 -86
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +2 -1
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.test.ts +6 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +9 -1
- package/src/client/components/settings/Modal.tsx +6 -2
- package/src/client/components/settings/Sidebar.tsx +32 -7
- package/src/client/components/settings/categories/HarnessSettings.tsx +15 -9
- package/src/client/components/settings/categories/NotificationSettings.test.tsx +40 -15
- package/src/client/components/settings/categories/NotificationSettings.tsx +142 -64
- package/src/client/components/settings/categories/PanelPluginSettings.tsx +3 -3
- package/src/client/components/settings/categories/PluginSettings.tsx +1 -1
- package/src/client/components/settings/categories/harness-settings/ConfigForm.tsx +3 -6
- package/src/client/components/settings/categories/harness-settings/CustomHarnessForm.tsx +186 -0
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.test.tsx +36 -0
- package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +11 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.test.tsx +1 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +15 -1
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +1 -3
- package/src/client/components/settings/categories/panel-plugins/SettingsModal.test.tsx +165 -0
- package/src/client/components/settings/categories/panel-plugins/SettingsModal.tsx +260 -0
- package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +18 -4
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +64 -61
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +15 -4
- package/src/client/components/settings/groups.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.fork.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +8 -4
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -2
- package/src/client/components/workspace/chat-timeline/IrcNotice.test.tsx +55 -0
- package/src/client/components/workspace/chat-timeline/IrcNotice.tsx +71 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.fork.test.ts +80 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +13 -4
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +8 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +4 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +19 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +32 -3
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.search.test.tsx +72 -0
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +53 -33
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +5 -5
- package/src/client/components/workspace/chat-timeline/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/target-picker/DraftTargetRow.tsx +1 -9
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +129 -0
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +30 -12
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +47 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +55 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
- package/src/client/components/workspace/editor/FilePane.tsx +41 -4
- package/src/client/components/workspace/editor/Notices.tsx +2 -2
- package/src/client/components/workspace/editor/Pane.tsx +2 -2
- package/src/client/components/workspace/editor/Toolbar.tsx +20 -10
- package/src/client/components/workspace/editor/index.tsx +6 -10
- package/src/client/components/workspace/editor/toolbar-clusters.test.ts +5 -3
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +26 -14
- package/src/client/components/workspace/editor/viewers/CsvGrid.tsx +52 -5
- package/src/client/components/workspace/editor/viewers/DataGrid.tsx +227 -41
- package/src/client/components/workspace/editor/viewers/DrawioView.tsx +93 -0
- package/src/client/components/workspace/editor/viewers/GridRow.tsx +91 -0
- package/src/client/components/workspace/editor/viewers/GridToolbar.tsx +53 -0
- package/src/client/components/workspace/editor/viewers/SheetView.tsx +152 -57
- package/src/client/components/workspace/editor/viewers/dispatch.tsx +42 -9
- package/src/client/components/workspace/editor/viewers/drawio-pages.test.ts +80 -0
- package/src/client/components/workspace/editor/viewers/drawio-pages.ts +63 -0
- package/src/client/components/workspace/editor/viewers/grid.test.ts +296 -0
- package/src/client/components/workspace/editor/viewers/use-cell-edit.ts +64 -0
- package/src/client/components/workspace/editor/viewers/use-grid-interaction.ts +216 -0
- package/src/client/components/workspace/editor/viewers/viewers.test.ts +47 -2
- package/src/client/components/workspace/editor/viewers/workbook.ts +149 -0
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +262 -0
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +30 -6
- package/src/client/components/workspace/file-explorer/Modals.tsx +8 -3
- package/src/client/components/workspace/file-explorer/RootOverlays.tsx +60 -0
- package/src/client/components/workspace/file-explorer/RowLabel.tsx +6 -2
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +39 -49
- package/src/client/components/workspace/file-explorer/TreeItemModals.tsx +80 -0
- package/src/client/components/workspace/file-explorer/index.tsx +53 -29
- package/src/client/components/workspace/file-explorer/selection.test.tsx +109 -0
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +9 -1
- package/src/client/components/workspace/terminal-panel/focus.test.ts +70 -0
- package/src/client/components/workspace/terminal-panel/focus.ts +46 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +14 -1
- package/src/client/components/workspace/terminal-panel/mount.ts +17 -9
- package/src/client/components/workspace/terminal-panel/scroll-hold.test.ts +158 -0
- package/src/client/components/workspace/terminal-panel/scroll-hold.ts +136 -0
- package/src/client/data/settings/omp-schema.json +169 -22
- package/src/client/glass.css +39 -14
- package/src/client/glass.test.ts +37 -0
- package/src/client/hooks/chat/composer/history.test.ts +267 -0
- package/src/client/hooks/chat/composer/history.ts +146 -0
- package/src/client/hooks/chat/composer/use-draft.ts +45 -1
- package/src/client/hooks/chat/omp/pending-sessions.waiting.test.ts +11 -10
- package/src/client/hooks/chat/omp/pending-waiting.ts +15 -7
- package/src/client/hooks/chat/omp/prompt-send.test.ts +11 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +3 -0
- package/src/client/hooks/chat/timeline/actions.ts +4 -4
- package/src/client/hooks/chat/timeline/ask-frames.test.ts +54 -0
- package/src/client/hooks/chat/timeline/ask-frames.ts +29 -1
- package/src/client/hooks/chat/timeline/composer-modes.ts +13 -2
- package/src/client/hooks/chat/timeline/fork-open.ts +52 -0
- package/src/client/hooks/chat/timeline/index.ts +5 -2
- package/src/client/hooks/chat/timeline/mode-availability.ts +7 -0
- package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
- package/src/client/hooks/chat/timeline/modes-hydrate.ts +93 -0
- package/src/client/hooks/chat/timeline/modes.ts +32 -52
- package/src/client/hooks/chat/timeline/new-chat-open.ts +7 -6
- package/src/client/hooks/chat/timeline/new-chat.ts +10 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +4 -0
- package/src/client/hooks/chat/timeline/pending-session-mode.test.ts +136 -0
- package/src/client/hooks/chat/timeline/pending-session-mode.ts +69 -0
- package/src/client/hooks/chat/timeline/pending-warmup.test.ts +147 -0
- package/src/client/hooks/chat/timeline/pending-warmup.ts +62 -0
- package/src/client/hooks/chat/timeline/run-identity.test.ts +12 -0
- package/src/client/hooks/chat/timeline/run-identity.ts +4 -1
- package/src/client/hooks/chat/timeline/send-props.ts +2 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +1 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +1 -0
- package/src/client/hooks/chat/timeline/send.test.ts +1 -0
- package/src/client/hooks/chat/timeline/session-harness.ts +4 -0
- package/src/client/hooks/chat/timeline/timeline-rail.test.ts +34 -2
- package/src/client/hooks/chat/timeline/use-fork-session.ts +9 -22
- package/src/client/hooks/chat/timeline/user-turns.ts +31 -2
- package/src/client/hooks/chat/waiting/cancel.ts +13 -6
- package/src/client/hooks/chat/waiting/choice.ts +13 -16
- package/src/client/hooks/chat/waiting/composer-wait.ts +70 -0
- package/src/client/hooks/chat/waiting/dispatch.ts +48 -28
- package/src/client/hooks/chat/waiting/held.ts +37 -13
- package/src/client/hooks/chat/waiting/hold.test.ts +22 -0
- package/src/client/hooks/chat/waiting/hold.ts +20 -11
- package/src/client/hooks/chat/waiting/restore.test.ts +69 -0
- package/src/client/hooks/chat/waiting/restore.ts +34 -0
- package/src/client/hooks/chat/waiting/store.ts +9 -3
- package/src/client/hooks/editor/file-editor-types.ts +36 -12
- package/src/client/hooks/editor/save-bytes.ts +79 -0
- package/src/client/hooks/editor/save-file.test.ts +1 -1
- package/src/client/hooks/editor/save-file.ts +35 -8
- package/src/client/hooks/editor/target-key.ts +17 -0
- package/src/client/hooks/editor/use-disk-digest.test.ts +82 -0
- package/src/client/hooks/editor/use-disk-digest.ts +164 -0
- package/src/client/hooks/editor/use-disk-sync.ts +212 -0
- package/src/client/hooks/editor/use-file-cache.ts +113 -0
- package/src/client/hooks/editor/use-file-editor.test.ts +120 -0
- package/src/client/hooks/editor/use-file-editor.ts +143 -57
- package/src/client/hooks/editor/use-file-read.ts +45 -12
- package/src/client/hooks/editor/use-file-writes.ts +4 -4
- package/src/client/hooks/editor/use-grid-selection.ts +160 -0
- package/src/client/hooks/models/harness-catalog.ts +15 -0
- package/src/client/hooks/models/use-harness-update.test.ts +35 -2
- package/src/client/hooks/models/use-harness-update.ts +49 -10
- package/src/client/hooks/ui/notifications.ts +17 -8
- package/src/client/hooks/workspace/diff-file.test.ts +72 -0
- package/src/client/hooks/workspace/diff-file.ts +12 -6
- package/src/client/hooks/workspace/file-archive.ts +220 -0
- package/src/client/hooks/workspace/file-clipboard.test.ts +4 -4
- package/src/client/hooks/workspace/file-clipboard.ts +37 -26
- package/src/client/hooks/workspace/file-selection.test.ts +67 -0
- package/src/client/hooks/workspace/file-selection.ts +156 -0
- package/src/client/hooks/workspace/file-tree-actions-clipboard.test.ts +5 -5
- package/src/client/hooks/workspace/file-tree-actions.ts +36 -8
- package/src/client/hooks/workspace/panel-registry.ts +1 -1
- package/src/client/hooks/workspace/scheduled-tasks.ts +26 -11
- package/src/client/lib/editor/workbook-drafts.ts +42 -0
- package/src/client/lib/launch/file-handlers.ts +2 -2
- package/src/client/lib/notifications/os.test.ts +1 -30
- package/src/client/lib/notifications/os.ts +0 -15
- package/src/client/lib/notifications/platform.test.ts +68 -0
- package/src/client/lib/notifications/platform.ts +36 -0
- package/src/client/lib/scrollbar-activity.test.ts +21 -88
- package/src/client/lib/scrollbar-activity.ts +71 -73
- package/src/client/lib/scrollbar-events.ts +143 -0
- package/src/client/lib/scrollbar-input.test.ts +126 -0
- package/src/client/lib/scrollbar-probe.test-util.ts +107 -0
- package/src/client/tailwind.css +32 -1
- package/src/server/db.server.test.ts +50 -1
- package/src/server/db.server.ts +36 -3
- package/src/server/index.ts +7 -0
- package/src/server/lib/chat/prompt-history.server.test.ts +92 -0
- package/src/server/lib/chat/prompt-history.server.ts +65 -0
- package/src/server/lib/chat/schema.server.ts +35 -0
- package/src/server/lib/db/schema.ts +3 -0
- package/src/server/lib/fs/archive.test.ts +139 -0
- package/src/server/lib/fs/archive.ts +259 -0
- package/src/server/lib/fs/git-diff.test.ts +26 -1
- package/src/server/lib/fs/git-diff.ts +43 -15
- package/src/server/lib/harness/acp/client.ts +81 -87
- package/src/server/lib/harness/acp/prewarm.server.ts +237 -0
- package/src/server/lib/harness/acp/prewarm.test.ts +171 -0
- package/src/server/lib/harness/acp/prompt.test.ts +70 -1
- package/src/server/lib/harness/acp/prompt.ts +32 -1
- package/src/server/lib/harness/acp/protocol.ts +23 -0
- package/src/server/lib/harness/acp/session-handshake.test.ts +26 -0
- package/src/server/lib/harness/acp/session-handshake.ts +22 -20
- package/src/server/lib/harness/acp/session-options.ts +16 -0
- package/src/server/lib/harness/acp/session-process.ts +43 -0
- package/src/server/lib/harness/acp/session.ts +11 -12
- package/src/server/lib/harness/acp/stdio.ts +129 -0
- package/src/server/lib/harness/acp/verbs.test.ts +97 -0
- package/src/server/lib/harness/acp/verbs.ts +16 -6
- package/src/server/lib/harness/auto-probe.server.ts +4 -3
- package/src/server/lib/harness/capabilities.ts +8 -0
- package/src/server/lib/harness/config.server.ts +3 -2
- package/src/server/lib/harness/custom.server.ts +209 -0
- package/src/server/lib/harness/launch-table.ts +19 -0
- package/src/server/lib/harness/launch.ts +6 -1
- package/src/server/lib/harness/provider-entry.ts +1 -1
- package/src/server/lib/harness/provider-file.server.ts +1 -1
- package/src/server/lib/harness/provider-sources.server.ts +2 -1
- package/src/server/lib/harness/provider-write.server.ts +2 -1
- package/src/server/lib/harness/register.server.ts +8 -1
- package/src/server/lib/harness/schema.server.ts +21 -0
- package/src/server/lib/harness/session-lease.server.test.ts +99 -0
- package/src/server/lib/harness/session-lease.server.ts +193 -0
- package/src/server/lib/harness/session-store.server.test.ts +8 -8
- package/src/server/lib/harness/session-store.server.ts +25 -4
- package/src/server/lib/harness/session-title.server.ts +12 -2
- package/src/server/lib/harness/spawn.server.ts +123 -20
- package/src/server/lib/harness/update-job-store.ts +12 -0
- package/src/server/lib/harness/update-queue.server.ts +18 -13
- package/src/server/lib/lifecycle/after-listen.ts +12 -1
- package/src/server/lib/lifecycle/paths.ts +19 -1
- package/src/server/lib/mcp/registry.server.ts +155 -0
- package/src/server/lib/mcp/registry.test.ts +169 -0
- package/src/server/lib/mcp/store.server.ts +38 -0
- package/src/server/lib/omp/rpc/frame-fold-contract.ts +59 -0
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +64 -1
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +2 -1
- package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +5 -1
- package/src/server/lib/omp/rpc/frame-fold.test.ts +7 -2
- package/src/server/lib/omp/rpc/frame-fold.ts +6 -45
- package/src/server/lib/omp/rpc/lifecycle.test.ts +4 -0
- package/src/server/lib/omp/rpc/prewarm-pool.ts +19 -5
- package/src/server/lib/omp/rpc/run-model.test.ts +116 -0
- package/src/server/lib/omp/rpc/run-model.ts +4 -2
- package/src/server/lib/omp/session/auto-title.server.test.ts +4 -0
- package/src/server/lib/omp/session/delete.server.ts +1 -0
- package/src/server/lib/omp/session/goal-driver.test.ts +5 -1
- package/src/server/lib/omp/session/goal-settings.test.ts +5 -1
- package/src/server/lib/omp/session/sidebar-data.harness.test.ts +6 -3
- package/src/server/lib/omp/session/standby.server.ts +13 -2
- package/src/server/lib/panels/auto-update.server.test.ts +5 -2
- package/src/server/lib/panels/git-update.server.test.ts +5 -2
- package/src/server/lib/panels/install.server.test.ts +5 -2
- package/src/server/lib/panels/manifest.test.ts +47 -1
- package/src/server/lib/panels/manifest.ts +19 -0
- package/src/server/lib/panels/registry.server.ts +19 -2
- package/src/server/lib/panels/remove.server.test.ts +5 -2
- package/src/server/lib/panels/scan.server.ts +26 -2
- package/src/server/lib/panels/settings-schema.server.ts +72 -0
- package/src/server/lib/plugins/background.server.ts +21 -3
- package/src/server/lib/plugins/background.test.ts +13 -0
- package/src/server/lib/plugins/loader.server.ts +35 -51
- package/src/server/lib/plugins/mcp.server.ts +100 -0
- package/src/server/lib/plugins/mcp.test.ts +75 -0
- package/src/server/lib/plugins/schedule-runner.server.ts +153 -0
- package/src/server/lib/plugins/schedule-runner.test.ts +186 -0
- package/src/server/lib/plugins/schedule-store.server.ts +107 -0
- package/src/server/lib/plugins/schema.server.ts +8 -0
- package/src/server/lib/plugins/settings.server.ts +56 -19
- package/src/server/lib/plugins/shutdown.server.ts +58 -0
- package/src/server/lib/plugins/shutdown.test.ts +28 -3
- package/src/server/lib/realtime/topics/global.server.ts +5 -1
- package/src/server/lib/schedule/rows.server.ts +9 -0
- package/src/server/lib/schedule/runtime.server.test.ts +91 -0
- package/src/server/lib/schedule/runtime.server.ts +101 -23
- package/src/server/lib/schedule/schema.server.ts +15 -0
- package/src/server/lib/schedule/store.server.test.ts +34 -0
- package/src/server/lib/schedule/store.server.ts +33 -9
- package/src/server/lib/sessions/fork.server.test.ts +47 -0
- package/src/server/lib/sessions/fork.server.ts +17 -1
- package/src/server/lib/sessions/spawn.server.ts +2 -2
- package/src/server/lib/waiting/runtime.server.test.ts +48 -0
- package/src/server/lib/waiting/runtime.server.ts +22 -0
- package/src/server/lib/waiting/schema.server.ts +8 -0
- package/src/server/lib/waiting/store.server.test.ts +14 -0
- package/src/server/lib/waiting/store.server.ts +6 -2
- package/src/server/routes/agent/command-resume.test.ts +9 -4
- package/src/server/routes/agent/command.ts +11 -0
- package/src/server/routes/agent/new-mode.test.ts +40 -0
- package/src/server/routes/agent/new.ts +36 -10
- package/src/server/routes/agent/prewarm.ts +48 -7
- package/src/server/routes/chat/index.ts +5 -0
- package/src/server/routes/chat/prompt-history.test.ts +67 -0
- package/src/server/routes/chat/prompt-history.ts +31 -0
- package/src/server/routes/chat/stream.test.ts +21 -0
- package/src/server/routes/chat/stream.ts +5 -0
- package/src/server/routes/fs/action-archive.test.ts +128 -0
- package/src/server/routes/fs/action-bulk.ts +106 -0
- package/src/server/routes/fs/action-save-bytes.test.ts +59 -0
- package/src/server/routes/fs/action-transfer.test.ts +26 -0
- package/src/server/routes/fs/action.ts +100 -12
- package/src/server/routes/fs/archive.ts +20 -0
- package/src/server/routes/fs/digest.test.ts +100 -0
- package/src/server/routes/fs/digest.ts +106 -0
- package/src/server/routes/fs/grant.test.ts +5 -2
- package/src/server/routes/fs/index.ts +4 -0
- package/src/server/routes/fs/read.ts +6 -1
- package/src/server/routes/fs/scope.test.ts +6 -2
- package/src/server/routes/harness/custom.test.ts +131 -0
- package/src/server/routes/harness/import-action.ts +3 -3
- package/src/server/routes/harness/root.ts +47 -9
- package/src/server/routes/harness/summary.test.ts +50 -0
- package/src/server/routes/harness/update-status.ts +41 -2
- package/src/server/routes/harness/update.test.ts +56 -2
- package/src/server/routes/harness/update.ts +2 -2
- package/src/server/routes/panels/bindings.ts +2 -0
- package/src/server/routes/panels/settings.test.ts +165 -0
- package/src/server/routes/panels/settings.ts +106 -0
- package/src/server/routes/schedule/body.ts +14 -0
- package/src/server/routes/schedule/index.ts +28 -4
- package/src/server/routes/sessions/delete.test.ts +4 -0
- package/src/server/routes/settings/mcp.ts +9 -26
- package/src/server/routes/waiting/index.ts +21 -2
- package/src/server/routes/waiting/routes.test.ts +21 -0
- package/src/shared/lib/chat/ask-form/index.ts +39 -31
- package/src/shared/lib/chat/ask-form/labels.ts +46 -0
- package/src/shared/lib/chat/ask-form/tokens.ts +11 -2
- package/src/shared/lib/chat/ask-form.test.ts +57 -0
- package/src/shared/lib/chat/ask-questions.ts +31 -0
- package/src/shared/lib/chat/composer/delegation.ts +3 -3
- package/src/shared/lib/chat/composer/history.test.ts +67 -0
- package/src/shared/lib/chat/composer/history.ts +61 -0
- package/src/shared/lib/chat/irc-notice.ts +42 -0
- package/src/shared/lib/chat/timeline/fork-anchor.test.ts +99 -0
- package/src/shared/lib/chat/timeline/fork-anchor.ts +47 -0
- package/src/shared/lib/chat/todo/parser.ts +6 -4
- package/src/shared/lib/fs/archive.test.ts +101 -0
- package/src/shared/lib/fs/archive.ts +191 -0
- package/src/shared/lib/fs/clipboard.test.ts +32 -7
- package/src/shared/lib/fs/clipboard.ts +59 -14
- package/src/shared/lib/fs/content-hash.ts +29 -0
- package/src/shared/lib/fs/csv.test.ts +50 -0
- package/src/shared/lib/fs/csv.ts +40 -0
- package/src/shared/lib/fs/document-kind.test.ts +13 -6
- package/src/shared/lib/fs/document-kind.ts +18 -6
- package/src/shared/lib/fs/file-kind-classify.test.ts +4 -0
- package/src/shared/lib/fs/file-kind.test.ts +2 -7
- package/src/shared/lib/fs/file-kind.ts +4 -2
- package/src/shared/lib/fs/grid-edit.test.ts +24 -0
- package/src/shared/lib/fs/grid-edit.ts +29 -0
- package/src/shared/lib/fs/grid-selection.test.ts +137 -0
- package/src/shared/lib/fs/grid-selection.ts +138 -0
- package/src/shared/lib/harness/brand-color.ts +5 -0
- package/src/shared/lib/harness/catalog.test.ts +22 -0
- package/src/shared/lib/harness/catalog.ts +60 -7
- package/src/shared/lib/harness/config-fields.test.ts +25 -0
- package/src/shared/lib/harness/config-fields.ts +33 -3
- package/src/shared/lib/harness/dialects.ts +1 -1
- package/src/shared/lib/harness/fork.ts +60 -0
- package/src/shared/lib/harness/mcp-facts.test.ts +30 -0
- package/src/shared/lib/harness/mcp-facts.ts +69 -0
- package/src/shared/lib/harness/menu.test.ts +16 -1
- package/src/shared/lib/harness/menu.ts +2 -2
- package/src/shared/lib/harness/provider-contracts.ts +109 -0
- package/src/shared/lib/harness/provider-facts.test.ts +2 -1
- package/src/shared/lib/harness/provider-facts.ts +24 -115
- package/src/shared/lib/harness/provider-lookup.ts +37 -0
- package/src/shared/lib/harness/providers.ts +2 -1
- package/src/shared/lib/harness/rewind.ts +6 -6
- package/src/shared/lib/harness/session-modes.ts +31 -0
- package/src/shared/lib/harness/transcript.test.ts +29 -0
- package/src/shared/lib/harness/transcript.ts +19 -0
- package/src/shared/lib/harness/updates.ts +10 -0
- package/src/shared/lib/notifications/settings.test.ts +21 -0
- package/src/shared/lib/notifications/settings.ts +24 -0
- package/src/shared/lib/omp/session/mapper.test.ts +31 -0
- package/src/shared/lib/omp/session/mapper.ts +17 -0
- package/src/shared/lib/omp/session/messages-map-notice.test.ts +68 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +1 -35
- package/src/shared/lib/omp/session/messages-map.ts +17 -0
- package/src/shared/lib/omp/session/prewarm.test.ts +28 -4
- package/src/shared/lib/omp/session/prewarm.ts +25 -6
- package/src/shared/lib/omp/session/stream-state.server.test.ts +25 -0
- package/src/shared/lib/omp/session/stream-state.server.ts +8 -4
- package/src/shared/lib/omp/session/wait.ts +10 -1
- package/src/shared/lib/panels/capabilities.test.ts +1 -1
- package/src/shared/lib/panels/capabilities.ts +3 -0
- package/src/shared/lib/plugins/settings.ts +22 -0
- package/src/shared/lib/schedule/parse.test.ts +48 -0
- package/src/shared/lib/schedule/parse.ts +69 -45
- package/src/shared/lib/schedule/timezone.ts +128 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/settings/sections.ts +8 -4
- package/src/shared/lib/ui/picker-filter.test.ts +23 -0
- package/src/shared/lib/ui/picker-filter.ts +20 -0
- package/src/shared/lib/workspace/refresh-cadence.test.ts +25 -1
- package/src/shared/lib/workspace/relative-time.ts +16 -0
- package/src/shared/types/chat.ts +4 -0
- package/src/shared/types/harness.ts +12 -1
- package/src/shared/types/omp/agent.ts +6 -0
- package/src/shared/types/omp/session.ts +18 -0
- package/src/shared/types/panels-registry.ts +3 -3
- package/src/shared/types/panels.ts +4 -2
- package/src/shared/types/schedule.ts +13 -0
- package/src/shared/types/settings/state.ts +18 -7
- package/src/shared/types/todo.ts +3 -1
- package/src/shared/types/waiting.ts +9 -0
- package/src/test-support/file-actions.test-util.ts +4 -0
- package/src/test-support/file-archive.test-util.ts +41 -0
- package/src/test-support/file-clipboard.test-util.ts +9 -6
- package/src/test-support/file-editor.test-util.ts +70 -5
- package/src/test-support/harness-table.test-util.ts +2 -0
- package/src/test-support/preload.ts +46 -0
- package/dist/client/static/js/index-32rpkj6b.css +0 -1
- package/src/client/hooks/editor/use-external-change-notice.ts +0 -71
- package/src/client/hooks/editor/use-external-change.test.ts +0 -88
- 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 {
|
|
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
|
-
{/*
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
|
@@ -122,7 +122,7 @@ export function ClassicDrawer({
|
|
|
122
122
|
/>
|
|
123
123
|
|
|
124
124
|
{failed ? (
|
|
125
|
-
<SessionListNotice touch onRetry={onRefresh} />
|
|
125
|
+
<SessionListNotice touch onRetry={onRefresh} refreshing={refreshing} />
|
|
126
126
|
) : initializing ? (
|
|
127
127
|
<MobileSessionListSkeleton />
|
|
128
128
|
) : (
|
|
@@ -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
|
|
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 {
|
|
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
|
-
|
|
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,
|
|
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: '
|
|
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
|
|
@@ -36,6 +36,9 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
|
|
|
36
36
|
{ id: 'behavior', label: 'Behavior', icon: Sliders, section: 'OMP', description: 'Native AGENTS.md and RULES.md: global instructions, permission gates, and safety filters.' },
|
|
37
37
|
{ id: 'commands', label: 'Commands', icon: Terminal, section: 'OMP', description: 'Slash command macros and terminal shortcuts.' },
|
|
38
38
|
{ id: 'mcp', label: 'MCP', icon: Boxes, section: 'OMP', description: 'Model Context Protocol servers and dynamic tools.' },
|
|
39
|
+
{ id: 'plugins', label: 'Plugins', icon: Plug, section: 'OMP', description: 'Installed omp plugins, marketplaces, features, and plugin settings.' },
|
|
40
|
+
{ id: 'skills', label: 'Skills', icon: Library, section: 'OMP', description: 'Manage downloaded skills and scripts.' },
|
|
41
|
+
{ id: 'skills-catalog', label: 'Skills Catalog', icon: BookOpen, section: 'OMP', description: 'Browse and install new skills.' },
|
|
39
42
|
// HARNESSES
|
|
40
43
|
// HARNESSES — one page per agent, derived from the catalog. `harnessMenuEntries`
|
|
41
44
|
// returns the overview first, then each non-built-in harness in catalog order.
|
|
@@ -49,12 +52,31 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
|
|
|
49
52
|
...(entry.harness ? { harness: entry.harness } : {}),
|
|
50
53
|
description: entry.description,
|
|
51
54
|
})),
|
|
52
|
-
// LIBRARY
|
|
53
|
-
{ id: 'plugins', label: 'Plugins', icon: Plug, section: 'LIBRARY', description: 'Installed omp plugins, marketplaces, features, and plugin settings.' },
|
|
54
|
-
{ id: 'skills', label: 'Skills', icon: Library, section: 'LIBRARY', description: 'Manage downloaded skills and scripts.' },
|
|
55
|
-
{ id: 'skills-catalog', label: 'Skills Catalog', icon: BookOpen, section: 'LIBRARY', description: 'Browse and install new skills.' },
|
|
56
55
|
];
|
|
57
56
|
|
|
57
|
+
/**
|
|
58
|
+
* The category list for a roster.
|
|
59
|
+
*
|
|
60
|
+
* `SETTINGS_CATEGORIES` is the build's own list; a user-added harness is not in
|
|
61
|
+
* it, so the HARNESSES section is rebuilt from the ids the catalog answered.
|
|
62
|
+
* The rest of the list keeps its order; the harness block is appended because
|
|
63
|
+
* HARNESSES is the last group.
|
|
64
|
+
*/
|
|
65
|
+
export function settingsCategoriesFor(harnessIds?: readonly string[]): CategoryDef[] {
|
|
66
|
+
// Before the catalog answers, the build's own list is the honest one: an
|
|
67
|
+
// empty roster would hide every built-in harness page until the fetch lands.
|
|
68
|
+
const harnessEntries = harnessMenuEntries(harnessIds && harnessIds.length > 0 ? harnessIds : undefined).map((entry) => ({
|
|
69
|
+
id: entry.id,
|
|
70
|
+
label: entry.label,
|
|
71
|
+
icon: Waypoints,
|
|
72
|
+
section: 'HARNESSES' as const,
|
|
73
|
+
...(entry.harness ? { harness: entry.harness } : {}),
|
|
74
|
+
description: entry.description,
|
|
75
|
+
}));
|
|
76
|
+
const rest = SETTINGS_CATEGORIES.filter((category) => category.section !== 'HARNESSES');
|
|
77
|
+
return [...rest, ...harnessEntries];
|
|
78
|
+
}
|
|
79
|
+
|
|
58
80
|
interface SettingsSidebarProps {
|
|
59
81
|
activeCategory: SettingsCategoryId;
|
|
60
82
|
onSelectCategory: (id: SettingsCategoryId) => void;
|
|
@@ -66,6 +88,8 @@ interface SettingsSidebarProps {
|
|
|
66
88
|
isRestarting: boolean;
|
|
67
89
|
/** Harness ids the user switched OFF: their rows leave the drawer. */
|
|
68
90
|
disabledHarnesses?: string[];
|
|
91
|
+
/** The roster's categories, when the caller has a live harness list. */
|
|
92
|
+
categories?: CategoryDef[];
|
|
69
93
|
className?: string;
|
|
70
94
|
}
|
|
71
95
|
|
|
@@ -79,6 +103,7 @@ export function SettingsSidebar({
|
|
|
79
103
|
onRestartKabmo,
|
|
80
104
|
isRestarting,
|
|
81
105
|
disabledHarnesses = [],
|
|
106
|
+
categories = SETTINGS_CATEGORIES,
|
|
82
107
|
className = ''
|
|
83
108
|
}: SettingsSidebarProps) {
|
|
84
109
|
// A switched-off agent has no row here. The catalog list above stays complete
|
|
@@ -86,7 +111,7 @@ export function SettingsSidebar({
|
|
|
86
111
|
// every entry in it with the switch that decides this. The ids arrive as a
|
|
87
112
|
// PROP rather than from `useHarnesses()` so the drawer stays presentational:
|
|
88
113
|
// it is drawn in table tests that must not fire a catalog read.
|
|
89
|
-
const filteredCategories =
|
|
114
|
+
const filteredCategories = categories.filter(cat => {
|
|
90
115
|
if (cat.harness && disabledHarnesses.includes(cat.harness)) return false;
|
|
91
116
|
if (!searchQuery.trim()) return true;
|
|
92
117
|
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
|
|
|
@@ -129,9 +130,11 @@ export function HarnessSettings({ only }: HarnessSettingsProps = {}) {
|
|
|
129
130
|
<button
|
|
130
131
|
type="button"
|
|
131
132
|
onClick={reload}
|
|
132
|
-
|
|
133
|
+
disabled={isLoading}
|
|
134
|
+
aria-busy={isLoading}
|
|
135
|
+
className="inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-ink/20 px-2.5 py-1.5 text-[11px] text-ink/70 transition-colors hover:border-ink/40 hover:text-ink disabled:opacity-50"
|
|
133
136
|
>
|
|
134
|
-
<RefreshCw size={12} /> Reload catalog
|
|
137
|
+
<RefreshCw size={12} className={isLoading ? 'animate-spin' : undefined} /> Reload catalog
|
|
135
138
|
</button>
|
|
136
139
|
</header>
|
|
137
140
|
|
|
@@ -194,13 +197,16 @@ export function HarnessSettings({ only }: HarnessSettingsProps = {}) {
|
|
|
194
197
|
No harness matches “{query}”.
|
|
195
198
|
</div>
|
|
196
199
|
) : (
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
<>
|
|
201
|
+
<HarnessToggleList
|
|
202
|
+
harnesses={filtered}
|
|
203
|
+
busy={busy}
|
|
204
|
+
onSetEnabled={(id, enabled) => void toggle(id, enabled)}
|
|
205
|
+
onOpen={openHarness}
|
|
206
|
+
onProbe={(id) => void check(id)}
|
|
207
|
+
/>
|
|
208
|
+
<CustomHarnessForm harnesses={harnesses} onChanged={reload} />
|
|
209
|
+
</>
|
|
204
210
|
)}
|
|
205
211
|
</div>
|
|
206
212
|
);
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The system-notification preferences: two delivery switches and three events.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* fact: a default of `true` would show three switches already on,
|
|
11
|
-
* agent run would ask the OS for permission nobody chose. The
|
|
12
|
-
*
|
|
13
|
-
*
|
|
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
|
|
66
|
+
test('both delivery sections are on and the three events are off on a fresh install', () => {
|
|
62
67
|
mount(() => {});
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
expect(
|
|
67
|
-
|
|
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 =
|
|
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
|
-
|
|
113
|
+
switchNamed('Waiting for you')?.click();
|
|
89
114
|
});
|
|
90
115
|
expect(updates).toEqual([{ notifyOnAsk: true }]);
|
|
91
116
|
});
|