@kabmo-labs/kabmo 0.22.0 → 0.24.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/README.md +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +873 -524
- package/dist/client/static/js/{index-297dck9a.js → index-jcr5twtp.js} +799 -795
- package/dist/client/static/js/index-z3w7n85q.css +1 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/groups.test.ts +14 -0
- package/marketplace/plugins/stats/src/groups.ts +20 -0
- package/marketplace/plugins/stats/src/labels.test.ts +9 -0
- package/marketplace/plugins/stats/src/labels.ts +7 -0
- package/marketplace/plugins/stats/src/server.ts +1 -1
- package/package.json +1 -1
- package/src/client/App.tsx +20 -19
- package/src/client/components/common/ComposerTextarea.tsx +10 -1
- package/src/client/components/common/Modal.tsx +2 -6
- package/src/client/components/common/PWAInstallButton.tsx +3 -2
- package/src/client/components/common/Toast.test.tsx +298 -0
- package/src/client/components/common/Toast.tsx +103 -37
- package/src/client/components/common/ToastStack.tsx +33 -12
- package/src/client/components/common/ViewportSelector.tsx +122 -114
- package/src/client/components/common/context-usage-button/Ring.tsx +38 -1
- package/src/client/components/common/context-usage-button/index.test.tsx +19 -3
- package/src/client/components/common/context-usage-button/index.tsx +5 -2
- package/src/client/components/common/harness-glyph/brands.ts +65 -0
- package/src/client/components/common/harness-glyph/harness-glyph.test.ts +185 -0
- package/src/client/components/common/harness-glyph/index.tsx +131 -0
- package/src/client/components/common/header-controls/MoreMenu.tsx +2 -1
- package/src/client/components/common/header-controls/index.tsx +16 -8
- package/src/client/components/common/header-panel-buttons/index.tsx +4 -3
- package/src/client/components/common/panel-mark/index.test.tsx +2 -2
- package/src/client/components/common/panel-mark/index.tsx +11 -2
- package/src/client/components/common/search-select/index.tsx +305 -0
- package/src/client/components/common/search-select/search-select.test.tsx +217 -0
- package/src/client/components/common/server-control/index.tsx +3 -2
- package/src/client/components/common/session-row/index.tsx +18 -1
- package/src/client/components/common/toolbar-row/index.tsx +57 -20
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -3
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +3 -2
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +7 -1
- package/src/client/components/layout/desktop-layout/index.tsx +1 -3
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +1 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +18 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +1 -3
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.test.tsx +332 -0
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.tsx +310 -0
- package/src/client/components/layout/session-sidebar/about-modal/SocialLinks.tsx +63 -51
- package/src/client/components/layout/session-sidebar/about-modal/UpdateSection.tsx +4 -2
- package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +122 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +136 -35
- package/src/client/components/layout/session-sidebar/harness-mark.test.tsx +126 -0
- package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +4 -3
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +1 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +1 -7
- package/src/client/components/mobile/SessionSidebar.tsx +1 -3
- package/src/client/components/mobile/mobile-main-view/Header.tsx +3 -2
- package/src/client/components/mobile/mobile-session-sidebar/Dialogs.tsx +0 -8
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +1 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +17 -1
- package/src/client/components/settings/Modal.tsx +26 -22
- package/src/client/components/settings/Sidebar.tsx +45 -5
- package/src/client/components/settings/categories/HarnessSettings.tsx +207 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +1 -3
- package/src/client/components/settings/categories/ProviderSettings.tsx +0 -4
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +13 -23
- package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +23 -30
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +20 -11
- package/src/client/components/settings/categories/chat-settings/GoalSection.tsx +16 -16
- package/src/client/components/settings/categories/harness-settings/AddProviderForm.tsx +219 -0
- package/src/client/components/settings/categories/harness-settings/ConfigForm.tsx +268 -0
- package/src/client/components/settings/categories/harness-settings/EnvProviderForm.tsx +146 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +278 -0
- package/src/client/components/settings/categories/harness-settings/ImportSection.tsx +195 -0
- package/src/client/components/settings/categories/harness-settings/ProviderPanel.tsx +152 -0
- package/src/client/components/settings/categories/harness-settings/ToggleList.tsx +147 -0
- package/src/client/components/settings/categories/harness-settings/parts.test.tsx +97 -0
- package/src/client/components/settings/categories/harness-settings/parts.tsx +84 -0
- package/src/client/components/settings/categories/harness-settings/provider-panel.test.tsx +313 -0
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +60 -39
- package/src/client/components/settings/categories/omp-settings/RoleRow.tsx +32 -41
- package/src/client/components/settings/categories/omp-settings/role-picker.test-util.ts +45 -0
- package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +11 -4
- package/src/client/components/settings/groups.test.tsx +160 -0
- package/src/client/components/settings/harness-icons.test.tsx +134 -0
- package/src/client/components/workspace/browser-panel/AddressBar.tsx +3 -13
- package/src/client/components/workspace/browser-toolbar/clusters.tsx +237 -0
- package/src/client/components/workspace/browser-toolbar/index.test.tsx +167 -0
- package/src/client/components/workspace/browser-toolbar/index.tsx +99 -100
- package/src/client/components/workspace/btw-panel/Messages.tsx +4 -1
- package/src/client/components/workspace/btw-panel/index.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +11 -7
- package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +5 -2
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +13 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.test.ts +41 -0
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +19 -14
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +14 -0
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +6 -0
- package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +14 -0
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +4 -0
- package/src/client/components/workspace/chat-timeline/RunMark.tsx +58 -0
- package/src/client/components/workspace/chat-timeline/SubagentView.tsx +4 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +4 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +11 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +13 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +27 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +48 -23
- package/src/client/components/workspace/chat-timeline/chat-input/composer-portal.test.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +21 -1
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +7 -0
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +13 -0
- package/src/client/components/workspace/chat-timeline/chat-input/selection.ts +11 -2
- package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/index.tsx +17 -15
- package/src/client/components/workspace/chat-timeline/pending-harness.test.tsx +157 -0
- package/src/client/components/workspace/chat-timeline/run-mark.test.ts +104 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FrameControl.tsx +11 -20
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/GroupedAsk.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +31 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +5 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.test.ts +56 -45
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +38 -94
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/wait-parts.tsx +76 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.ts +2 -1
- package/src/client/components/workspace/file-explorer/index.test.ts +25 -0
- package/src/client/components/workspace/file-explorer/index.tsx +10 -6
- package/src/client/components/workspace/git-panel/index.test.ts +13 -3
- package/src/client/components/workspace/git-panel/index.tsx +1 -3
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +92 -0
- package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +290 -0
- package/src/client/components/workspace/model-dropdown/Item.tsx +11 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +119 -8
- package/src/client/components/workspace/model-dropdown/Section.tsx +4 -0
- package/src/client/components/workspace/model-dropdown/fullscreen-picker.ts +51 -0
- package/src/client/components/workspace/model-dropdown/harness-models.test.ts +177 -0
- package/src/client/components/workspace/model-dropdown/harness-models.ts +148 -0
- package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +336 -0
- package/src/client/components/workspace/model-dropdown/index.tsx +114 -85
- package/src/client/components/workspace/model-dropdown/placement.test.tsx +127 -0
- package/src/client/components/workspace/model-dropdown/popover-metrics.test.ts +107 -0
- package/src/client/components/workspace/model-dropdown/popover-metrics.ts +118 -0
- package/src/client/components/workspace/model-dropdown/row-mutations.ts +106 -0
- package/src/client/components/workspace/model-dropdown/trigger.test.ts +22 -2
- package/src/client/components/workspace/model-dropdown/use-popover-size.ts +89 -0
- package/src/client/data/settings/omp-schema.json +224 -17
- package/src/client/hooks/chat/composer/index.ts +11 -2
- package/src/client/hooks/chat/composer/items.test.ts +11 -0
- package/src/client/hooks/chat/composer/items.ts +4 -2
- package/src/client/hooks/chat/composer/model-selection.test.ts +110 -0
- package/src/client/hooks/chat/composer/model-selection.ts +45 -4
- package/src/client/hooks/chat/omp/prompt-send.ts +4 -2
- package/src/client/hooks/chat/timeline/actions.ts +10 -5
- package/src/client/hooks/chat/timeline/ask-frames.ts +5 -4
- package/src/client/hooks/chat/timeline/composer-local-actions.test.ts +19 -81
- package/src/client/hooks/chat/timeline/composer-modes.ts +11 -2
- package/src/client/hooks/chat/timeline/composer-refs.ts +16 -1
- package/src/client/hooks/chat/timeline/index.ts +27 -35
- package/src/client/hooks/chat/timeline/mode-availability.test.ts +51 -0
- package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
- package/src/client/hooks/chat/timeline/modes.ts +41 -2
- package/src/client/hooks/chat/timeline/new-chat-open.test.ts +86 -0
- package/src/client/hooks/chat/timeline/new-chat-open.ts +23 -5
- package/src/client/hooks/chat/timeline/new-chat.test.ts +32 -4
- package/src/client/hooks/chat/timeline/new-chat.ts +18 -6
- package/src/client/hooks/chat/timeline/prompt-text.test.ts +7 -0
- package/src/client/hooks/chat/timeline/prompt-text.ts +15 -6
- package/src/client/hooks/chat/timeline/rewind-actions.test.ts +51 -1
- package/src/client/hooks/chat/timeline/rewind-actions.ts +23 -1
- package/src/client/hooks/chat/timeline/run-identity.test.ts +52 -0
- package/src/client/hooks/chat/timeline/run-identity.ts +23 -11
- package/src/client/hooks/chat/timeline/send-execute.test.ts +55 -0
- package/src/client/hooks/chat/timeline/send-props.ts +11 -3
- package/src/client/hooks/chat/timeline/send-steer.test.ts +2 -3
- package/src/client/hooks/chat/timeline/send.test-util.ts +3 -2
- package/src/client/hooks/chat/timeline/send.test.ts +2 -3
- package/src/client/hooks/chat/timeline/send.ts +34 -8
- package/src/client/hooks/chat/timeline/session-harness.test.ts +163 -0
- package/src/client/hooks/chat/timeline/session-harness.ts +164 -0
- package/src/client/hooks/chat/timeline/session-load.test-util.ts +6 -2
- package/src/client/hooks/chat/timeline/session-load.test.ts +31 -0
- package/src/client/hooks/chat/timeline/session-load.ts +6 -14
- package/src/client/hooks/chat/timeline/session-shapes.ts +32 -0
- package/src/client/hooks/chat/timeline/spawn-harness.ts +41 -0
- package/src/client/hooks/chat/timeline/timeline-running.ts +55 -0
- package/src/client/hooks/chat/timeline/tui-only-guard.ts +9 -0
- package/src/client/hooks/chat/timeline/undo-confirmation.test.ts +131 -0
- package/src/client/hooks/models/harness-catalog.ts +114 -0
- package/src/client/hooks/models/provider-writes.test.ts +81 -0
- package/src/client/hooks/models/provider-writes.ts +144 -0
- package/src/client/hooks/models/use-harness-versions.test.ts +152 -0
- package/src/client/hooks/models/use-harness-versions.ts +136 -0
- package/src/client/hooks/models/use-harnesses-controller.ts +57 -0
- package/src/client/hooks/models/use-harnesses-signal.test.ts +128 -0
- package/src/client/hooks/models/use-harnesses.test.ts +187 -0
- package/src/client/hooks/models/use-harnesses.ts +215 -0
- package/src/client/hooks/settings/providers/index.ts +1 -3
- package/src/client/hooks/ui/editor-error-toast.ts +10 -3
- package/src/client/hooks/ui/icon-style.ts +28 -0
- package/src/client/hooks/ui/on-click-outside.test.ts +104 -0
- package/src/client/hooks/ui/on-click-outside.ts +14 -2
- package/src/client/hooks/ui/theme.ts +6 -0
- package/src/client/hooks/ui/toast-queue.test.ts +126 -0
- package/src/client/hooks/ui/toasts.ts +132 -27
- package/src/client/hooks/ui/ui-feedback.test.ts +4 -91
- package/src/client/lib/ui/control-plate.test.ts +76 -0
- package/src/client/lib/ui/control-plate.ts +65 -0
- package/src/client/tailwind.css +47 -1
- package/src/server/lib/assets/shell-attributes.server.ts +9 -2
- package/src/server/lib/assets/shell-attributes.test.ts +22 -6
- package/src/server/lib/db/schema.ts +4 -0
- package/src/server/lib/harness/acp/acp-audit.server.ts +107 -0
- package/src/server/lib/harness/acp/acp-goal-driver.server.ts +153 -0
- package/src/server/lib/harness/acp/acp-goal-state.server.ts +136 -0
- package/src/server/lib/harness/acp/acp-goal.server.ts +273 -0
- package/src/server/lib/harness/acp/acp-goal.test.ts +229 -0
- package/src/server/lib/harness/acp/acp-telemetry.server.ts +133 -0
- package/src/server/lib/harness/acp/acp-telemetry.test.ts +85 -0
- package/src/server/lib/harness/acp/acp-todos.server.ts +45 -0
- package/src/server/lib/harness/acp/acp-todos.test.ts +43 -0
- package/src/server/lib/harness/acp/activation.test.ts +81 -0
- package/src/server/lib/harness/acp/activation.ts +72 -0
- package/src/server/lib/harness/acp/calls.ts +97 -0
- package/src/server/lib/harness/acp/client.test.ts +73 -0
- package/src/server/lib/harness/acp/client.ts +339 -0
- package/src/server/lib/harness/acp/commands.test.ts +92 -0
- package/src/server/lib/harness/acp/commands.ts +165 -0
- package/src/server/lib/harness/acp/frames.test.ts +315 -0
- package/src/server/lib/harness/acp/frames.ts +349 -0
- package/src/server/lib/harness/acp/mapper.ts +204 -0
- package/src/server/lib/harness/acp/permissions.test.ts +66 -0
- package/src/server/lib/harness/acp/permissions.ts +155 -0
- package/src/server/lib/harness/acp/prompt.test.ts +130 -0
- package/src/server/lib/harness/acp/prompt.ts +134 -0
- package/src/server/lib/harness/acp/protocol.ts +162 -0
- package/src/server/lib/harness/acp/session-config.test.ts +73 -0
- package/src/server/lib/harness/acp/session-config.ts +148 -0
- package/src/server/lib/harness/acp/session-facts.ts +71 -0
- package/src/server/lib/harness/acp/session-handshake.ts +89 -0
- package/src/server/lib/harness/acp/session-idle.ts +51 -0
- package/src/server/lib/harness/acp/session-notifications.ts +95 -0
- package/src/server/lib/harness/acp/session-observers.test.ts +193 -0
- package/src/server/lib/harness/acp/session-options.ts +33 -0
- package/src/server/lib/harness/acp/session-permissions.test.ts +105 -0
- package/src/server/lib/harness/acp/session-permissions.ts +74 -0
- package/src/server/lib/harness/acp/session-reaper.test.ts +96 -0
- package/src/server/lib/harness/acp/session-turns.ts +95 -0
- package/src/server/lib/harness/acp/session-usage.ts +60 -0
- package/src/server/lib/harness/acp/session-web-state.ts +61 -0
- package/src/server/lib/harness/acp/session.test-util.ts +160 -0
- package/src/server/lib/harness/acp/session.test.ts +233 -0
- package/src/server/lib/harness/acp/session.ts +350 -0
- package/src/server/lib/harness/acp/turn.ts +199 -0
- package/src/server/lib/harness/acp/verbs.ts +87 -0
- package/src/server/lib/harness/auto-probe.server.test.ts +121 -0
- package/src/server/lib/harness/auto-probe.server.ts +178 -0
- package/src/server/lib/harness/capabilities.ts +67 -0
- package/src/server/lib/harness/config-invalidation.test.ts +91 -0
- package/src/server/lib/harness/config.server.test.ts +105 -0
- package/src/server/lib/harness/config.server.ts +98 -0
- package/src/server/lib/harness/enabled.server.test.ts +87 -0
- package/src/server/lib/harness/enabled.server.ts +61 -0
- package/src/server/lib/harness/launch-table.ts +195 -0
- package/src/server/lib/harness/launch.test.ts +220 -0
- package/src/server/lib/harness/launch.ts +216 -0
- package/src/server/lib/harness/probe-cache.server.test.ts +154 -0
- package/src/server/lib/harness/probe-cache.server.ts +177 -0
- package/src/server/lib/harness/provider-entry.ts +212 -0
- package/src/server/lib/harness/provider-file.server.ts +67 -0
- package/src/server/lib/harness/provider-import.test.ts +191 -0
- package/src/server/lib/harness/provider-probe.server.ts +123 -0
- package/src/server/lib/harness/provider-sources.server.test.ts +45 -0
- package/src/server/lib/harness/provider-sources.server.ts +308 -0
- package/src/server/lib/harness/provider-write-error.ts +19 -0
- package/src/server/lib/harness/provider-write.server.test.ts +308 -0
- package/src/server/lib/harness/provider-write.server.ts +339 -0
- package/src/server/lib/harness/provider-zcode.server.test.ts +270 -0
- package/src/server/lib/harness/provider-zcode.server.ts +324 -0
- package/src/server/lib/harness/register.server.ts +36 -0
- package/src/server/lib/harness/registry.ts +58 -0
- package/src/server/lib/harness/schema.server.ts +129 -0
- package/src/server/lib/harness/session-store.server.test.ts +175 -0
- package/src/server/lib/harness/session-store.server.ts +206 -0
- package/src/server/lib/harness/session-title.server.test.ts +109 -0
- package/src/server/lib/harness/session-title.server.ts +70 -0
- package/src/server/lib/harness/session.ts +74 -0
- package/src/server/lib/harness/spawn.server.ts +133 -0
- package/src/server/lib/harness/update-state.server.ts +185 -0
- package/src/server/lib/lifecycle/after-listen.ts +7 -0
- package/src/server/lib/models/provider-items.server.ts +1 -1
- package/src/server/lib/models/registry-refresh.server.test.ts +87 -0
- package/src/server/lib/models/registry-refresh.server.ts +98 -0
- package/src/server/lib/omp/config/models-config.ts +4 -0
- package/src/server/lib/omp/core/cli.ts +13 -0
- package/src/server/lib/omp/core/host-resolution.test.ts +6 -3
- package/src/server/lib/omp/rpc/child-config.ts +5 -4
- package/src/server/lib/omp/rpc/constants.test.ts +2 -1
- package/src/server/lib/omp/rpc/event-fanout.ts +9 -0
- package/src/server/lib/omp/rpc/forked-resume.test.ts +14 -3
- package/src/server/lib/omp/rpc/rpc-primitives.test.ts +11 -0
- package/src/server/lib/omp/rpc/session-registration.ts +7 -2
- package/src/server/lib/omp/rpc/session-registry.test.ts +2 -1
- package/src/server/lib/omp/rpc/session-registry.ts +74 -5
- package/src/server/lib/omp/session/acp-rows.server.ts +79 -0
- package/src/server/lib/omp/session/delete-flow.server.ts +15 -8
- package/src/server/lib/omp/session/delete.server.ts +12 -0
- package/src/server/lib/omp/session/sidebar-data.harness.test.ts +247 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +56 -3
- package/src/server/lib/queue/delivery.server.test.ts +4 -2
- package/src/server/lib/queue/payload.test.ts +67 -0
- package/src/server/lib/queue/payload.ts +9 -3
- package/src/server/lib/realtime/signals.server.test.ts +99 -0
- package/src/server/lib/realtime/signals.server.ts +25 -5
- package/src/server/lib/realtime/topics/session-data.server.ts +29 -0
- package/src/server/lib/realtime/topics/session.server.ts +3 -3
- package/src/server/routes/agent/command-resume.test.ts +77 -0
- package/src/server/routes/agent/command.test.ts +243 -2
- package/src/server/routes/agent/command.ts +78 -15
- package/src/server/routes/agent/harness-command.ts +133 -0
- package/src/server/routes/agent/new.ts +63 -1
- package/src/server/routes/chat/rewind.test.ts +147 -0
- package/src/server/routes/chat/rewind.ts +29 -7
- package/src/server/routes/chat/session.test.ts +240 -0
- package/src/server/routes/chat/session.ts +96 -4
- package/src/server/routes/harness/add-provider.test.ts +233 -0
- package/src/server/routes/harness/import-action.ts +272 -0
- package/src/server/routes/harness/import.test.ts +196 -0
- package/src/server/routes/harness/index.ts +13 -0
- package/src/server/routes/harness/root.ts +280 -0
- package/src/server/routes/harness/toggle.test.ts +127 -0
- package/src/server/routes/harness/update.ts +259 -0
- package/src/server/routes/harness/versions.test.ts +148 -0
- package/src/server/routes/harness/versions.ts +105 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/sessions/delete-acp.test.ts +227 -0
- package/src/server/routes/sessions/queue.ts +7 -2
- package/src/server/routes/sessions/routes-queue.test.ts +52 -0
- package/src/server/routes/sessions/routes.test.ts +47 -13
- package/src/server/routes/sessions/session.ts +35 -0
- package/src/server/routes/settings/commands-harness.test.ts +92 -0
- package/src/server/routes/settings/commands.ts +26 -0
- package/src/server/routes/settings/model-override.ts +5 -2
- package/src/server/routes/settings/provider-entry.ts +2 -2
- package/src/server/routes/settings/provider-model.ts +2 -2
- package/src/server/routes/settings/provider-models.ts +2 -2
- package/src/server/routes/settings/provider-refresh.ts +6 -4
- package/src/server/routes/settings/providers.ts +3 -1
- package/src/server/routes/settings/settings-config-routes.test.ts +10 -2
- package/src/server/routes/settings/skills.ts +12 -0
- package/src/shared/lib/chat/ask-form/fields.ts +76 -0
- package/src/shared/lib/chat/ask-form/index.ts +323 -0
- package/src/shared/lib/chat/ask-form/tokens.ts +199 -0
- package/src/shared/lib/chat/ask-form/types.ts +43 -0
- package/src/shared/lib/chat/ask-form.test.ts +137 -0
- package/src/shared/lib/chat/ask-questions.test.ts +65 -1
- package/src/shared/lib/chat/ask-questions.ts +51 -145
- package/src/shared/lib/chat/ask-results.ts +198 -0
- package/src/shared/lib/chat/composer/client.ts +20 -8
- package/src/shared/lib/chat/context/usage.test.ts +8 -4
- package/src/shared/lib/chat/context/usage.ts +17 -3
- package/src/shared/lib/chat/omp/abort.test.ts +61 -0
- package/src/shared/lib/chat/omp/abort.ts +8 -2
- package/src/shared/lib/chat/omp/tool-frames.test.ts +23 -0
- package/src/shared/lib/chat/omp/tool-frames.ts +12 -2
- package/src/shared/lib/chat/timeline/omp-callbacks.ts +13 -1
- package/src/shared/lib/chat/timeline/prompt-error.test.ts +146 -0
- package/src/shared/lib/chat/timeline/prompt-error.ts +88 -0
- package/src/shared/lib/chat/tool/summary-wait.test.ts +18 -8
- package/src/shared/lib/chat/tool/wait-facts.ts +14 -8
- package/src/shared/lib/harness/brand-color.test.ts +66 -0
- package/src/shared/lib/harness/brand-color.ts +96 -0
- package/src/shared/lib/harness/catalog.test.ts +88 -0
- package/src/shared/lib/harness/catalog.ts +169 -0
- package/src/shared/lib/harness/config-fields.test.ts +139 -0
- package/src/shared/lib/harness/config-fields.ts +168 -0
- package/src/shared/lib/harness/config.test.ts +153 -0
- package/src/shared/lib/harness/config.ts +206 -0
- package/src/shared/lib/harness/dialects.test.ts +140 -0
- package/src/shared/lib/harness/dialects.ts +249 -0
- package/src/shared/lib/harness/enabled.test.ts +79 -0
- package/src/shared/lib/harness/enabled.ts +72 -0
- package/src/shared/lib/harness/menu.test.ts +94 -0
- package/src/shared/lib/harness/menu.ts +88 -0
- package/src/shared/lib/harness/provider-facts.test.ts +199 -0
- package/src/shared/lib/harness/provider-facts.ts +349 -0
- package/src/shared/lib/harness/provider-slug.ts +46 -0
- package/src/shared/lib/harness/providers.ts +175 -0
- package/src/shared/lib/harness/rewind.ts +24 -0
- package/src/shared/lib/harness/status.test.ts +158 -0
- package/src/shared/lib/harness/status.ts +112 -0
- package/src/shared/lib/harness/update-plan.test.ts +163 -0
- package/src/shared/lib/harness/update-plan.ts +140 -0
- package/src/shared/lib/harness/updates.test.ts +106 -0
- package/src/shared/lib/harness/updates.ts +177 -0
- package/src/shared/lib/icons/icon-paint-authority.test.ts +16 -4
- package/src/shared/lib/icons/icon-paint-authority.ts +57 -12
- package/src/shared/lib/icons/icon-paint-bucket.test.ts +84 -0
- package/src/shared/lib/icons/icon-paint-css.test.ts +23 -25
- package/src/shared/lib/icons/icon-paint-css.ts +69 -55
- package/src/shared/lib/icons/icon-paint-harness.test.ts +73 -0
- package/src/shared/lib/icons/icon-paint-harness.ts +75 -0
- package/src/shared/lib/icons/icon-paint-ink.ts +108 -0
- package/src/shared/lib/icons/icon-paint-panel.ts +19 -4
- package/src/shared/lib/icons/icon-paint-weight.ts +21 -2
- package/src/shared/lib/icons/icon-tone.ts +118 -21
- package/src/shared/lib/icons/tint-hues.generated.ts +100 -284
- package/src/shared/lib/icons/tint-tones.test.ts +79 -25
- package/src/shared/lib/icons/tint.ts +66 -6
- package/src/shared/lib/models/client.ts +10 -1
- package/src/shared/lib/models/provider/vendors.ts +72 -0
- package/src/shared/lib/omp/config/schema.test.ts +36 -0
- package/src/shared/lib/omp/dialog-methods.ts +4 -3
- package/src/shared/lib/omp/session/messages-map-trace.test.ts +42 -0
- package/src/shared/lib/omp/session/messages-map.ts +6 -1
- package/src/shared/lib/omp/session/parse-message-blocks-toolcall.test.ts +8 -0
- package/src/shared/lib/omp/session/parse-message-blocks.ts +6 -1
- package/src/shared/lib/omp/session/shell-trace.test.ts +69 -0
- package/src/shared/lib/omp/session/shell-trace.ts +63 -0
- package/src/shared/lib/omp/session/sidebar.ts +37 -10
- package/src/shared/lib/omp/session/wait-idle.test.ts +47 -0
- package/src/shared/lib/omp/session/wait-idle.ts +93 -0
- package/src/shared/lib/omp/session/wait.test.ts +34 -33
- package/src/shared/lib/omp/session/wait.ts +25 -39
- package/src/shared/lib/settings/sections.ts +24 -0
- package/src/shared/lib/theme/css.ts +2 -0
- package/src/shared/lib/theme/ink-scale.ts +21 -1
- package/src/shared/lib/theme/theme.test.ts +25 -9
- package/src/shared/lib/ui/safe-area.test.ts +28 -0
- package/src/shared/lib/ui/safe-area.ts +42 -0
- package/src/shared/lib/ui/toast-duration.test.ts +74 -0
- package/src/shared/lib/ui/toast-duration.ts +70 -0
- package/src/shared/types/harness-version.ts +59 -0
- package/src/shared/types/harness.ts +201 -0
- package/src/shared/types/index.ts +2 -0
- package/src/shared/types/omp/agent.ts +13 -0
- package/src/shared/types/settings/state.ts +10 -1
- package/src/shared/types/workspace.ts +10 -0
- package/src/test-support/env.ts +38 -0
- package/src/test-support/file-explorer-render.test-util.ts +37 -0
- package/src/test-support/file-explorer.test-util.ts +20 -18
- package/src/test-support/harness-table.test-util.ts +108 -0
- package/dist/client/static/js/index-7ppta1pb.css +0 -1
|
@@ -61,13 +61,25 @@ export interface ToolbarCluster {
|
|
|
61
61
|
interface ToolbarRowProps {
|
|
62
62
|
clusters: ToolbarCluster[];
|
|
63
63
|
className?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The width the PARENT grants this row, when the row must not grow into the
|
|
66
|
+
* space beside it. A self-measuring row can only ever report the width its
|
|
67
|
+
* visible clusters add up to, so a cluster it buries stays buried when the
|
|
68
|
+
* panel widens — the sibling beside it absorbs the new space instead. Passing
|
|
69
|
+
* a number here makes the row content-sized (`flex-none`) and turns off its
|
|
70
|
+
* own measurement; the parent owns the split.
|
|
71
|
+
*/
|
|
72
|
+
available?: number;
|
|
64
73
|
}
|
|
65
74
|
|
|
66
|
-
export function ToolbarRow({ clusters, className = '' }: ToolbarRowProps) {
|
|
75
|
+
export function ToolbarRow({ clusters, className = '', available: granted }: ToolbarRowProps) {
|
|
67
76
|
const rowRef = useRef<HTMLDivElement>(null);
|
|
68
77
|
/** Measured widths, tagged with the cluster set they describe. */
|
|
69
78
|
const [metrics, setMetrics] = useState<{ signature: string; widths: number[] } | null>(null);
|
|
70
|
-
const [
|
|
79
|
+
const [rowWidth, setRowWidth] = useState(0);
|
|
80
|
+
/** Bumped by the observer to re-run a measurement the guard refused. */
|
|
81
|
+
const [measureTick, setMeasureTick] = useState(0);
|
|
82
|
+
const available = granted ?? rowWidth;
|
|
71
83
|
|
|
72
84
|
// The set changes when a conditional cluster appears or disappears (a
|
|
73
85
|
// previewable file opened, a byte viewer took over), and stale widths would
|
|
@@ -78,9 +90,13 @@ export function ToolbarRow({ clusters, className = '' }: ToolbarRowProps) {
|
|
|
78
90
|
const ready = metrics?.signature === signature;
|
|
79
91
|
const widths = ready ? metrics.widths : [];
|
|
80
92
|
const pinned = clusters.map((cluster) => cluster.pinned === true);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
// A granted width of 0 means the parent has no room to give — not that the
|
|
94
|
+
// row is unmeasured. Everything but the `⋯` trigger goes into the menu.
|
|
95
|
+
const visible = granted === 0
|
|
96
|
+
? clusters.map(() => false)
|
|
97
|
+
: widths.length > 0
|
|
98
|
+
? toolbarVisibleClusters({ widths, pinned, available })
|
|
99
|
+
: clusters.map(() => true);
|
|
84
100
|
|
|
85
101
|
useLayoutEffect(() => {
|
|
86
102
|
const row = rowRef.current;
|
|
@@ -88,35 +104,56 @@ export function ToolbarRow({ clusters, className = '' }: ToolbarRowProps) {
|
|
|
88
104
|
if (!ready) {
|
|
89
105
|
const children = [...row.querySelectorAll<HTMLElement>('[data-toolbar-cluster]')];
|
|
90
106
|
if (children.length === clusters.length) {
|
|
91
|
-
|
|
107
|
+
const measured = children.map((child) => child.getBoundingClientRect().width);
|
|
108
|
+
// All-zero means the row was laid out inside a collapsed ancestor — the
|
|
109
|
+
// panel is still animating open, or the tab is hidden. Recording that
|
|
110
|
+
// would make every cluster "0px wide", so the whole row would report as
|
|
111
|
+
// fitting and nothing would ever reach `⋯`. Wait for the observer's
|
|
112
|
+
// next tick instead, which is when the row has a real width. One zero
|
|
113
|
+
// is not this case: a cluster can legitimately render nothing.
|
|
114
|
+
if (measured.some((width) => width > 0)) setMetrics({ signature, widths: measured });
|
|
92
115
|
}
|
|
93
116
|
}
|
|
94
|
-
|
|
95
|
-
});
|
|
117
|
+
if (granted === undefined) setRowWidth(row.clientWidth);
|
|
118
|
+
}, [granted, ready, signature, clusters.length, measureTick]);
|
|
96
119
|
|
|
97
120
|
// The row's width changes on a window resize, a panel drag and a layout mode
|
|
98
|
-
// switch — none of which are `window` events.
|
|
121
|
+
// switch — none of which are `window` events. The same signal re-triggers a
|
|
122
|
+
// measurement that the guard above refused to commit.
|
|
99
123
|
useEffect(() => {
|
|
100
124
|
const row = rowRef.current;
|
|
101
125
|
if (!row || typeof ResizeObserver === 'undefined') return;
|
|
102
|
-
const observer = new ResizeObserver(() =>
|
|
126
|
+
const observer = new ResizeObserver(() => {
|
|
127
|
+
setRowWidth(row.clientWidth);
|
|
128
|
+
setMeasureTick((tick) => tick + 1);
|
|
129
|
+
});
|
|
103
130
|
observer.observe(row);
|
|
104
131
|
return () => observer.disconnect();
|
|
105
132
|
}, []);
|
|
106
133
|
|
|
107
134
|
const hiddenActions = clusters.filter((_, index) => !visible[index]).flatMap((cluster) => cluster.actions);
|
|
108
135
|
|
|
109
|
-
// `flex-1 min-w-0` is what makes `available` mean anything
|
|
110
|
-
// is content-sized (`ml-auto`
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
// viewport, so Unified/Split/Full
|
|
116
|
-
//
|
|
117
|
-
// minimum and the row refuses to
|
|
136
|
+
// SELF-MEASURED (`flex-1 min-w-0`) is what makes `available` mean anything
|
|
137
|
+
// when nothing grants a width. Without it the row is content-sized (`ml-auto`
|
|
138
|
+
// in a `justify-between` parent), so its width IS the sum of the clusters it
|
|
139
|
+
// currently shows — hiding one shrinks the row, which shrinks `available`,
|
|
140
|
+
// which hides another, and the row settles at a fraction of the space it was
|
|
141
|
+
// given and never grows back when the panel is widened. Measured: a 373px
|
|
142
|
+
// diff panel reported a 204px row at every viewport, so Unified/Split/Full
|
|
143
|
+
// Code lived in `⋯` on a wide screen. `min-w-0` is required with it, or the
|
|
144
|
+
// `flex-shrink-0` clusters set a content-based minimum and the row refuses to
|
|
145
|
+
// be narrower than all of them.
|
|
146
|
+
//
|
|
147
|
+
// GRANTED (`flex-none` + `max-width`) is the other case: the parent already
|
|
148
|
+
// did the split — a bar with an address field beside the row — so the row is
|
|
149
|
+
// content-sized but clamped to its budget, and the field takes the rest. Left
|
|
150
|
+
// as `flex-1` it would claim all the free space and squeeze the field.
|
|
118
151
|
return (
|
|
119
|
-
<div
|
|
152
|
+
<div
|
|
153
|
+
ref={rowRef}
|
|
154
|
+
style={granted === undefined ? undefined : { maxWidth: `${granted}px` }}
|
|
155
|
+
className={`flex ${granted === undefined ? 'flex-1' : 'flex-none'} min-w-0 flex-nowrap items-center justify-end gap-x-1 overflow-hidden ${className}`}
|
|
156
|
+
>
|
|
120
157
|
{clusters.map((cluster, index) =>
|
|
121
158
|
visible[index] ? (
|
|
122
159
|
<div key={cluster.id} data-toolbar-cluster="" className="flex items-center flex-shrink-0">
|
|
@@ -45,7 +45,6 @@ import { UpdatePopup } from '@/client/components/layout/update-popup';
|
|
|
45
45
|
import { SettingsModal } from '@/client/components/settings/LazyModal';
|
|
46
46
|
import { SessionSidebarFooter } from '@/client/components/layout/session-sidebar/Footer';
|
|
47
47
|
import { SessionSidebarHeader } from '@/client/components/layout/session-sidebar/Header';
|
|
48
|
-
import { ToastStack } from '@/client/components/common/ToastStack';
|
|
49
48
|
import { useShellOffer } from '@/client/hooks/ui/updates/shell-download';
|
|
50
49
|
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
51
50
|
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
@@ -94,7 +93,7 @@ export function LeftColumn({
|
|
|
94
93
|
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
95
94
|
const [infoOpen, setInfoOpen] = useState(false);
|
|
96
95
|
const updates = useUpdates();
|
|
97
|
-
const {
|
|
96
|
+
const { pushToast } = useToasts();
|
|
98
97
|
const shellDownload = useShellOffer();
|
|
99
98
|
|
|
100
99
|
// The update popup's "Update now" hands the run to the About modal, which owns
|
|
@@ -163,7 +162,6 @@ export function LeftColumn({
|
|
|
163
162
|
<SettingsModal isOpen={settingsOpen} onClose={() => setSettingsOpen(false)} appSettings={appSettings} />
|
|
164
163
|
<AboutModal isOpen={infoOpen} onClose={() => setInfoOpen(false)} updates={updates} onToast={pushToast} />
|
|
165
164
|
<UpdatePopup updates={updates} />
|
|
166
|
-
<ToastStack toasts={toasts} onDismiss={dismissToast} />
|
|
167
165
|
</>
|
|
168
166
|
);
|
|
169
167
|
}
|
|
@@ -7,6 +7,7 @@ import { useInlineRename } from '@/client/hooks/ui/inline-rename';
|
|
|
7
7
|
import { useSessionRenaming } from '@/client/hooks/workspace/renaming-sessions';
|
|
8
8
|
import type { AgentStreamStatus } from '@/shared/lib/chat/omp/status';
|
|
9
9
|
import { withChord } from '@/client/lib/ui/with-chord';
|
|
10
|
+
import { CONTROL_BOX, CONTROL_CLUSTER_GAP } from '@/client/lib/ui/control-plate';
|
|
10
11
|
import { titlebarPaddingLeft, titlebarPaddingRight } from '@/shared/lib/ui/titlebar';
|
|
11
12
|
import { ServerControl } from '@/client/components/common/server-control';
|
|
12
13
|
import { dragRegionProps, titlebarInsetLeft } from '@/client/lib/desktop/titlebar';
|
|
@@ -76,7 +77,7 @@ export function TopNavbar({
|
|
|
76
77
|
<button
|
|
77
78
|
type="button"
|
|
78
79
|
onClick={onToggleLeftPanel}
|
|
79
|
-
className=
|
|
80
|
+
className={`${CONTROL_BOX.desktop} hover:bg-ink/10 transition-colors text-ink/60 hover:text-ink cursor-pointer flex-shrink-0 titlebar-no-drag`}
|
|
80
81
|
title={withChord('toggleSidebar', 'Expand Sidebar')}
|
|
81
82
|
aria-label={withChord('toggleSidebar', 'Expand Sidebar')}
|
|
82
83
|
>
|
|
@@ -142,7 +143,7 @@ export function TopNavbar({
|
|
|
142
143
|
)}
|
|
143
144
|
</div>
|
|
144
145
|
|
|
145
|
-
<div className=
|
|
146
|
+
<div className={`flex items-center ${CONTROL_CLUSTER_GAP} titlebar-no-drag`}>
|
|
146
147
|
{/* One cluster, one order, shared with the phone's header. Each layout
|
|
147
148
|
passes only what it has; the order is stated in `HeaderControls`. */}
|
|
148
149
|
{/* The shell's server control. It draws nothing in a browser; a shell
|
|
@@ -293,7 +293,13 @@ export function WorkspacePanels(props: WorkspacePanelsProps) {
|
|
|
293
293
|
enabled: panel.liveWhileHidden
|
|
294
294
|
? hasActiveContext
|
|
295
295
|
: hasActiveContext && isActiveView,
|
|
296
|
-
|
|
296
|
+
// On screen means selected AND the column is open. A collapsed
|
|
297
|
+
// right panel keeps every view MOUNTED (that is what preserves a
|
|
298
|
+
// tree's expansion and a terminal's buffer), so `isActiveView`
|
|
299
|
+
// alone would report a view nobody can see as active — and a
|
|
300
|
+
// view that re-reads on activation would never notice the
|
|
301
|
+
// column being reopened.
|
|
302
|
+
active: isActiveView && showRightPanel,
|
|
297
303
|
refreshKey,
|
|
298
304
|
...(activeProjectPath ? { rootPath: activeProjectPath } : {}),
|
|
299
305
|
onRefresh: onRefreshWorkspace,
|
|
@@ -27,7 +27,6 @@ import { useWorkspaceKeybindings } from '@/client/hooks/workspace/keybindings';
|
|
|
27
27
|
import { PluginBootstrap } from '@/client/lib/plugins/bootstrap';
|
|
28
28
|
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
29
29
|
import type { EditorDropResult } from '@/client/hooks/editor/use-editor-drop';
|
|
30
|
-
import { ToastStack } from '@/client/components/common/ToastStack';
|
|
31
30
|
import { SessionDeleteModal } from '@/client/components/common/session-delete-modal';
|
|
32
31
|
import { useNavbarSessionActions } from '@/client/hooks/workspace/navbar-session-actions';
|
|
33
32
|
import { useCopyTabPath } from '@/client/hooks/workspace/copy-tab-path';
|
|
@@ -144,7 +143,7 @@ export function DesktopLayout({ sessionId, onSwitchToMobile, appSettings = {} }:
|
|
|
144
143
|
const streamStatus = useAgentStreamStatus();
|
|
145
144
|
const settings = useSettingsModal();
|
|
146
145
|
|
|
147
|
-
const {
|
|
146
|
+
const { pushToast } = useToasts();
|
|
148
147
|
|
|
149
148
|
/**
|
|
150
149
|
* A refused drop names its reason ("outside every workspace", "not text") —
|
|
@@ -340,7 +339,6 @@ export function DesktopLayout({ sessionId, onSwitchToMobile, appSettings = {} }:
|
|
|
340
339
|
onClose={sessionDelete.cancelDelete}
|
|
341
340
|
onConfirm={() => void sessionDelete.confirmDelete()}
|
|
342
341
|
/>
|
|
343
|
-
<ToastStack toasts={toasts} onDismiss={dismissToast} />
|
|
344
342
|
</div>
|
|
345
343
|
);
|
|
346
344
|
}
|
|
@@ -211,6 +211,7 @@ export function Category({
|
|
|
211
211
|
<SessionItem
|
|
212
212
|
sessionId={session.id}
|
|
213
213
|
title={session.title}
|
|
214
|
+
harness={session.harness}
|
|
214
215
|
isActive={isActive && !isViewingSubagent}
|
|
215
216
|
isArchived={session.is_archived === 1}
|
|
216
217
|
status={sessionStatus[sessionKey]}
|
|
@@ -4,6 +4,7 @@ import { useInlineRename } from '@/client/hooks/ui/inline-rename';
|
|
|
4
4
|
import { useSessionRenaming } from '@/client/hooks/workspace/renaming-sessions';
|
|
5
5
|
import { SessionActionsMenu, useRowMenu } from '@/client/components/common/session-actions-menu';
|
|
6
6
|
import { SelectionCheckbox } from '@/client/components/common/batch-selection/SelectionCheckbox';
|
|
7
|
+
import { HarnessGlyph, HARNESS_GLYPH_SIZE } from '@/client/components/common/harness-glyph';
|
|
7
8
|
import { WorktreeBadge } from '@/client/components/layout/session-sidebar/WorktreeBadge';
|
|
8
9
|
import type { SessionWorktreeInfo } from '@/shared/lib/workspace/worktree/types';
|
|
9
10
|
|
|
@@ -11,6 +12,9 @@ export interface SessionItemProps {
|
|
|
11
12
|
/** The session this row draws; the key its in-flight rename is tracked under. */
|
|
12
13
|
sessionId: string | number;
|
|
13
14
|
title: string;
|
|
15
|
+
/** Harness that ran this session (`omp-rpc`, `claude`, …). Absent draws no
|
|
16
|
+
* badge — see `SessionItemData.harness`. */
|
|
17
|
+
harness?: string;
|
|
14
18
|
isActive?: boolean;
|
|
15
19
|
isArchived?: boolean;
|
|
16
20
|
status?: 'stream' | 'finish' | 'abort';
|
|
@@ -55,6 +59,7 @@ export interface SessionItemProps {
|
|
|
55
59
|
export function SessionItem({
|
|
56
60
|
sessionId,
|
|
57
61
|
title,
|
|
62
|
+
harness,
|
|
58
63
|
isActive = false,
|
|
59
64
|
isArchived = false,
|
|
60
65
|
status,
|
|
@@ -208,6 +213,18 @@ export function SessionItem({
|
|
|
208
213
|
</>
|
|
209
214
|
)}
|
|
210
215
|
|
|
216
|
+
{/* The harness mark sits BETWEEN the leading slot and the name.
|
|
217
|
+
The slot already owns one glyph (run cue / chevron); this is the
|
|
218
|
+
second, and it answers a different question — which agent wrote
|
|
219
|
+
this? — so it leads the title rather than being pushed into it.
|
|
220
|
+
A row with no harness renders nothing, so pre-harness and MOCK rows
|
|
221
|
+
keep their old alignment. */}
|
|
222
|
+
{harness && (
|
|
223
|
+
<span className="mr-1.5 flex shrink-0 items-center">
|
|
224
|
+
<HarnessGlyph harness={harness} size={HARNESS_GLYPH_SIZE.compact} />
|
|
225
|
+
</span>
|
|
226
|
+
)}
|
|
227
|
+
|
|
211
228
|
{/* Session Title - aligned straight with Folder Name */}
|
|
212
229
|
{isEditing ? (
|
|
213
230
|
<input
|
|
@@ -222,7 +239,7 @@ export function SessionItem({
|
|
|
222
239
|
/>
|
|
223
240
|
) : (
|
|
224
241
|
<span className="flex-1 min-w-0 flex flex-col leading-snug">
|
|
225
|
-
<span className="truncate">
|
|
242
|
+
<span className="min-w-0 truncate">
|
|
226
243
|
{title.charAt(0).toUpperCase() + title.slice(1)}
|
|
227
244
|
</span>
|
|
228
245
|
{/* One muted line under the title: the row is a real chat, and this
|
|
@@ -4,7 +4,6 @@ import { NewWorkspaceModal } from '@/client/components/layout/session-sidebar/Mo
|
|
|
4
4
|
import { SchedulerModal } from '@/client/components/layout/session-sidebar/scheduler-modal';
|
|
5
5
|
import { ClassicSidebarView } from '@/client/components/layout/session-sidebar/ClassicView';
|
|
6
6
|
import { ModernSidebarView } from '@/client/components/layout/session-sidebar/modern';
|
|
7
|
-
import { ToastStack } from '@/client/components/common/ToastStack';
|
|
8
7
|
import { spawnCwdForNewSession, triggerSessionPrewarm } from '@/shared/lib/omp/session/prewarm';
|
|
9
8
|
import { useToasts } from '@/client/hooks/ui/toasts';
|
|
10
9
|
import { useSessionSidebarController } from '@/client/hooks/chat/omp/session-sidebar-controller';
|
|
@@ -81,7 +80,7 @@ export function SessionsView({
|
|
|
81
80
|
const [newWorkspaceOpen, setNewWorkspaceOpen] = useState(false);
|
|
82
81
|
const [schedulerOpen, setSchedulerOpen] = useState(false);
|
|
83
82
|
const scheduledCount = useScheduledTaskCount();
|
|
84
|
-
const {
|
|
83
|
+
const { pushToast } = useToasts();
|
|
85
84
|
const cancelWait = useCancelWait(pushToast);
|
|
86
85
|
// Follows a held prompt to its session — in whichever tab or instance sent it.
|
|
87
86
|
useWaitingDispatch({ onNotice: pushToast });
|
|
@@ -277,7 +276,6 @@ export function SessionsView({
|
|
|
277
276
|
onToast={pushToast}
|
|
278
277
|
/>
|
|
279
278
|
|
|
280
|
-
<ToastStack toasts={toasts} onDismiss={dismissToast} />
|
|
281
279
|
</>
|
|
282
280
|
);
|
|
283
281
|
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The About card's one row per harness — state, version and action together.
|
|
8
|
+
*
|
|
9
|
+
* The card used to draw the same fourteen agents TWICE: a status grid, and below
|
|
10
|
+
* it a versions table. That is why it grew to 980px tall, and why a reader asking
|
|
11
|
+
* "is this working, and is it current?" read the same names twice to answer two
|
|
12
|
+
* halves of one question. These cases pin the merge:
|
|
13
|
+
*
|
|
14
|
+
* - one row per harness, carrying BOTH the state and the version;
|
|
15
|
+
* - the action is chosen by what the harness can do — an `npm` update is a
|
|
16
|
+
* button, a self-updating CLI is its own copyable command, a vendor-managed
|
|
17
|
+
* one is the command Kabmo will not run;
|
|
18
|
+
* - an adapter and the CLI under it are TWO number lines, each with its own move;
|
|
19
|
+
* - a row with no version shows a dash, never a fabricated number;
|
|
20
|
+
* - the built-in transport is not a row.
|
|
21
|
+
*
|
|
22
|
+
* The fixtures live in `@/test-support/harness-table.test-util`, so a second spec
|
|
23
|
+
* of the same rows cannot drift into a different wire shape.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
27
|
+
import { render } from 'preact';
|
|
28
|
+
import { act } from 'preact/test-utils';
|
|
29
|
+
|
|
30
|
+
import { harnessCategoryFor } from '@/client/components/layout/session-sidebar/about-modal/HarnessTable';
|
|
31
|
+
import {
|
|
32
|
+
cliPart,
|
|
33
|
+
harnessRows as rows,
|
|
34
|
+
installHarnessTableDom,
|
|
35
|
+
mountHarnessTable as mountTo,
|
|
36
|
+
probed,
|
|
37
|
+
restoreHarnessTableDom,
|
|
38
|
+
summary,
|
|
39
|
+
version,
|
|
40
|
+
} from '@/test-support/harness-table.test-util';
|
|
41
|
+
|
|
42
|
+
let container: HTMLElement;
|
|
43
|
+
|
|
44
|
+
beforeAll(() => {
|
|
45
|
+
installHarnessTableDom();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
beforeEach(() => {
|
|
49
|
+
container = document.createElement('div');
|
|
50
|
+
document.body.appendChild(container);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
afterEach(() => {
|
|
54
|
+
render(null, container);
|
|
55
|
+
container.remove();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
afterAll(() => {
|
|
59
|
+
restoreHarnessTableDom();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** Mount into this file's container. */
|
|
63
|
+
function mount(
|
|
64
|
+
harnesses: Parameters<typeof mountTo>[1],
|
|
65
|
+
versions: Parameters<typeof mountTo>[2],
|
|
66
|
+
onOpen?: Parameters<typeof mountTo>[3],
|
|
67
|
+
onUpdate?: Parameters<typeof mountTo>[4],
|
|
68
|
+
): HTMLElement {
|
|
69
|
+
return mountTo(container, harnesses, versions, onOpen, onUpdate);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
describe('About harness table', () => {
|
|
73
|
+
test('ONE row per harness carries state AND version', () => {
|
|
74
|
+
const el = mount(
|
|
75
|
+
[summary({ probe: probed() })],
|
|
76
|
+
[version({ agent: { version: '0.100.0', latest: '0.101.0', updateAvailable: true } })],
|
|
77
|
+
);
|
|
78
|
+
expect(rows(el)).toHaveLength(1);
|
|
79
|
+
const text = (rows(el)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
80
|
+
expect(text).toContain('claude');
|
|
81
|
+
expect(text).toContain('ready');
|
|
82
|
+
expect(text).toContain('0.100.0');
|
|
83
|
+
// The action is an icon now, so the row's TEXT no longer carries the word —
|
|
84
|
+
// the button is found by its accessible name instead.
|
|
85
|
+
expect(Array.from(rows(el)[0].querySelectorAll('button')).some(
|
|
86
|
+
(b) => b.getAttribute('aria-label')?.startsWith('Update claude'),
|
|
87
|
+
)).toBe(true);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('the agent is drawn once, not in two lists', () => {
|
|
91
|
+
// The defect being fixed: fourteen agents in a grid AND fourteen in a table.
|
|
92
|
+
const el = mount(
|
|
93
|
+
[summary({ probe: probed() })],
|
|
94
|
+
[version({ agent: { version: '0.100.0', latest: '0.101.0', updateAvailable: true } })],
|
|
95
|
+
);
|
|
96
|
+
const occurrences = (el.textContent ?? '').match(/claude/g) ?? [];
|
|
97
|
+
// The name, its aria-label and the title attribute aside, the VISIBLE label
|
|
98
|
+
// must appear exactly once.
|
|
99
|
+
expect(occurrences.length).toBeLessThanOrEqual(3);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
test('the action is an ICON, and only when a newer version exists', () => {
|
|
103
|
+
// A permanent "Update" button claims work that does not exist, and the label
|
|
104
|
+
// is spent on every row. The meaning moves to `aria-label` / `title`, so it is
|
|
105
|
+
// still announced without being drawn.
|
|
106
|
+
const withUpdate = mount(
|
|
107
|
+
[summary()],
|
|
108
|
+
[version({ agent: { version: '1.0.0', latest: '1.0.1', updateAvailable: true }, kind: 'npm' })],
|
|
109
|
+
);
|
|
110
|
+
const action = Array.from(withUpdate.querySelectorAll('button')).find(
|
|
111
|
+
(b) => b.getAttribute('aria-label')?.startsWith('Update claude'),
|
|
112
|
+
);
|
|
113
|
+
expect(action).toBeDefined();
|
|
114
|
+
expect(action?.textContent?.trim()).toBe('');
|
|
115
|
+
expect(action?.getAttribute('aria-label')).toContain('1.0.1');
|
|
116
|
+
|
|
117
|
+
const current = mount([summary()], [version({ agent: { version: '1.0.1', latest: '1.0.1', updateAvailable: false }, kind: 'npm' })]);
|
|
118
|
+
expect(Array.from(current.querySelectorAll('button')).some(
|
|
119
|
+
(b) => b.getAttribute('aria-label')?.startsWith('Update claude'),
|
|
120
|
+
)).toBe(false);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test('a self-updating CLI offers no action at all', () => {
|
|
124
|
+
// Kabmo cannot READ a self-updating CLI's latest version, so it cannot claim
|
|
125
|
+
// there is one to install.
|
|
126
|
+
const el = mount(
|
|
127
|
+
[summary({ id: 'opencode', label: 'opencode' })],
|
|
128
|
+
[version({ id: 'opencode', label: 'opencode', kind: 'self', command: 'opencode upgrade' })],
|
|
129
|
+
);
|
|
130
|
+
expect(el.textContent).not.toContain('opencode upgrade');
|
|
131
|
+
expect(Array.from(el.querySelectorAll('button')).some((b) => /Update/.test(b.getAttribute('aria-label') ?? ''))).toBe(false);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
test('an adapter row leads with the CLI version, and keeps the adapter\'s beside it', () => {
|
|
135
|
+
// `claude --version` is 2.1.318 while the ACP adapter reports 0.101.0. A row
|
|
136
|
+
// showing only the adapter read as "why is my 2.x showing 0.100?".
|
|
137
|
+
const el = mount(
|
|
138
|
+
[summary()],
|
|
139
|
+
[version({
|
|
140
|
+
kind: 'npm',
|
|
141
|
+
agent: { version: '0.101.0', latest: null, updateAvailable: false },
|
|
142
|
+
cli: cliPart('Claude Code', '2.1.318'),
|
|
143
|
+
})],
|
|
144
|
+
);
|
|
145
|
+
const text = (rows(el)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
146
|
+
expect(text).toContain('2.1.318');
|
|
147
|
+
expect(text).toContain('adapter 0.101.0');
|
|
148
|
+
// The arrow's target is the ADAPTER's package, so it must not appear beside
|
|
149
|
+
// the CLI's number: `2.1.318 → 0.101.0` compares two different products.
|
|
150
|
+
expect(text).not.toContain('2.1.318→');
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test('a CLI whose version could not be read does not hide the adapter number', () => {
|
|
154
|
+
// Measured on `zcode` (adapter probed at 0.82.3, no `zcode` runtime on PATH)
|
|
155
|
+
// and `claude` (`claude --version` fails while its adapter answers): the row
|
|
156
|
+
// led with the EMPTY CLI part, so a known number rendered as `—`.
|
|
157
|
+
const el = mount(
|
|
158
|
+
[summary({ id: 'zcode', label: 'zcode' })],
|
|
159
|
+
[version({
|
|
160
|
+
id: 'zcode',
|
|
161
|
+
label: 'zcode',
|
|
162
|
+
agent: { version: '0.82.3', latest: null, updateAvailable: false },
|
|
163
|
+
cli: { name: 'ZCode', version: null, latest: null, updateAvailable: false },
|
|
164
|
+
})],
|
|
165
|
+
);
|
|
166
|
+
const versionCell = rows(el)[0].children[1];
|
|
167
|
+
expect(versionCell.textContent).toContain('0.82.3');
|
|
168
|
+
expect(versionCell.textContent).not.toContain('—');
|
|
169
|
+
// The CLI has no number, so there is nothing to put on a second line.
|
|
170
|
+
expect(versionCell.querySelectorAll(':scope > span')).toHaveLength(1);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
test('the INSTALLED version is shown, with an arrow only when there is a newer one', () => {
|
|
174
|
+
// The reported shape: the row must state what is installed, and the arrow is
|
|
175
|
+
// the claim that there is somewhere to move.
|
|
176
|
+
const moving = mount(
|
|
177
|
+
[summary()],
|
|
178
|
+
[version({ agent: { version: '0.100.0', latest: '0.101.0', updateAvailable: true }, kind: 'npm' })],
|
|
179
|
+
);
|
|
180
|
+
const movingText = (rows(moving)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
181
|
+
expect(movingText).toContain('0.100.0');
|
|
182
|
+
expect(movingText).toContain('→');
|
|
183
|
+
expect(movingText).toContain('0.101.0');
|
|
184
|
+
|
|
185
|
+
const current = mount([summary()], [version({ agent: { version: '0.101.0', latest: '0.101.0', updateAvailable: false }, kind: 'npm' })]);
|
|
186
|
+
const currentText = (rows(current)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
187
|
+
expect(currentText).toContain('0.101.0');
|
|
188
|
+
// No newer version, so no direction to point at.
|
|
189
|
+
expect(currentText).not.toContain('→');
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
test('a row with no version shows a dash, never a number', () => {
|
|
193
|
+
const el = mount([summary()], [version()]);
|
|
194
|
+
const text = (rows(el)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
195
|
+
expect(text).toContain('—');
|
|
196
|
+
expect(text).not.toMatch(/\d+\.\d+\.\d+/);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test('the action icon is a DOWNLOAD, and only the part that is behind grows an arrow', () => {
|
|
200
|
+
// The icon says what the press does. It used to be `ArrowUpRight`, which reads
|
|
201
|
+
// as "open this elsewhere" beside a version.
|
|
202
|
+
const el = mount(
|
|
203
|
+
[summary()],
|
|
204
|
+
[version({
|
|
205
|
+
agent: { version: '0.101.0', latest: '0.102.0', updateAvailable: true },
|
|
206
|
+
cli: cliPart('Claude Code', '2.1.318', '2.1.400'),
|
|
207
|
+
updateAvailable: true,
|
|
208
|
+
})],
|
|
209
|
+
);
|
|
210
|
+
const action = Array.from(el.querySelectorAll('button')).find(
|
|
211
|
+
(b) => b.getAttribute('aria-label')?.startsWith('Update claude'),
|
|
212
|
+
);
|
|
213
|
+
expect(action?.querySelector('svg')).not.toBeNull();
|
|
214
|
+
expect(action?.querySelector('.lucide-download')).not.toBeNull();
|
|
215
|
+
expect(action?.querySelector('.lucide-arrow-up-right')).toBeNull();
|
|
216
|
+
// BOTH parts move, so the accessible name says both — the number alone would
|
|
217
|
+
// hide a second install behind one press.
|
|
218
|
+
expect(action?.getAttribute('aria-label')).toContain('adapter 0.102.0');
|
|
219
|
+
expect(action?.getAttribute('aria-label')).toContain('Claude Code 2.1.400');
|
|
220
|
+
|
|
221
|
+
const row = rows(el)[0];
|
|
222
|
+
const lines = Array.from(row.children[1].querySelectorAll(':scope > span'));
|
|
223
|
+
// The CLI is behind on ITS line, the adapter on its own: an arrow joining
|
|
224
|
+
// `2.1.318` with the adapter's 0.102.0 would compare two products.
|
|
225
|
+
expect(lines[0].textContent ?? '').toContain('2.1.318→2.1.400');
|
|
226
|
+
expect(lines[1].textContent ?? '').toContain('adapter 0.101.0 → 0.102.0');
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
test('a current adapter under a stale CLI offers the action for the CLI alone', () => {
|
|
230
|
+
// The reported gap: the row said "up to date" because the ADAPTER was, while
|
|
231
|
+
// `claude update` still had somewhere to go.
|
|
232
|
+
const el = mount(
|
|
233
|
+
[summary()],
|
|
234
|
+
[version({
|
|
235
|
+
agent: { version: '0.101.0', latest: '0.101.0', updateAvailable: false },
|
|
236
|
+
cli: cliPart('Claude Code', '2.1.318', '2.1.400'),
|
|
237
|
+
updateAvailable: true,
|
|
238
|
+
})],
|
|
239
|
+
);
|
|
240
|
+
const action = Array.from(el.querySelectorAll('button')).find(
|
|
241
|
+
(b) => b.getAttribute('aria-label')?.startsWith('Update claude'),
|
|
242
|
+
);
|
|
243
|
+
expect(action?.getAttribute('aria-label')).toBe('Update claude to Claude Code 2.1.400');
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
test('the built-in transport is not a row and not counted', () => {
|
|
247
|
+
const el = mount(
|
|
248
|
+
[summary({ id: 'omp-rpc', label: 'omp', transport: 'rpc', builtIn: true, probe: probed() }), summary()],
|
|
249
|
+
[version()],
|
|
250
|
+
);
|
|
251
|
+
expect(rows(el)).toHaveLength(1);
|
|
252
|
+
expect(el.textContent).toContain('0/1 ready');
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
test('the name opens that harness, and the footer opens the overview', () => {
|
|
256
|
+
const opened: string[] = [];
|
|
257
|
+
const el = mount([summary()], [version()], (id) => opened.push(id));
|
|
258
|
+
const nameButton = Array.from(el.querySelectorAll('button')).find((b) => b.textContent?.includes('claude'));
|
|
259
|
+
act(() => nameButton?.click());
|
|
260
|
+
const footer = Array.from(el.querySelectorAll('button')).find((b) => b.textContent?.includes('Open Settings'));
|
|
261
|
+
act(() => footer?.click());
|
|
262
|
+
expect(opened).toEqual(['claude', '']);
|
|
263
|
+
expect(harnessCategoryFor('claude')).toBe('harness:claude');
|
|
264
|
+
expect(harnessCategoryFor('')).toBe('harness-index');
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
test('a harness that is NOT installed offers no action at all', () => {
|
|
268
|
+
// Measured: an Update button appeared for agents that were never installed,
|
|
269
|
+
// and pressing it could only produce a `not found` from npm.
|
|
270
|
+
const el = mount(
|
|
271
|
+
[summary({ id: 'cursor', label: 'cursor', canLaunch: false, unavailable: '`cursor-agent` is not installed' })],
|
|
272
|
+
[version({ id: 'cursor', label: 'cursor', installed: false, kind: null })],
|
|
273
|
+
);
|
|
274
|
+
const text = (rows(el)[0].textContent ?? '').replace(/\s+/g, ' ');
|
|
275
|
+
expect(text).toContain('not installed');
|
|
276
|
+
expect(Array.from(el.querySelectorAll('button')).some((b) => b.textContent?.trim() === 'Update')).toBe(false);
|
|
277
|
+
expect(text).not.toContain('cursor-agent update');
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
test('name and version share LINE ONE, state and the adapter share LINE TWO', () => {
|
|
281
|
+
// The rows are two lines tall, and each cell must lay out the same two line
|
|
282
|
+
// boxes or the number drifts off the name it belongs to. Measured before this
|
|
283
|
+
// was pinned: the version sat 7.5px below the name (cells centered
|
|
284
|
+
// independently) and the arrow + newer number each took a flex row of their
|
|
285
|
+
// own, so `0.100.0 → 0.101.0` read as three stacked fragments.
|
|
286
|
+
const el = mount(
|
|
287
|
+
[summary({ probe: probed() })],
|
|
288
|
+
[version({
|
|
289
|
+
kind: 'npm',
|
|
290
|
+
agent: { version: '0.101.0', latest: '0.102.0', updateAvailable: true },
|
|
291
|
+
cli: cliPart('Claude Code', '2.1.318'),
|
|
292
|
+
})],
|
|
293
|
+
);
|
|
294
|
+
const cells = rows(el)[0].children;
|
|
295
|
+
const [nameCell, versionCell] = cells;
|
|
296
|
+
|
|
297
|
+
// The name cell: the glyph, then a column of exactly two line boxes — the
|
|
298
|
+
// label row and the state row.
|
|
299
|
+
const nameColumn = nameCell.lastElementChild!;
|
|
300
|
+
expect(nameColumn.children).toHaveLength(2);
|
|
301
|
+
expect(nameColumn.children[0].textContent).toContain('claude');
|
|
302
|
+
expect(nameColumn.children[1].textContent).toContain('ready');
|
|
303
|
+
|
|
304
|
+
// The version cell: exactly TWO line boxes — the number line and the
|
|
305
|
+
// adapter line. A third child would mean the arrow broke onto its own row.
|
|
306
|
+
const lines = versionCell.querySelectorAll(':scope > span');
|
|
307
|
+
expect(lines).toHaveLength(2);
|
|
308
|
+
|
|
309
|
+
// Line one carries the whole `current → latest` statement.
|
|
310
|
+
const numberLine = lines[0].textContent ?? '';
|
|
311
|
+
expect(numberLine).toContain('2.1.318');
|
|
312
|
+
expect(lines[1].textContent ?? '').toContain('adapter 0.101.0');
|
|
313
|
+
expect(lines[1].textContent ?? '').toContain('0.102.0');
|
|
314
|
+
|
|
315
|
+
// And a row with no adapter keeps ONE line, so the number still owns the
|
|
316
|
+
// first row instead of being pushed down by an empty box.
|
|
317
|
+
const plain = mount([summary()], [version({ agent: { version: '0.100.0', latest: '0.101.0', updateAvailable: true } })]);
|
|
318
|
+
const plainLines = rows(plain)[0].children[1].querySelectorAll(':scope > span');
|
|
319
|
+
expect(plainLines).toHaveLength(1);
|
|
320
|
+
expect(plainLines[0].textContent).toContain('0.100.0');
|
|
321
|
+
expect(plainLines[0].textContent).toContain('→');
|
|
322
|
+
expect(plainLines[0].textContent).toContain('0.101.0');
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
test('the header says how many could move', () => {
|
|
326
|
+
const el = mount(
|
|
327
|
+
[summary({ id: 'a', label: 'a' }), summary({ id: 'b', label: 'b' })],
|
|
328
|
+
[version({ agent: { version: '1.0.0', latest: '2.0.0', updateAvailable: true }, id: 'a' }), version({ id: 'b' })],
|
|
329
|
+
);
|
|
330
|
+
expect(el.textContent).toContain('1 update');
|
|
331
|
+
});
|
|
332
|
+
});
|