@kabmo-labs/kabmo 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +523 -441
- package/dist/client/static/js/{index-rerjq5th.js → index-fcee4c13.js} +828 -818
- package/dist/client/static/js/index-sxdw908m.css +1 -0
- package/marketplace/plugins/command-runner/package.json +3 -2
- package/marketplace/plugins/git-forge/package.json +3 -2
- package/marketplace/plugins/session-info/package.json +3 -2
- package/marketplace/plugins/stats/package.json +3 -2
- package/package.json +3 -1
- package/src/client/components/auth/login-screen/index.tsx +2 -1
- package/src/client/components/common/ComposerPicker.tsx +1 -1
- package/src/client/components/common/FolderPicker.tsx +2 -2
- package/src/client/components/common/MarkdownRenderer.tsx +136 -89
- package/src/client/components/common/Modal.tsx +2 -2
- package/src/client/components/common/PWAInstallButton.tsx +2 -2
- package/src/client/components/common/ViewportSelector.tsx +1 -1
- package/src/client/components/common/anchored-menu/index.test.tsx +141 -0
- package/src/client/components/common/anchored-menu/index.tsx +147 -0
- package/src/client/components/common/batch-selection/SelectionCheckbox.tsx +2 -1
- package/src/client/components/common/brand-wordmark/index.test.tsx +13 -2
- package/src/client/components/common/brand-wordmark/index.tsx +13 -2
- package/src/client/components/common/checkbox/style.test.ts +139 -0
- package/src/client/components/common/checkbox/style.ts +51 -0
- package/src/client/components/common/context-usage-button/index.tsx +2 -2
- package/src/client/components/common/file-icon/index.tsx +23 -9
- package/src/client/components/common/header-controls/MoreMenu.tsx +1 -1
- package/src/client/components/common/markdown-review/ReviewPopover.tsx +144 -0
- package/src/client/components/common/markdown-review/ReviewSummary.tsx +108 -0
- package/src/client/components/common/markdown-review/index.tsx +129 -0
- package/src/client/components/common/panel-mark/index.tsx +97 -0
- package/src/client/components/common/provider-icon/glyphs.test.ts +1 -1
- package/src/client/components/common/provider-icon/index.test.ts +14 -0
- package/src/client/components/common/provider-icon/index.tsx +4 -0
- package/src/client/components/common/provider-icon/resolve.test.ts +8 -7
- package/src/client/components/common/provider-icon/resolve.ts +16 -3
- package/src/client/components/common/server-control/Panel.tsx +33 -23
- package/src/client/components/common/server-control/index.test.tsx +11 -5
- package/src/client/components/common/server-control/index.tsx +10 -8
- package/src/client/components/common/session-actions-menu/index.tsx +1 -1
- package/src/client/components/common/toolbar-row/index.tsx +1 -1
- package/src/client/components/layout/ActivityBar.tsx +22 -3
- package/src/client/components/layout/LeftDock.tsx +9 -2
- package/src/client/components/layout/PanelVisibilityMenu.tsx +1 -1
- package/src/client/components/layout/WindowAura.tsx +27 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +1 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +2 -2
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +11 -2
- package/src/client/components/layout/desktop-layout/index.tsx +3 -1
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +44 -23
- package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +36 -17
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -7
- package/src/client/components/layout/session-sidebar/Header.tsx +1 -1
- package/src/client/components/layout/session-sidebar/OverflowMenu.tsx +1 -1
- package/src/client/components/layout/session-sidebar/Toolbar.tsx +1 -1
- package/src/client/components/layout/session-sidebar/about-modal/NotesDialog.tsx +94 -0
- package/src/client/components/layout/session-sidebar/about-modal/VersionLine.test.tsx +68 -0
- package/src/client/components/layout/session-sidebar/about-modal/VersionLine.tsx +36 -0
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +57 -34
- package/src/client/components/layout/session-sidebar/modern/ActionRow.tsx +1 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +40 -14
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +7 -6
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +1 -1
- package/src/client/components/layout/session-sidebar/new-workspace-modal/index.tsx +2 -2
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +2 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +2 -2
- package/src/client/components/layout/update-popup/ReleaseNotes.tsx +8 -3
- package/src/client/components/layout/update-popup/index.tsx +5 -1
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/mobile-main-view/Header.tsx +2 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +13 -15
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +23 -1
- package/src/client/components/mobile/mobile-right-sidebar/MissingFileBanner.tsx +30 -0
- package/src/client/components/mobile/mobile-right-sidebar/PreviewScroller.tsx +18 -2
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +22 -67
- package/src/client/components/mobile/mobile-session-sidebar/ItemMenu.tsx +110 -0
- package/src/client/components/mobile/mobile-session-sidebar/Toolbar.tsx +1 -1
- package/src/client/components/mobile/panel-chips.tsx +10 -2
- package/src/client/components/settings/Modal.tsx +4 -4
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +2 -2
- package/src/client/components/settings/SettingsSidebarList.tsx +20 -0
- package/src/client/components/settings/apply-side-effects.test.ts +30 -0
- package/src/client/components/settings/apply-side-effects.ts +14 -0
- package/src/client/components/settings/categories/AgentSettings.tsx +23 -50
- package/src/client/components/settings/categories/AppearanceSettings.tsx +6 -0
- package/src/client/components/settings/categories/CommandSettings.tsx +2 -2
- package/src/client/components/settings/categories/McpSettings.tsx +4 -21
- package/src/client/components/settings/categories/OmpSettings.tsx +147 -194
- package/src/client/components/settings/categories/SkillSettings.tsx +2 -2
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +211 -229
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +229 -237
- package/src/client/components/settings/categories/agent-settings/ModelPicker.tsx +71 -0
- package/src/client/components/settings/categories/agent-settings/SidebarList.tsx +9 -2
- package/src/client/components/settings/categories/agent-settings/levels.ts +38 -0
- package/src/client/components/settings/categories/appearance-settings/EditorBlameSection.tsx +2 -1
- package/src/client/components/settings/categories/appearance-settings/EditorTypingSection.tsx +2 -1
- package/src/client/components/settings/categories/appearance-settings/IconStyleSection.tsx +144 -0
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.test.tsx +120 -0
- package/src/client/components/settings/categories/appearance-settings/SurfaceStyleSection.tsx +180 -0
- package/src/client/components/settings/categories/behavior-settings/Editor.tsx +27 -7
- package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +23 -5
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +75 -33
- package/src/client/components/settings/categories/command-settings/SidebarList.tsx +7 -0
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +93 -77
- package/src/client/components/settings/categories/mcp-settings/EnvVarsSection.tsx +83 -0
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +28 -15
- package/src/client/components/settings/categories/mcp-settings/SidebarList.tsx +20 -0
- package/src/client/components/settings/categories/omp-settings/ConfigTabs.tsx +97 -36
- package/src/client/components/settings/categories/omp-settings/EngineHeader.tsx +151 -0
- package/src/client/components/settings/categories/omp-settings/ExtensionsPanel.tsx +68 -32
- package/src/client/components/settings/categories/omp-settings/OrderedChips.tsx +119 -0
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +14 -7
- package/src/client/components/settings/categories/omp-settings/RoleEditor.tsx +15 -6
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +165 -226
- package/src/client/components/settings/categories/omp-settings/types.ts +28 -0
- package/src/client/components/settings/categories/panel-plugins/AvailableList.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/BuiltinList.tsx +21 -3
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +1 -1
- package/src/client/components/settings/categories/panel-plugins/PluginMark.test.ts +51 -2
- package/src/client/components/settings/categories/panel-plugins/PluginMark.tsx +43 -10
- package/src/client/components/settings/categories/plugin-settings/DetailPane.tsx +2 -1
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +2 -1
- package/src/client/components/settings/categories/project-settings/ModelDropdown.tsx +1 -1
- package/src/client/components/settings/categories/project-settings/WorktreeSettings.tsx +2 -1
- package/src/client/components/settings/categories/provider-settings/DeleteProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +3 -2
- package/src/client/components/settings/categories/provider-settings/LogoutProviderModal.tsx +2 -2
- package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +3 -2
- package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +37 -8
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +34 -14
- package/src/client/components/settings/categories/skill-settings/SidebarList.tsx +21 -0
- package/src/client/components/settings/categories/skill-settings/pane.test.tsx +15 -6
- package/src/client/components/settings/categories/token-usage-settings/Breakdown.tsx +242 -102
- package/src/client/components/settings/categories/token-usage-settings/Chart.tsx +130 -56
- package/src/client/components/settings/categories/token-usage-settings/Controls.tsx +135 -0
- package/src/client/components/settings/categories/token-usage-settings/MetricsGrid.tsx +55 -33
- package/src/client/components/settings/categories/token-usage-settings/Provenance.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +239 -0
- package/src/client/components/workspace/browser-panel/Screencast.test.ts +1 -0
- package/src/client/components/workspace/browser-panel/Screencast.tsx +17 -22
- package/src/client/components/workspace/browser-panel/TabStrip.test.tsx +158 -0
- package/src/client/components/workspace/browser-panel/TabStrip.tsx +90 -0
- package/src/client/components/workspace/browser-panel/index.tsx +50 -4
- package/src/client/components/workspace/browser-toolbar/index.tsx +41 -1
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +13 -2
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/GoalModal.tsx +4 -3
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/plan-review/index.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +2 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.test.ts +88 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +24 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.test.ts +34 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +5 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +237 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +191 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +1 -1
- package/src/client/components/workspace/context-panel/CostBreakdownPopover.tsx +1 -1
- package/src/client/components/workspace/diff-panel/MergeDiffView.tsx +21 -7
- package/src/client/components/workspace/diff-panel/changes.test.ts +51 -0
- package/src/client/components/workspace/diff-panel/changes.ts +28 -12
- package/src/client/components/workspace/diff-panel/index.tsx +2 -2
- package/src/client/components/workspace/diff-panel/merge.test.ts +28 -0
- package/src/client/components/workspace/diff-panel/merge.ts +21 -1
- package/src/client/components/workspace/editor/Body.tsx +7 -0
- package/src/client/components/workspace/editor/FileDocument.tsx +15 -21
- package/src/client/components/workspace/editor/FilePane.tsx +12 -0
- package/src/client/components/workspace/editor/PluginRail.tsx +1 -1
- package/src/client/components/workspace/editor/PreviewPane.tsx +70 -0
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +2 -2
- package/src/client/components/workspace/editor/TabContextMenu.tsx +1 -1
- package/src/client/components/workspace/editor/Tabs.tsx +1 -1
- package/src/client/components/workspace/editor/Toolbar.tsx +17 -1
- package/src/client/components/workspace/editor/index.tsx +25 -22
- package/src/client/components/workspace/editor/toolbar-clusters.test.ts +14 -0
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +12 -86
- package/src/client/components/workspace/editor/toolbar-toggle.tsx +53 -0
- package/src/client/components/workspace/editor/toolbar-write-clusters.tsx +112 -0
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +1 -1
- package/src/client/components/workspace/file-explorer/Modals.tsx +10 -10
- package/src/client/components/workspace/file-explorer/RootMenu.tsx +1 -1
- package/src/client/components/workspace/git-panel/BranchToolbar.test.tsx +130 -0
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +21 -11
- package/src/client/components/workspace/git-panel/CommitBox.tsx +2 -1
- package/src/client/components/workspace/git-panel/Modals.tsx +2 -2
- package/src/client/components/workspace/git-panel/StashSection.tsx +2 -1
- package/src/client/components/workspace/git-panel/branch-modal/DeleteDialog.tsx +2 -1
- package/src/client/components/workspace/git-panel/branch-modal/RenameDialog.tsx +2 -1
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -2
- package/src/client/components/workspace/git-panel/commit-modal.test.ts +5 -3
- package/src/client/components/workspace/git-panel/index.tsx +7 -0
- package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +7 -0
- package/src/client/components/workspace/plugin-panel/resolve.tsx +4 -0
- package/src/client/components/workspace/search-panel/Body.tsx +1 -1
- package/src/client/components/workspace/usage-panel/ProviderSelect.tsx +1 -1
- package/src/client/components/workspace/user-browser-panel/AddressBar.tsx +5 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.test.tsx +201 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateBar.tsx +112 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateLayer.test.tsx +225 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateLayer.tsx +217 -0
- package/src/client/components/workspace/user-browser-panel/AnnotateTarget.tsx +99 -0
- package/src/client/components/workspace/user-browser-panel/Frame.tsx +30 -1
- package/src/client/components/workspace/user-browser-panel/index.tsx +81 -2
- package/src/client/data/agent-data/builtin.ts +0 -10
- package/src/client/data/agent-data/orchestrator.ts +0 -45
- package/src/client/data/agent-data/specialist.ts +0 -100
- package/src/client/data/mock/token-usage.ts +170 -120
- package/src/client/data/settings/omp-schema.json +33 -1
- package/src/client/glass.css +785 -0
- package/src/client/glass.test.ts +346 -0
- package/src/client/hooks/browser/use-annotate.test.ts +143 -0
- package/src/client/hooks/browser/use-annotate.ts +98 -0
- package/src/client/hooks/browser/use-close-tab.test.ts +148 -0
- package/src/client/hooks/browser/use-close-tab.ts +67 -0
- package/src/client/hooks/browser/use-screencast.ts +13 -1
- package/src/client/hooks/chat/composer/browser-context.test.ts +117 -0
- package/src/client/hooks/chat/composer/browser-context.ts +40 -16
- package/src/client/hooks/chat/composer/items.test.ts +1 -1
- package/src/client/hooks/chat/composer/review-context.ts +38 -0
- package/src/client/hooks/chat/composer/use-draft.test.ts +132 -0
- package/src/client/hooks/chat/composer/use-draft.ts +31 -2
- package/src/client/hooks/chat/timeline/row-window.test.ts +15 -2
- package/src/client/hooks/editor/use-document-annotations.ts +124 -0
- package/src/client/hooks/editor/use-editor-panel-ui.ts +52 -0
- package/src/client/hooks/editor/use-file-review-mode.ts +35 -0
- package/src/client/hooks/editor/use-preview-review.ts +148 -0
- package/src/client/hooks/settings/agents.ts +149 -0
- package/src/client/hooks/settings/crud-list.test.ts +28 -6
- package/src/client/hooks/settings/crud-list.ts +96 -57
- package/src/client/hooks/settings/omp-config.ts +164 -0
- package/src/client/hooks/settings/useTokenUsage.ts +125 -0
- package/src/client/hooks/settings/write-feedback.test.ts +104 -0
- package/src/client/hooks/settings/write-feedback.ts +63 -0
- package/src/client/hooks/ui/glass-support.ts +57 -0
- package/src/client/hooks/ui/icon-style.ts +59 -0
- package/src/client/hooks/ui/markdown-hydration.ts +125 -0
- package/src/client/hooks/ui/stuck-header.test.ts +188 -0
- package/src/client/hooks/ui/stuck-header.ts +91 -0
- package/src/client/hooks/ui/style-attributes.test.ts +120 -0
- package/src/client/hooks/ui/surface-style.ts +56 -0
- package/src/client/hooks/ui/updates/index.test.ts +100 -1
- package/src/client/hooks/ui/updates/index.ts +50 -0
- package/src/client/hooks/ui/updates/notes.test.ts +138 -0
- package/src/client/hooks/ui/updates/notes.ts +57 -0
- package/src/client/hooks/workspace/panel-hues.ts +23 -0
- package/src/client/lib/browser/element-at.test.ts +229 -0
- package/src/client/lib/browser/element-at.ts +139 -0
- package/src/client/lib/review/client.ts +73 -0
- package/src/client/lib/router/search-params.ts +42 -20
- package/src/client/main.tsx +10 -0
- package/src/client/tailwind.css +329 -11
- package/src/server/lib/assets/shell-attributes.server.ts +80 -0
- package/src/server/lib/assets/shell-attributes.test.ts +86 -0
- package/src/server/lib/btw/lifecycle.server.ts +2 -2
- package/src/server/lib/db/schema.ts +7 -0
- package/src/server/lib/db/seed-terminal.test.ts +4 -0
- package/src/server/lib/omp/config/agent-definitions.test.ts +273 -0
- package/src/server/lib/omp/config/agents.ts +231 -61
- package/src/server/lib/omp/config/definitions.test.ts +9 -105
- package/src/server/lib/omp/config/extensions.ts +16 -7
- package/src/server/lib/omp/config/omp-config-files.test.ts +27 -0
- package/src/server/lib/omp/rpc/constants.test.ts +11 -0
- package/src/server/lib/omp/rpc/constants.ts +15 -0
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +1 -0
- package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +2 -30
- package/src/server/lib/omp/rpc/frame-fold.test.ts +55 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
- package/src/server/lib/omp/rpc/manager.ts +2 -2
- package/src/server/lib/omp/rpc/process-helpers.ts +11 -0
- package/src/server/lib/omp/rpc/process.test.ts +106 -0
- package/src/server/lib/omp/rpc/process.ts +39 -18
- package/src/server/lib/omp/rpc/run-settle.server.ts +12 -0
- package/src/server/lib/omp/rpc/run-settle.test.ts +22 -0
- package/src/server/lib/omp/rpc/session-command-guards.ts +5 -0
- package/src/server/lib/omp/rpc/session-commands.test.ts +9 -1
- package/src/server/lib/omp/rpc/session-commands.ts +17 -3
- package/src/server/lib/omp/rpc/terminal-settle.ts +29 -7
- package/src/server/lib/omp/rpc/utility-agent-dir.test.ts +134 -0
- package/src/server/lib/omp/rpc/utility-agent-dir.ts +138 -0
- package/src/server/lib/omp/rpc/utility.ts +12 -0
- package/src/server/lib/panels/bundled-catalog.server.ts +1 -0
- package/src/server/lib/panels/manifest.test.ts +20 -0
- package/src/server/lib/panels/manifest.ts +12 -0
- package/src/server/lib/panels/scan.server.ts +4 -0
- package/src/server/lib/queue/delivery-dispatch.server.test.ts +48 -0
- package/src/server/lib/queue/delivery-harness.ts +8 -4
- package/src/server/lib/queue/delivery.server.test.ts +29 -0
- package/src/server/lib/queue/delivery.server.ts +39 -0
- package/src/server/lib/queue/store.server.test.ts +22 -2
- package/src/server/lib/queue/store.server.ts +33 -11
- package/src/server/lib/review/schema.server.ts +45 -0
- package/src/server/lib/review/store.server.ts +138 -0
- package/src/server/lib/terminal/attach-replay.test.ts +132 -0
- package/src/server/lib/terminal/output.test.ts +166 -0
- package/src/server/lib/terminal/output.ts +104 -0
- package/src/server/lib/terminal/runtime.server.ts +5 -0
- package/src/server/lib/terminal/send-result.test.ts +33 -0
- package/src/server/lib/terminal/send-result.ts +32 -0
- package/src/server/lib/terminal/session.server.ts +45 -11
- package/src/server/lib/terminal/store-liveness.test.ts +4 -0
- package/src/server/lib/updates/active-notes.test.ts +149 -0
- package/src/server/lib/updates/active-notes.ts +75 -0
- package/src/server/lib/updates/changelog-file.ts +42 -11
- package/src/server/lib/updates/changelog.test.ts +15 -1
- package/src/server/lib/updates/omp.ts +42 -15
- package/src/server/lib/updates/release-url.ts +27 -1
- package/src/server/lib/usage/index-parse.test.ts +200 -0
- package/src/server/lib/usage/index-parse.ts +178 -0
- package/src/server/lib/usage/index-query.server.ts +248 -0
- package/src/server/lib/usage/index-scan.server.ts +343 -0
- package/src/server/lib/usage/index-schema.server.ts +82 -0
- package/src/server/lib/usage/index.test.ts +234 -0
- package/src/server/lib/usage/providers.server.ts +4 -53
- package/src/server/plugins/ssr.ts +22 -5
- package/src/server/routes/browser/index.ts +3 -0
- package/src/server/routes/browser/stream.ts +31 -2
- package/src/server/routes/browser/tabs.test.ts +94 -0
- package/src/server/routes/browser/tabs.ts +85 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/review/bindings.ts +11 -0
- package/src/server/routes/review/index.ts +127 -0
- package/src/server/routes/review/routes.test.ts +191 -0
- package/src/server/routes/settings/agents.test.ts +180 -0
- package/src/server/routes/settings/agents.ts +95 -102
- package/src/server/routes/settings/mcp.test.ts +135 -0
- package/src/server/routes/settings/mcp.ts +14 -6
- package/src/server/routes/settings/settings-store-routes.test.ts +6 -113
- package/src/server/routes/telemetry/tokens.test.ts +145 -0
- package/src/server/routes/telemetry/tokens.ts +70 -149
- package/src/server/routes/terminal/ws.ts +6 -5
- package/src/server/routes/updates/index.ts +2 -0
- package/src/server/routes/updates/notes.ts +34 -0
- package/src/server/routes/updates/routes.test.ts +49 -0
- package/src/shared/lib/browser/annotate.test.ts +283 -0
- package/src/shared/lib/browser/annotate.ts +231 -0
- package/src/shared/lib/browser/browser-viewer.test.ts +26 -4
- package/src/shared/lib/browser/frame-gate.test.ts +91 -0
- package/src/shared/lib/browser/frame-gate.ts +69 -0
- package/src/shared/lib/browser/frame-params.test.ts +43 -0
- package/src/shared/lib/browser/frame-params.ts +60 -0
- package/src/shared/lib/browser/frame-pipeline.test.ts +132 -0
- package/src/shared/lib/browser/frame-pipeline.ts +80 -0
- package/src/shared/lib/browser/page-context.ts +60 -4
- package/src/shared/lib/browser/snapshot.test.ts +115 -0
- package/src/shared/lib/browser/snapshot.ts +112 -0
- package/src/shared/lib/browser/tab-close.test.ts +74 -0
- package/src/shared/lib/browser/tab-close.ts +77 -0
- package/src/shared/lib/browser/viewer.ts +45 -26
- package/src/shared/lib/chat/timeline/block-chrome.ts +19 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +17 -4
- package/src/shared/lib/chat/tool/artifact.ts +55 -20
- package/src/shared/lib/chat/tool/bash-facts.ts +96 -0
- package/src/shared/lib/chat/tool/minimized.test.ts +98 -0
- package/src/shared/lib/chat/tool/minimized.ts +64 -0
- package/src/shared/lib/chat/tool/summary.test.ts +28 -8
- package/src/shared/lib/chat/tool/summary.ts +3 -32
- package/src/shared/lib/icons/file-brand-color.ts +38 -0
- package/src/shared/lib/icons/icon-paint-css.test.ts +234 -0
- package/src/shared/lib/icons/icon-paint-css.ts +284 -0
- package/src/shared/lib/icons/icon-paint-panel.ts +100 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +230 -0
- package/src/shared/lib/icons/tint.test.ts +273 -0
- package/src/shared/lib/icons/tint.ts +219 -0
- package/src/shared/lib/markdown/blocks/anchor.ts +63 -0
- package/src/shared/lib/markdown/blocks/blocks.test.ts +141 -0
- package/src/shared/lib/markdown/blocks/renderer.ts +120 -0
- package/src/shared/lib/markdown/blocks/scan.ts +100 -0
- package/src/shared/lib/markdown/blocks/types.ts +62 -0
- package/src/shared/lib/markdown/marked.ts +58 -147
- package/src/shared/lib/markdown/math-extensions.ts +168 -0
- package/src/shared/lib/markdown/review/prompt.ts +77 -0
- package/src/shared/lib/markdown/review/reconcile.ts +55 -0
- package/src/shared/lib/markdown/review/review.test.ts +96 -0
- package/src/shared/lib/markdown/xml-sections.test.ts +140 -0
- package/src/shared/lib/markdown/xml-sections.ts +139 -0
- package/src/shared/lib/models/provider/brand-color.test.ts +116 -0
- package/src/shared/lib/models/provider/brand-color.ts +103 -0
- package/src/shared/lib/models/provider/label.ts +57 -0
- package/src/shared/lib/omp/config/agent-file.test.ts +54 -0
- package/src/shared/lib/omp/config/agent-file.ts +43 -0
- package/src/shared/lib/omp/config/row-value.test.ts +95 -0
- package/src/shared/lib/omp/config/row-value.ts +97 -0
- package/src/shared/lib/omp/config/schema.test.ts +31 -0
- package/src/shared/lib/omp/config/schema.ts +6 -0
- package/src/shared/lib/omp/rpc/frame.test.ts +113 -47
- package/src/shared/lib/omp/rpc/frame.ts +107 -43
- package/src/shared/lib/settings/defaults.ts +4 -0
- package/src/shared/lib/theme/catalog.test.ts +5 -4
- package/src/shared/lib/theme/catalog.ts +18 -3
- package/src/shared/lib/theme/glass-support.test.ts +38 -0
- package/src/shared/lib/theme/glass-support.ts +73 -0
- package/src/shared/lib/theme/icon-style.test.ts +74 -0
- package/src/shared/lib/theme/icon-style.ts +90 -0
- package/src/shared/lib/theme/legibility.ts +91 -0
- package/src/shared/lib/theme/palettes/dark-extended.ts +152 -0
- package/src/shared/lib/theme/palettes/light-extended.ts +157 -0
- package/src/shared/lib/theme/surface-style.test.ts +68 -0
- package/src/shared/lib/theme/surface-style.ts +91 -0
- package/src/shared/lib/theme/theme.test.ts +11 -7
- package/src/shared/lib/ui/menu-anchor.test.ts +69 -0
- package/src/shared/lib/ui/menu-anchor.ts +89 -0
- package/src/shared/lib/usage/breakdown.test.ts +197 -0
- package/src/shared/lib/usage/breakdown.ts +241 -0
- package/src/shared/lib/usage/range.test.ts +204 -0
- package/src/shared/lib/usage/range.ts +240 -0
- package/src/shared/lib/usage/view.test.ts +85 -0
- package/src/shared/lib/usage/view.ts +74 -0
- package/src/shared/lib/workspace/panel-hues.test.ts +68 -0
- package/src/shared/lib/workspace/panel-hues.ts +57 -0
- package/src/shared/types/browser.ts +78 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/panels-registry.ts +6 -0
- package/src/shared/types/panels.ts +14 -0
- package/src/shared/types/settings/agent.ts +28 -6
- package/src/shared/types/settings/state.ts +30 -3
- package/src/shared/types/settings/write.ts +6 -0
- package/src/shared/types/tokenUsage.ts +128 -21
- package/src/shared/types/updates.ts +20 -0
- package/src/test-support/fake-omp-frames.ts +163 -0
- package/dist/client/static/js/index-3ve31rzx.css +0 -1
- package/src/server/lib/omp/session/usage/aggregate-shaping.test.ts +0 -149
- package/src/server/lib/omp/session/usage/aggregate.test.ts +0 -243
- package/src/server/lib/omp/session/usage/aggregate.ts +0 -330
- package/src/server/lib/omp/session/usage/shaping.ts +0 -130
- /package/src/{client/components/common/file-icon/brand-paths.ts → shared/lib/icons/file-brand-paths.ts} +0 -0
|
@@ -35,8 +35,8 @@ interface NewFileModalProps {
|
|
|
35
35
|
export function FileCreateModal({ folderPath, kind, value, error, isLoading, onChange, onCancel, onSubmit }: NewFileModalProps) {
|
|
36
36
|
const label = kind === 'folder' ? 'Folder' : 'File';
|
|
37
37
|
return createPortal(
|
|
38
|
-
<div className="fixed inset-0
|
|
39
|
-
<form onSubmit={onSubmit} className="bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
38
|
+
<div className="fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm">
|
|
39
|
+
<form onSubmit={onSubmit} className="glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
40
40
|
<h3 className="font-semibold text-ink mb-3 text-sm">New {label}</h3>
|
|
41
41
|
<div className="flex items-center gap-1 mb-1 text-xs font-mono text-ink/50 min-w-0">
|
|
42
42
|
<span className="truncate" title={folderPath}>{folderPath || '.'}/</span>
|
|
@@ -92,8 +92,8 @@ interface DeleteModalProps {
|
|
|
92
92
|
|
|
93
93
|
export function FileDeleteModal({ fileName, displayName, isFolder, isLoading, onCancel, onConfirm }: DeleteModalProps) {
|
|
94
94
|
return createPortal(
|
|
95
|
-
<div className="fixed inset-0
|
|
96
|
-
<div className="bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
95
|
+
<div className="fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm">
|
|
96
|
+
<div className="glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
97
97
|
<h3 className="font-semibold text-ink mb-2 text-sm">Delete {isFolder ? 'Folder' : 'File'}</h3>
|
|
98
98
|
<p className="text-xs text-ink/70 mb-4">Are you sure you want to delete <span className="font-mono bg-canvas px-1 rounded">{fileName}</span>? This action cannot be undone.</p>
|
|
99
99
|
{/* A collapsed chain row is LABELLED `com/java/app/package` but its path
|
|
@@ -158,8 +158,8 @@ interface RenameModalProps {
|
|
|
158
158
|
*/
|
|
159
159
|
export function FileRenameModal({ isFolder, renameValue, originalPath, displayName, error, isLoading, onChange, onCancel, onSubmit }: RenameModalProps) {
|
|
160
160
|
return createPortal(
|
|
161
|
-
<div className="fixed inset-0
|
|
162
|
-
<form onSubmit={onSubmit} className="bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
161
|
+
<div className="fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm">
|
|
162
|
+
<form onSubmit={onSubmit} className="glass-overlay bg-paper rounded shadow-xl p-4 w-full max-w-sm border border-ink/10 font-sans">
|
|
163
163
|
<h3 className="font-semibold text-ink mb-3 text-sm">Rename {isFolder ? 'Folder' : 'File'}</h3>
|
|
164
164
|
<input
|
|
165
165
|
autoFocus
|
|
@@ -215,8 +215,8 @@ interface HistoryModalProps {
|
|
|
215
215
|
export function FileHistoryModal({ filePath, fetcherState, fetcherData, onClose }: HistoryModalProps) {
|
|
216
216
|
const rows = fetcherData?.type === 'history' ? fetcherData.data : undefined;
|
|
217
217
|
return createPortal(
|
|
218
|
-
<div className="fixed inset-0
|
|
219
|
-
<div className="bg-paper rounded-lg shadow-xl w-full max-w-4xl border border-ink/10 flex flex-col max-h-[85vh]">
|
|
218
|
+
<div className="fixed inset-0 modal-scrim z-[100] flex items-center justify-center p-4 backdrop-blur-sm">
|
|
219
|
+
<div className="glass-overlay bg-paper rounded-lg shadow-xl w-full max-w-4xl border border-ink/10 flex flex-col max-h-[85vh]">
|
|
220
220
|
<div className="flex items-center justify-between p-4 border-b border-ink/10">
|
|
221
221
|
<h3 className="text-sm font-semibold text-ink flex items-center space-x-2">
|
|
222
222
|
<History size={16} className="text-ink/60" />
|
|
@@ -230,7 +230,7 @@ export function FileHistoryModal({ filePath, fetcherState, fetcherData, onClose
|
|
|
230
230
|
</button>
|
|
231
231
|
</div>
|
|
232
232
|
|
|
233
|
-
<div className="flex-1 scrollbar-overlay-container
|
|
233
|
+
<div className="flex-1 scrollbar-overlay-container p-2">
|
|
234
234
|
{fetcherState === 'idle' ? (
|
|
235
235
|
rows ? (
|
|
236
236
|
rows.length > 0 ? (
|
|
@@ -245,7 +245,7 @@ export function FileHistoryModal({ filePath, fetcherState, fetcherData, onClose
|
|
|
245
245
|
</thead>
|
|
246
246
|
<tbody className="divide-y divide-ink/5">
|
|
247
247
|
{rows.map((row, i) => (
|
|
248
|
-
<tr key={i} className="hover:bg-ink/[0.03] transition-colors group
|
|
248
|
+
<tr key={i} className="hover:bg-ink/[0.03] transition-colors group">
|
|
249
249
|
<td className="px-3 py-2 text-ink">
|
|
250
250
|
{row.message ? <span className="font-medium text-ink/90 group-hover:text-ink">{row.message}</span> : null}
|
|
251
251
|
</td>
|
|
@@ -50,7 +50,7 @@ export function RootContextMenu({ x, y, pasteLabel, busy, onAction, menuRef }: R
|
|
|
50
50
|
>
|
|
51
51
|
<div
|
|
52
52
|
ref={menuRef}
|
|
53
|
-
className="fixed z-50 bg-paper border border-ink/15 shadow-2xl rounded-lg py-1 min-w-[185px] text-xs text-ink font-sans"
|
|
53
|
+
className="glass-popover fixed z-50 bg-paper border border-ink/15 shadow-2xl rounded-lg py-1 min-w-[185px] text-xs text-ink font-sans"
|
|
54
54
|
style={{ top: posY, left: posX }}
|
|
55
55
|
onClick={(e) => e.stopPropagation()}
|
|
56
56
|
>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Sync button's spinner contract.
|
|
8
|
+
*
|
|
9
|
+
* The button carries the ahead/behind counts and a pull+push can run for
|
|
10
|
+
* seconds; a static `RefreshCw` made it look unpressed. `syncing` is derived
|
|
11
|
+
* from the ACTION, not from `isBusy` — `isBusy` also covers the status read and
|
|
12
|
+
* every other mutation, and a commit must not spin this badge.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
16
|
+
import { Window } from 'happy-dom';
|
|
17
|
+
import { h, render } from 'preact';
|
|
18
|
+
import { act } from 'preact/test-utils';
|
|
19
|
+
import { GitBranchToolbar } from '@/client/components/workspace/git-panel/BranchToolbar';
|
|
20
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
21
|
+
|
|
22
|
+
let container: HTMLElement;
|
|
23
|
+
let syncClicks: number;
|
|
24
|
+
|
|
25
|
+
beforeAll(() => {
|
|
26
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
afterEach(() => {
|
|
30
|
+
if (container) {
|
|
31
|
+
render(null, container);
|
|
32
|
+
container.remove();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
afterAll(() => {
|
|
37
|
+
restoreDomGlobals();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
function mount({ syncing = false, isBusy = false }: { syncing?: boolean; isBusy?: boolean } = {}): void {
|
|
41
|
+
syncClicks = 0;
|
|
42
|
+
container = document.createElement('div');
|
|
43
|
+
document.body.appendChild(container);
|
|
44
|
+
act(() => {
|
|
45
|
+
render(
|
|
46
|
+
h(GitBranchToolbar, {
|
|
47
|
+
branchRef: { current: null },
|
|
48
|
+
showBranchMenu: false,
|
|
49
|
+
setShowBranchMenu: () => {},
|
|
50
|
+
branch: 'main',
|
|
51
|
+
branches: ['main'],
|
|
52
|
+
remoteBranches: [],
|
|
53
|
+
onCheckout: () => {},
|
|
54
|
+
onMerge: () => {},
|
|
55
|
+
onOpenBranchPrompt: () => {},
|
|
56
|
+
onManageBranches: () => {},
|
|
57
|
+
optionsRef: { current: null },
|
|
58
|
+
showOptions: false,
|
|
59
|
+
setShowOptions: () => {},
|
|
60
|
+
onHistory: () => {},
|
|
61
|
+
onGraph: () => {},
|
|
62
|
+
viewMode: 'flat',
|
|
63
|
+
setViewMode: () => {},
|
|
64
|
+
isBusy,
|
|
65
|
+
syncCount: { ahead: 2, behind: 1 },
|
|
66
|
+
syncing,
|
|
67
|
+
onSync: () => {
|
|
68
|
+
syncClicks += 1;
|
|
69
|
+
},
|
|
70
|
+
onFetch: () => {},
|
|
71
|
+
}),
|
|
72
|
+
container,
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function syncButton(): HTMLButtonElement {
|
|
78
|
+
const el = container.querySelector('button[aria-label="Sync with upstream"]');
|
|
79
|
+
if (!el) throw new Error('no Sync button rendered');
|
|
80
|
+
return el as HTMLButtonElement;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
describe('GitBranchToolbar Sync spinner', () => {
|
|
84
|
+
test('idle: no rotation, counts still printed', () => {
|
|
85
|
+
mount();
|
|
86
|
+
|
|
87
|
+
const button = syncButton();
|
|
88
|
+
expect(button.querySelector('svg.animate-spin')).toBeNull();
|
|
89
|
+
expect(button.getAttribute('aria-busy')).not.toBe('true');
|
|
90
|
+
expect(button.textContent).toContain('↑2');
|
|
91
|
+
expect(button.textContent).toContain('↓1');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('syncing: the SAME glyph rotates — the icon is not swapped', () => {
|
|
95
|
+
mount();
|
|
96
|
+
const idleGlyph = syncButton().querySelector('svg')?.innerHTML;
|
|
97
|
+
render(null, container);
|
|
98
|
+
container.remove();
|
|
99
|
+
|
|
100
|
+
mount({ syncing: true });
|
|
101
|
+
const spinning = syncButton().querySelector('svg');
|
|
102
|
+
expect(spinning).not.toBeNull();
|
|
103
|
+
expect(spinning!.classList.contains('animate-spin')).toBe(true);
|
|
104
|
+
// Rotating one glyph is the point: a swap would change the paths, and a
|
|
105
|
+
// different mark makes the control look like it changed identity mid-press.
|
|
106
|
+
expect(spinning!.innerHTML).toBe(idleGlyph ?? '');
|
|
107
|
+
expect(syncButton().getAttribute('aria-busy')).toBe('true');
|
|
108
|
+
expect(syncButton().getAttribute('title')).toBe('Syncing with upstream…');
|
|
109
|
+
// The counts stay visible — the spin marks the ACTION, the numbers mark
|
|
110
|
+
// how much work it covers.
|
|
111
|
+
expect(syncButton().textContent).toContain('↑2');
|
|
112
|
+
expect(syncButton().textContent).toContain('↓1');
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test('clicking dispatches onSync', () => {
|
|
116
|
+
mount();
|
|
117
|
+
|
|
118
|
+
act(() => {
|
|
119
|
+
syncButton().click();
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
expect(syncClicks).toBe(1);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test('busy disables the button', () => {
|
|
126
|
+
mount({ isBusy: true, syncing: true });
|
|
127
|
+
|
|
128
|
+
expect(syncButton().disabled).toBe(true);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
@@ -23,6 +23,8 @@ interface GitBranchToolbarProps {
|
|
|
23
23
|
setViewMode: (mode: 'flat' | 'tree') => void;
|
|
24
24
|
isBusy?: boolean;
|
|
25
25
|
syncCount?: { ahead: number; behind: number };
|
|
26
|
+
/** A pull/push (the Sync action) is in flight — the button shows a spinner. */
|
|
27
|
+
syncing?: boolean;
|
|
26
28
|
onSync: () => void;
|
|
27
29
|
/** Refresh the remote-tracking refs without moving the branch. */
|
|
28
30
|
onFetch: () => void;
|
|
@@ -50,6 +52,7 @@ export function GitBranchToolbar({
|
|
|
50
52
|
setViewMode,
|
|
51
53
|
isBusy = false,
|
|
52
54
|
syncCount = { ahead: 0, behind: 0 },
|
|
55
|
+
syncing = false,
|
|
53
56
|
onSync,
|
|
54
57
|
onFetch,
|
|
55
58
|
detached = false,
|
|
@@ -68,7 +71,7 @@ export function GitBranchToolbar({
|
|
|
68
71
|
</button>
|
|
69
72
|
|
|
70
73
|
{showBranchMenu && (
|
|
71
|
-
<div className="absolute top-full left-0 mt-1 w-56 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
|
|
74
|
+
<div className="glass-popover absolute top-full left-0 mt-1 w-56 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
|
|
72
75
|
<div className="max-h-48 scrollbar-overlay-container py-1">
|
|
73
76
|
{branches.length > 0 && (
|
|
74
77
|
<>
|
|
@@ -178,18 +181,25 @@ export function GitBranchToolbar({
|
|
|
178
181
|
onClick={onSync}
|
|
179
182
|
disabled={isBusy}
|
|
180
183
|
title={
|
|
181
|
-
|
|
182
|
-
?
|
|
183
|
-
: syncCount.ahead > 0
|
|
184
|
-
? `
|
|
185
|
-
: syncCount.
|
|
186
|
-
? `
|
|
187
|
-
:
|
|
184
|
+
syncing
|
|
185
|
+
? 'Syncing with upstream…'
|
|
186
|
+
: syncCount.ahead > 0 && syncCount.behind > 0
|
|
187
|
+
? `Pull ${syncCount.behind} then push ${syncCount.ahead} commit(s)`
|
|
188
|
+
: syncCount.ahead > 0
|
|
189
|
+
? `Push ${syncCount.ahead} commit(s)`
|
|
190
|
+
: syncCount.behind > 0
|
|
191
|
+
? `Pull ${syncCount.behind} commit(s)`
|
|
192
|
+
: 'Up to date — sync anyway'
|
|
188
193
|
}
|
|
189
194
|
aria-label="Sync with upstream"
|
|
190
|
-
|
|
195
|
+
aria-busy={syncing}
|
|
196
|
+
className={`flex items-center gap-1 p-1 rounded hover:text-ink hover:bg-ink/5 cursor-pointer transition-colors disabled:cursor-not-allowed ${syncing ? '' : 'disabled:opacity-40'}`}
|
|
191
197
|
>
|
|
192
|
-
|
|
198
|
+
{/* The glyph ROTATES rather than being swapped for a spinner: the
|
|
199
|
+
button keeps one identity (the refresh mark it always had), its
|
|
200
|
+
width cannot shift under the counts, and the spin is the same
|
|
201
|
+
idiom the panel's own Refresh uses (`RepoHeader`). */}
|
|
202
|
+
<RefreshCw size={13} className={syncing ? 'animate-spin' : ''} aria-hidden="true" />
|
|
193
203
|
<span className="font-mono tabular-nums text-[10px]">↑{syncCount.ahead} ↓{syncCount.behind}</span>
|
|
194
204
|
</button>
|
|
195
205
|
|
|
@@ -225,7 +235,7 @@ export function GitBranchToolbar({
|
|
|
225
235
|
</button>
|
|
226
236
|
|
|
227
237
|
{showOptions && (
|
|
228
|
-
<div className="absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs">
|
|
238
|
+
<div className="glass-popover absolute right-0 top-full mt-1 w-36 bg-paper border border-ink/15 rounded-md shadow-lg z-50 py-1 font-mono text-xs">
|
|
229
239
|
<button
|
|
230
240
|
type="button"
|
|
231
241
|
onClick={() => { setViewMode('flat'); setShowOptions(false); }}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
|
|
1
2
|
import { Check } from 'lucide-preact';
|
|
2
3
|
|
|
3
4
|
interface GitCommitBoxProps {
|
|
@@ -79,7 +80,7 @@ export function GitCommitBox({
|
|
|
79
80
|
type="checkbox"
|
|
80
81
|
checked={amend}
|
|
81
82
|
onChange={(e) => onToggleAmend?.(e.currentTarget.checked)}
|
|
82
|
-
className=
|
|
83
|
+
className={`${CHECKBOX_CLASS} accent-ink cursor-pointer`}
|
|
83
84
|
/>
|
|
84
85
|
Amend
|
|
85
86
|
</label>
|
|
@@ -7,13 +7,13 @@ export { GitCommitModal as GitOutputModal } from '@/client/components/workspace/
|
|
|
7
7
|
function ModalShell({ children, onClose }: { children: ReactNode; onClose: () => void }) {
|
|
8
8
|
return (
|
|
9
9
|
<div
|
|
10
|
-
className="fixed inset-0 z-50
|
|
10
|
+
className="fixed inset-0 z-50 modal-scrim flex items-center justify-center p-4"
|
|
11
11
|
onClick={onClose}
|
|
12
12
|
role="dialog"
|
|
13
13
|
aria-modal="true"
|
|
14
14
|
>
|
|
15
15
|
<div
|
|
16
|
-
className="bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]"
|
|
16
|
+
className="glass-overlay bg-paper border border-ink/20 rounded-lg shadow-xl flex flex-col overflow-hidden w-[min(94vw,420px)] max-h-[80vh]"
|
|
17
17
|
onClick={(e) => e.stopPropagation()}
|
|
18
18
|
>
|
|
19
19
|
{children}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
|
|
1
2
|
import { useCallback, useEffect, useId, useState } from 'preact/hooks';
|
|
2
3
|
import { Archive, Download, Plus, Trash2 } from 'lucide-preact';
|
|
3
4
|
import type { GitStashEntry } from '@/shared/types/git';
|
|
@@ -176,7 +177,7 @@ export function GitStashSection({ rootPath, repo, isBusy, onAction }: GitStashSe
|
|
|
176
177
|
type="checkbox"
|
|
177
178
|
checked={untracked}
|
|
178
179
|
onChange={(e) => setUntracked(e.currentTarget.checked)}
|
|
179
|
-
className=
|
|
180
|
+
className={`${CHECKBOX_CLASS} accent-ink cursor-pointer`}
|
|
180
181
|
/>
|
|
181
182
|
-u
|
|
182
183
|
</label>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
|
|
1
2
|
import { AlertTriangle } from 'lucide-preact';
|
|
2
3
|
import { Modal } from '@/client/components/common/Modal';
|
|
3
4
|
import type { GitBranchDetail } from '@/shared/types/git';
|
|
@@ -73,7 +74,7 @@ export function DeleteBranchDialog({
|
|
|
73
74
|
type="checkbox"
|
|
74
75
|
checked={force}
|
|
75
76
|
onChange={(e) => onForceChange(e.currentTarget.checked)}
|
|
76
|
-
className=
|
|
77
|
+
className={`${CHECKBOX_CLASS} accent-error cursor-pointer mt-0.5`}
|
|
77
78
|
/>
|
|
78
79
|
<span className="flex flex-col gap-0.5">
|
|
79
80
|
<span className="text-error font-medium">Delete even if its commits are not merged</span>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CHECKBOX_CLASS } from '@/client/components/common/checkbox/style';
|
|
1
2
|
import { useState } from 'preact/hooks';
|
|
2
3
|
import { Modal } from '@/client/components/common/Modal';
|
|
3
4
|
import type { GitBranchDetail } from '@/shared/types/git';
|
|
@@ -117,7 +118,7 @@ function RenameBranchForm({
|
|
|
117
118
|
type="checkbox"
|
|
118
119
|
checked={remote}
|
|
119
120
|
onChange={(e) => setRemote(e.currentTarget.checked)}
|
|
120
|
-
className=
|
|
121
|
+
className={`${CHECKBOX_CLASS} accent-ink cursor-pointer mt-0.5`}
|
|
121
122
|
/>
|
|
122
123
|
<span className="flex flex-col gap-0.5">
|
|
123
124
|
<span>Also rename it on the remote</span>
|
|
@@ -224,13 +224,13 @@ export function GitCommitModal({
|
|
|
224
224
|
|
|
225
225
|
return (
|
|
226
226
|
<div
|
|
227
|
-
className="fixed inset-0 z-50
|
|
227
|
+
className="fixed inset-0 z-50 modal-scrim backdrop-blur-xs flex items-center justify-center p-0 lg:p-5"
|
|
228
228
|
onClick={onClose}
|
|
229
229
|
role="dialog"
|
|
230
230
|
aria-modal="true"
|
|
231
231
|
>
|
|
232
232
|
<div
|
|
233
|
-
className="bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
|
|
233
|
+
className="glass-overlay bg-paper border-ink/20 shadow-2xl flex flex-col overflow-hidden
|
|
234
234
|
w-full h-full rounded-none border-0
|
|
235
235
|
lg:w-[min(94vw,1200px)] lg:h-[88vh] lg:rounded-xl lg:border
|
|
236
236
|
pt-[env(safe-area-inset-top,0px)] lg:pt-0"
|
|
@@ -81,7 +81,7 @@ afterAll(() => {
|
|
|
81
81
|
* `IntersectionObserver`). Stubbed rather than asserted on: the modal's
|
|
82
82
|
* geometry is not what this test is about.
|
|
83
83
|
*/
|
|
84
|
-
const OBSERVER_STUBS = ['ResizeObserver', 'IntersectionObserver'] as const;
|
|
84
|
+
const OBSERVER_STUBS = ['ResizeObserver', 'IntersectionObserver', 'requestAnimationFrame', 'cancelAnimationFrame'] as const;
|
|
85
85
|
const stubs: Partial<Record<(typeof OBSERVER_STUBS)[number], unknown>> = {};
|
|
86
86
|
|
|
87
87
|
beforeAll(() => {
|
|
@@ -97,12 +97,14 @@ beforeAll(() => {
|
|
|
97
97
|
|
|
98
98
|
afterAll(() => {
|
|
99
99
|
const target = globalThis as unknown as Record<string, unknown>;
|
|
100
|
+
// Restored through the same loop as the observers, never deleted: a deleted
|
|
101
|
+
// `requestAnimationFrame` is what breaks the NEXT suite, which renders Preact
|
|
102
|
+
// hooks that schedule through it and dies with `ReferenceError:
|
|
103
|
+
// requestAnimationFrame is not defined` — in a file that names none of this.
|
|
100
104
|
for (const key of OBSERVER_STUBS) {
|
|
101
105
|
if (stubs[key] === undefined) delete target[key];
|
|
102
106
|
else target[key] = stubs[key];
|
|
103
107
|
}
|
|
104
|
-
delete target.requestAnimationFrame;
|
|
105
|
-
delete target.cancelAnimationFrame;
|
|
106
108
|
});
|
|
107
109
|
|
|
108
110
|
/** Mount with an HTTP POST that answers a history page. */
|
|
@@ -141,6 +141,12 @@ export function GitPanel({ className = '', enabled = true, rootPath, refreshKey
|
|
|
141
141
|
// controls; a topic PUSH must not, or a background tool call would lock the
|
|
142
142
|
// commit box for a beat.
|
|
143
143
|
const isBusy = isReading || actionFetcher.state !== 'idle';
|
|
144
|
+
// The Sync button's own spinner. `isBusy` covers every action plus the status
|
|
145
|
+
// read, but only a pull/push is "syncing" — a commit or a stage must not spin
|
|
146
|
+
// the badge. `lastAction` is recorded by `execute` before the submit, so the
|
|
147
|
+
// first render after the fetch starts already names the right action.
|
|
148
|
+
const runningAction = actionFetcher.state === 'idle' ? null : actionFetcher.lastAction?.actionType ?? null;
|
|
149
|
+
const isSyncing = runningAction === 'sync' || runningAction === 'push' || runningAction === 'pull';
|
|
144
150
|
|
|
145
151
|
// Unmerged pairs are excluded for the same reason `GitChangesList` excludes
|
|
146
152
|
// them: their two letters are the two SIDES of a conflict, so the column test
|
|
@@ -264,6 +270,7 @@ export function GitPanel({ className = '', enabled = true, rootPath, refreshKey
|
|
|
264
270
|
setViewMode={setViewMode}
|
|
265
271
|
isBusy={isBusy}
|
|
266
272
|
syncCount={syncCount}
|
|
273
|
+
syncing={isSyncing}
|
|
267
274
|
onSync={() => executeAction('sync')}
|
|
268
275
|
onFetch={() => executeAction('fetch')}
|
|
269
276
|
detached={data?.state?.detached ?? false}
|
|
@@ -86,7 +86,7 @@ export function ModelDropdownPanel({
|
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
88
|
<div className="absolute bottom-full left-0 mb-2.5 z-50 flex items-start">
|
|
89
|
-
<div ref={panelRef} className="w-84 sm:w-96 bg-paper border border-ink/20 rounded-xl shadow-2xl flex flex-col overflow-hidden text-xs max-h-[460px] animate-in fade-in zoom-in-95 duration-100">
|
|
89
|
+
<div ref={panelRef} className="glass-popover w-84 sm:w-96 bg-paper border border-ink/20 rounded-xl shadow-2xl flex flex-col overflow-hidden text-xs max-h-[460px] animate-in fade-in zoom-in-95 duration-100">
|
|
90
90
|
<ModelDropdownHeader
|
|
91
91
|
search={search}
|
|
92
92
|
onSearchChange={onSearchChange}
|
|
@@ -114,7 +114,7 @@ export function ModelSpecsTooltip({ model }: ModelSpecsTooltipProps) {
|
|
|
114
114
|
// `pointer-events-none`: the card sits beside the list, so a card that
|
|
115
115
|
// captured the pointer would take the hover off the row it describes and
|
|
116
116
|
// flicker as the reader moved toward it.
|
|
117
|
-
className="w-72 bg-paper/95 backdrop-blur-sm border border-ink/20 rounded-xl shadow-2xl p-3.5 text-xs text-ink select-none pointer-events-none animate-in fade-in zoom-in-95 duration-100"
|
|
117
|
+
className="glass-popover w-72 bg-paper/95 backdrop-blur-sm border border-ink/20 rounded-xl shadow-2xl p-3.5 text-xs text-ink select-none pointer-events-none animate-in fade-in zoom-in-95 duration-100"
|
|
118
118
|
>
|
|
119
119
|
{facts.length > 0 && (
|
|
120
120
|
<dl className={GRID}>
|
|
@@ -66,6 +66,12 @@ export interface ResolvedPanel {
|
|
|
66
66
|
icon?: ReactNode;
|
|
67
67
|
/** A plugin's icon URL, when its manifest declares one. */
|
|
68
68
|
iconUrl?: string;
|
|
69
|
+
/**
|
|
70
|
+
* The colour a plugin's mark is drawn in, when its manifest declares one.
|
|
71
|
+
* A built-in view never carries this: its mark is a glyph, and the palette
|
|
72
|
+
* decides its colour.
|
|
73
|
+
*/
|
|
74
|
+
color?: string;
|
|
69
75
|
/** The plugin's display name; empty for a built-in view. */
|
|
70
76
|
name: string;
|
|
71
77
|
builtin: boolean;
|
|
@@ -178,6 +184,7 @@ export function usePanelCatalog(side: PanelCatalogSide = 'right'): ResolvedPanel
|
|
|
178
184
|
defaultWidth: widths.px,
|
|
179
185
|
defaultFraction: widths.fraction,
|
|
180
186
|
...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
|
|
187
|
+
...(panel.color ? { color: panel.color } : {}),
|
|
181
188
|
// Wrapped so the kit's participant hooks resolve THIS plugin's id while
|
|
182
189
|
// its panel renders — the scope is what `useRpc`/`useRealtime` read.
|
|
183
190
|
// The boundary is the other half: a plugin component that throws must
|
|
@@ -19,6 +19,8 @@ export interface ResolvedPluginPanel {
|
|
|
19
19
|
title: string;
|
|
20
20
|
Component: ComponentType<RightPanelProps>;
|
|
21
21
|
iconUrl?: string;
|
|
22
|
+
/** The mark colour the plugin's manifest declares, when it declares one. */
|
|
23
|
+
color?: string;
|
|
22
24
|
/** Sizing the bundle declared, passed through to the width resolver. */
|
|
23
25
|
minWidth?: number;
|
|
24
26
|
defaultFraction?: number;
|
|
@@ -61,6 +63,7 @@ export function usePluginPanels(activePanel: string): PluginPanels {
|
|
|
61
63
|
title: entry?.titles.rightPanel ?? panel.name,
|
|
62
64
|
Component,
|
|
63
65
|
...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
|
|
66
|
+
...(panel.color ? { color: panel.color } : {}),
|
|
64
67
|
...(size?.minWidth !== undefined ? { minWidth: size.minWidth } : {}),
|
|
65
68
|
...(size?.defaultFraction !== undefined ? { defaultFraction: size.defaultFraction } : {}),
|
|
66
69
|
});
|
|
@@ -135,6 +138,7 @@ export function usePanelSlotPlugins(): ResolvedPluginPanel[] {
|
|
|
135
138
|
title: entry?.titles.panel ?? panel.name,
|
|
136
139
|
Component: Component as ResolvedPluginPanel['Component'],
|
|
137
140
|
...(panel.iconUrl ? { iconUrl: panel.iconUrl } : {}),
|
|
141
|
+
...(panel.color ? { color: panel.color } : {}),
|
|
138
142
|
...(size?.minWidth !== undefined ? { minWidth: size.minWidth } : {}),
|
|
139
143
|
...(size?.defaultFraction !== undefined ? { defaultFraction: size.defaultFraction } : {}),
|
|
140
144
|
});
|
|
@@ -160,7 +160,7 @@ export function SearchPanelBody({
|
|
|
160
160
|
</button>
|
|
161
161
|
|
|
162
162
|
{showMenu && (
|
|
163
|
-
<div className="absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1">
|
|
163
|
+
<div className="glass-popover absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1">
|
|
164
164
|
<button
|
|
165
165
|
onClick={() => {
|
|
166
166
|
setShowIncludeField(!showIncludeField);
|
|
@@ -144,7 +144,7 @@ export function ProviderSelect({ providers, value, onChange }: ProviderSelectPro
|
|
|
144
144
|
</button>
|
|
145
145
|
|
|
146
146
|
{open && (
|
|
147
|
-
<div className="absolute top-full left-0 mt-1 w-52 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
|
|
147
|
+
<div className="glass-popover absolute top-full left-0 mt-1 w-52 bg-paper border border-ink/20 rounded-md shadow-lg z-50 flex flex-col overflow-hidden text-xs">
|
|
148
148
|
<div className="px-2 py-1.5 border-b border-ink/10 flex items-center gap-1.5">
|
|
149
149
|
<Search size={11} className="text-ink/40 flex-shrink-0" />
|
|
150
150
|
<input
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'preact/hooks';
|
|
2
2
|
import { ArrowLeft, ArrowRight, Globe, RefreshCw } from 'lucide-preact';
|
|
3
3
|
import { BrowserToolbar } from '@/client/components/workspace/browser-toolbar/index';
|
|
4
|
+
import type { BrowserToolbarAnnotate } from '@/client/components/workspace/browser-toolbar/index';
|
|
4
5
|
import type { ViewportMode } from '@/shared/types';
|
|
5
6
|
|
|
6
7
|
interface UserBrowserAddressBarProps {
|
|
@@ -24,6 +25,8 @@ interface UserBrowserAddressBarProps {
|
|
|
24
25
|
onZoomOut: () => void;
|
|
25
26
|
onResetZoom: () => void;
|
|
26
27
|
onSetZoom: (zoom: number) => void;
|
|
28
|
+
/** Annotation toggle — this panel is the only one that offers it. */
|
|
29
|
+
annotate?: BrowserToolbarAnnotate;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
type UserBrowserPhase = 'idle' | 'loading' | 'ready';
|
|
@@ -59,6 +62,7 @@ export function UserBrowserAddressBar({
|
|
|
59
62
|
onZoomOut,
|
|
60
63
|
onResetZoom,
|
|
61
64
|
onSetZoom,
|
|
65
|
+
annotate,
|
|
62
66
|
}: UserBrowserAddressBarProps) {
|
|
63
67
|
const followedRef = useRef<string | undefined>(undefined);
|
|
64
68
|
|
|
@@ -99,6 +103,7 @@ export function UserBrowserAddressBar({
|
|
|
99
103
|
onZoomOut={onZoomOut}
|
|
100
104
|
onResetZoom={onResetZoom}
|
|
101
105
|
onSetZoom={onSetZoom}
|
|
106
|
+
annotate={annotate}
|
|
102
107
|
onIncludeInChat={onIncludeInChat}
|
|
103
108
|
onOpenExternal={onOpenExternal}
|
|
104
109
|
openExternalLabel="Buka di tab baru"
|