@kabmo-labs/kabmo 0.27.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bunfig.toml +6 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.js +530 -493
- package/dist/client/static/js/{index-e3qh2yps.js → index-43z47ngg.js} +1178 -1034
- package/dist/client/static/js/index-naa91727.css +1 -0
- package/dist/client/static/{manifest-q6h8k9e0.webmanifest → manifest-vdvdqpre.webmanifest} +1 -0
- package/marketplace/plugins/command-runner/package.json +3 -17
- package/marketplace/plugins/command-runner/settings-schema.json +14 -0
- package/marketplace/plugins/git-forge/README.md +17 -7
- package/marketplace/plugins/git-forge/package.json +4 -30
- package/marketplace/plugins/git-forge/panel.css +16 -0
- package/marketplace/plugins/git-forge/settings-schema.json +27 -0
- package/marketplace/plugins/git-forge/src/panel/Badge.tsx +35 -22
- package/marketplace/plugins/git-forge/src/panel/Change.tsx +20 -24
- package/marketplace/plugins/git-forge/src/panel/CiBadge.tsx +16 -7
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +31 -26
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +18 -2
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +160 -96
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +60 -44
- package/marketplace/plugins/git-forge/src/panel/List.tsx +150 -22
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +11 -5
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +17 -15
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +84 -61
- package/marketplace/plugins/git-forge/src/panel/format.test.ts +99 -0
- package/marketplace/plugins/git-forge/src/panel/format.ts +59 -16
- package/marketplace/plugins/git-forge/src/panel/index.test.tsx +109 -5
- package/marketplace/plugins/git-forge/src/panel/index.tsx +37 -4
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +17 -0
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +31 -0
- package/marketplace/plugins/session-info/package.json +2 -10
- package/marketplace/plugins/session-info/settings-schema.json +8 -0
- package/marketplace/plugins/stats/README.md +17 -5
- package/marketplace/plugins/stats/package.json +3 -23
- package/marketplace/plugins/stats/settings-schema.json +20 -0
- package/marketplace/plugins/stats/src/app.tsx +1 -1
- package/marketplace/plugins/stats/src/groups.test.ts +46 -1
- package/marketplace/plugins/stats/src/groups.ts +22 -11
- package/marketplace/plugins/stats/src/harness-leases.test.ts +84 -0
- package/marketplace/plugins/stats/src/harness-leases.ts +132 -0
- package/marketplace/plugins/stats/src/labels.test.ts +54 -1
- package/marketplace/plugins/stats/src/labels.ts +33 -7
- package/marketplace/plugins/stats/src/sampler.test.ts +61 -0
- package/marketplace/plugins/stats/src/sampler.ts +39 -5
- package/marketplace/plugins/stats/src/snapshot.ts +6 -0
- package/package.json +4 -3
- package/public/manifest.webmanifest +1 -0
- package/src/client/components/common/ComposerTextarea.test.tsx +109 -0
- package/src/client/components/common/ComposerTextarea.tsx +6 -0
- package/src/client/components/common/ReloadPageButton.test.tsx +14 -0
- package/src/client/components/common/ReloadPageButton.tsx +11 -2
- package/src/client/components/common/diagram-viewer/read-block.test.ts +71 -0
- package/src/client/components/common/diagram-viewer/read-block.ts +40 -16
- package/src/client/components/common/file-icon/index.tsx +7 -1
- package/src/client/components/common/harness-glyph/brands.ts +7 -1
- package/src/client/components/common/harness-glyph/index.tsx +18 -1
- package/src/client/components/common/image-viewer/index.tsx +37 -165
- package/src/client/components/common/picker-search/index.tsx +70 -0
- package/src/client/components/common/search-select/index.tsx +2 -7
- package/src/client/components/common/session-actions-menu/index.test.tsx +106 -0
- package/src/client/components/common/session-actions-menu/index.tsx +43 -1
- package/src/client/components/common/session-row/TrailingSlot.tsx +9 -4
- package/src/client/components/common/session-row/index.tsx +4 -0
- package/src/client/components/common/session-row/session-row.test.tsx +6 -0
- package/src/client/components/common/zoom-pan-stage/index.tsx +258 -0
- package/src/client/components/common/zoom-pan-stage/zoom-pan-stage.test.tsx +87 -0
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +2 -1
- package/src/client/components/layout/session-sidebar/ClassicView.tsx +1 -1
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +9 -1
- package/src/client/components/layout/session-sidebar/SessionListNotice.tsx +7 -3
- package/src/client/components/layout/session-sidebar/about-modal/HarnessRow.tsx +4 -1
- package/src/client/components/layout/session-sidebar/about-modal/HarnessTable.tsx +12 -1
- package/src/client/components/layout/session-sidebar/about-modal/UpdateLogLine.test.tsx +82 -0
- package/src/client/components/layout/session-sidebar/about-modal/UpdateLogLine.tsx +23 -3
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +1 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +2 -1
- package/src/client/components/layout/session-sidebar/modern/index.tsx +1 -1
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +202 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +80 -19
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskList.tsx +29 -7
- package/src/client/components/layout/session-sidebar/scheduler-modal/index.tsx +3 -0
- package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +8 -0
- package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +181 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +41 -86
- package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +2 -1
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.test.ts +6 -0
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +9 -1
- package/src/client/components/settings/Modal.tsx +6 -2
- package/src/client/components/settings/Sidebar.tsx +32 -7
- package/src/client/components/settings/categories/HarnessSettings.tsx +15 -9
- package/src/client/components/settings/categories/NotificationSettings.test.tsx +40 -15
- package/src/client/components/settings/categories/NotificationSettings.tsx +142 -64
- package/src/client/components/settings/categories/PanelPluginSettings.tsx +3 -3
- package/src/client/components/settings/categories/PluginSettings.tsx +1 -1
- package/src/client/components/settings/categories/harness-settings/ConfigForm.tsx +3 -6
- package/src/client/components/settings/categories/harness-settings/CustomHarnessForm.tsx +186 -0
- package/src/client/components/settings/categories/panel-plugins/GitFreshness.test.tsx +36 -0
- package/src/client/components/settings/categories/panel-plugins/InstalledList.tsx +11 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.test.tsx +1 -0
- package/src/client/components/settings/categories/panel-plugins/PluginCard.tsx +15 -1
- package/src/client/components/settings/categories/panel-plugins/Section.tsx +1 -3
- package/src/client/components/settings/categories/panel-plugins/SettingsModal.test.tsx +165 -0
- package/src/client/components/settings/categories/panel-plugins/SettingsModal.tsx +260 -0
- package/src/client/components/settings/categories/panel-plugins/Toolbar.tsx +18 -4
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +64 -61
- package/src/client/components/settings/categories/plugin-settings/SidebarList.tsx +15 -4
- package/src/client/components/settings/groups.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.fork.test.ts +24 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +8 -4
- package/src/client/components/workspace/chat-timeline/ComposerDock.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -2
- package/src/client/components/workspace/chat-timeline/IrcNotice.test.tsx +55 -0
- package/src/client/components/workspace/chat-timeline/IrcNotice.tsx +71 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.fork.test.ts +80 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +13 -4
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/RunFooter.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +8 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +4 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +19 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +32 -3
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.search.test.tsx +72 -0
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +53 -33
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +2 -0
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +5 -5
- package/src/client/components/workspace/chat-timeline/index.tsx +11 -5
- package/src/client/components/workspace/chat-timeline/target-picker/DraftTargetRow.tsx +1 -9
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +129 -0
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +30 -12
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +47 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +55 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
- package/src/client/components/workspace/editor/FilePane.tsx +41 -4
- package/src/client/components/workspace/editor/Notices.tsx +2 -2
- package/src/client/components/workspace/editor/Pane.tsx +2 -2
- package/src/client/components/workspace/editor/Toolbar.tsx +20 -10
- package/src/client/components/workspace/editor/index.tsx +6 -10
- package/src/client/components/workspace/editor/toolbar-clusters.test.ts +5 -3
- package/src/client/components/workspace/editor/toolbar-clusters.tsx +26 -14
- package/src/client/components/workspace/editor/viewers/CsvGrid.tsx +52 -5
- package/src/client/components/workspace/editor/viewers/DataGrid.tsx +227 -41
- package/src/client/components/workspace/editor/viewers/DrawioView.tsx +93 -0
- package/src/client/components/workspace/editor/viewers/GridRow.tsx +91 -0
- package/src/client/components/workspace/editor/viewers/GridToolbar.tsx +53 -0
- package/src/client/components/workspace/editor/viewers/SheetView.tsx +152 -57
- package/src/client/components/workspace/editor/viewers/dispatch.tsx +42 -9
- package/src/client/components/workspace/editor/viewers/drawio-pages.test.ts +80 -0
- package/src/client/components/workspace/editor/viewers/drawio-pages.ts +63 -0
- package/src/client/components/workspace/editor/viewers/grid.test.ts +296 -0
- package/src/client/components/workspace/editor/viewers/use-cell-edit.ts +64 -0
- package/src/client/components/workspace/editor/viewers/use-grid-interaction.ts +216 -0
- package/src/client/components/workspace/editor/viewers/viewers.test.ts +47 -2
- package/src/client/components/workspace/editor/viewers/workbook.ts +149 -0
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +262 -0
- package/src/client/components/workspace/file-explorer/ContextMenu.tsx +30 -6
- package/src/client/components/workspace/file-explorer/Modals.tsx +8 -3
- package/src/client/components/workspace/file-explorer/RootOverlays.tsx +60 -0
- package/src/client/components/workspace/file-explorer/RowLabel.tsx +6 -2
- package/src/client/components/workspace/file-explorer/TreeItem.tsx +39 -49
- package/src/client/components/workspace/file-explorer/TreeItemModals.tsx +80 -0
- package/src/client/components/workspace/file-explorer/index.tsx +53 -29
- package/src/client/components/workspace/file-explorer/selection.test.tsx +109 -0
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +9 -1
- package/src/client/components/workspace/terminal-panel/focus.test.ts +70 -0
- package/src/client/components/workspace/terminal-panel/focus.ts +46 -0
- package/src/client/components/workspace/terminal-panel/index.tsx +14 -1
- package/src/client/components/workspace/terminal-panel/mount.ts +17 -9
- package/src/client/components/workspace/terminal-panel/scroll-hold.test.ts +158 -0
- package/src/client/components/workspace/terminal-panel/scroll-hold.ts +136 -0
- package/src/client/data/settings/omp-schema.json +169 -22
- package/src/client/glass.css +39 -14
- package/src/client/glass.test.ts +37 -0
- package/src/client/hooks/chat/composer/history.test.ts +267 -0
- package/src/client/hooks/chat/composer/history.ts +146 -0
- package/src/client/hooks/chat/composer/use-draft.ts +45 -1
- package/src/client/hooks/chat/omp/pending-sessions.waiting.test.ts +11 -10
- package/src/client/hooks/chat/omp/pending-waiting.ts +15 -7
- package/src/client/hooks/chat/omp/prompt-send.test.ts +11 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +3 -0
- package/src/client/hooks/chat/timeline/actions.ts +4 -4
- package/src/client/hooks/chat/timeline/ask-frames.test.ts +54 -0
- package/src/client/hooks/chat/timeline/ask-frames.ts +29 -1
- package/src/client/hooks/chat/timeline/composer-modes.ts +13 -2
- package/src/client/hooks/chat/timeline/fork-open.ts +52 -0
- package/src/client/hooks/chat/timeline/index.ts +5 -2
- package/src/client/hooks/chat/timeline/mode-availability.ts +7 -0
- package/src/client/hooks/chat/timeline/modes-contract.ts +6 -0
- package/src/client/hooks/chat/timeline/modes-hydrate.ts +93 -0
- package/src/client/hooks/chat/timeline/modes.ts +32 -52
- package/src/client/hooks/chat/timeline/new-chat-open.ts +7 -6
- package/src/client/hooks/chat/timeline/new-chat.ts +10 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +4 -0
- package/src/client/hooks/chat/timeline/pending-session-mode.test.ts +136 -0
- package/src/client/hooks/chat/timeline/pending-session-mode.ts +69 -0
- package/src/client/hooks/chat/timeline/pending-warmup.test.ts +147 -0
- package/src/client/hooks/chat/timeline/pending-warmup.ts +62 -0
- package/src/client/hooks/chat/timeline/run-identity.test.ts +12 -0
- package/src/client/hooks/chat/timeline/run-identity.ts +4 -1
- package/src/client/hooks/chat/timeline/send-props.ts +2 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +1 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +1 -0
- package/src/client/hooks/chat/timeline/send.test.ts +1 -0
- package/src/client/hooks/chat/timeline/session-harness.ts +4 -0
- package/src/client/hooks/chat/timeline/timeline-rail.test.ts +34 -2
- package/src/client/hooks/chat/timeline/use-fork-session.ts +9 -22
- package/src/client/hooks/chat/timeline/user-turns.ts +31 -2
- package/src/client/hooks/chat/waiting/cancel.ts +13 -6
- package/src/client/hooks/chat/waiting/choice.ts +13 -16
- package/src/client/hooks/chat/waiting/composer-wait.ts +70 -0
- package/src/client/hooks/chat/waiting/dispatch.ts +48 -28
- package/src/client/hooks/chat/waiting/held.ts +37 -13
- package/src/client/hooks/chat/waiting/hold.test.ts +22 -0
- package/src/client/hooks/chat/waiting/hold.ts +20 -11
- package/src/client/hooks/chat/waiting/restore.test.ts +69 -0
- package/src/client/hooks/chat/waiting/restore.ts +34 -0
- package/src/client/hooks/chat/waiting/store.ts +9 -3
- package/src/client/hooks/editor/file-editor-types.ts +36 -12
- package/src/client/hooks/editor/save-bytes.ts +79 -0
- package/src/client/hooks/editor/save-file.test.ts +1 -1
- package/src/client/hooks/editor/save-file.ts +35 -8
- package/src/client/hooks/editor/target-key.ts +17 -0
- package/src/client/hooks/editor/use-disk-digest.test.ts +82 -0
- package/src/client/hooks/editor/use-disk-digest.ts +164 -0
- package/src/client/hooks/editor/use-disk-sync.ts +212 -0
- package/src/client/hooks/editor/use-file-cache.ts +113 -0
- package/src/client/hooks/editor/use-file-editor.test.ts +120 -0
- package/src/client/hooks/editor/use-file-editor.ts +143 -57
- package/src/client/hooks/editor/use-file-read.ts +45 -12
- package/src/client/hooks/editor/use-file-writes.ts +4 -4
- package/src/client/hooks/editor/use-grid-selection.ts +160 -0
- package/src/client/hooks/models/harness-catalog.ts +15 -0
- package/src/client/hooks/models/use-harness-update.test.ts +35 -2
- package/src/client/hooks/models/use-harness-update.ts +49 -10
- package/src/client/hooks/ui/notifications.ts +17 -8
- package/src/client/hooks/workspace/diff-file.test.ts +72 -0
- package/src/client/hooks/workspace/diff-file.ts +12 -6
- package/src/client/hooks/workspace/file-archive.ts +220 -0
- package/src/client/hooks/workspace/file-clipboard.test.ts +4 -4
- package/src/client/hooks/workspace/file-clipboard.ts +37 -26
- package/src/client/hooks/workspace/file-selection.test.ts +67 -0
- package/src/client/hooks/workspace/file-selection.ts +156 -0
- package/src/client/hooks/workspace/file-tree-actions-clipboard.test.ts +5 -5
- package/src/client/hooks/workspace/file-tree-actions.ts +36 -8
- package/src/client/hooks/workspace/panel-registry.ts +1 -1
- package/src/client/hooks/workspace/scheduled-tasks.ts +26 -11
- package/src/client/lib/editor/workbook-drafts.ts +42 -0
- package/src/client/lib/launch/file-handlers.ts +2 -2
- package/src/client/lib/notifications/os.test.ts +1 -30
- package/src/client/lib/notifications/os.ts +0 -15
- package/src/client/lib/notifications/platform.test.ts +68 -0
- package/src/client/lib/notifications/platform.ts +36 -0
- package/src/client/lib/scrollbar-activity.test.ts +21 -88
- package/src/client/lib/scrollbar-activity.ts +71 -73
- package/src/client/lib/scrollbar-events.ts +143 -0
- package/src/client/lib/scrollbar-input.test.ts +126 -0
- package/src/client/lib/scrollbar-probe.test-util.ts +107 -0
- package/src/client/tailwind.css +32 -1
- package/src/server/db.server.test.ts +50 -1
- package/src/server/db.server.ts +36 -3
- package/src/server/index.ts +7 -0
- package/src/server/lib/chat/prompt-history.server.test.ts +92 -0
- package/src/server/lib/chat/prompt-history.server.ts +65 -0
- package/src/server/lib/chat/schema.server.ts +35 -0
- package/src/server/lib/db/schema.ts +3 -0
- package/src/server/lib/fs/archive.test.ts +139 -0
- package/src/server/lib/fs/archive.ts +259 -0
- package/src/server/lib/fs/git-diff.test.ts +26 -1
- package/src/server/lib/fs/git-diff.ts +43 -15
- package/src/server/lib/harness/acp/client.ts +81 -87
- package/src/server/lib/harness/acp/prewarm.server.ts +237 -0
- package/src/server/lib/harness/acp/prewarm.test.ts +171 -0
- package/src/server/lib/harness/acp/prompt.test.ts +70 -1
- package/src/server/lib/harness/acp/prompt.ts +32 -1
- package/src/server/lib/harness/acp/protocol.ts +23 -0
- package/src/server/lib/harness/acp/session-handshake.test.ts +26 -0
- package/src/server/lib/harness/acp/session-handshake.ts +22 -20
- package/src/server/lib/harness/acp/session-options.ts +16 -0
- package/src/server/lib/harness/acp/session-process.ts +43 -0
- package/src/server/lib/harness/acp/session.ts +11 -12
- package/src/server/lib/harness/acp/stdio.ts +129 -0
- package/src/server/lib/harness/acp/verbs.test.ts +97 -0
- package/src/server/lib/harness/acp/verbs.ts +16 -6
- package/src/server/lib/harness/auto-probe.server.ts +4 -3
- package/src/server/lib/harness/capabilities.ts +8 -0
- package/src/server/lib/harness/config.server.ts +3 -2
- package/src/server/lib/harness/custom.server.ts +209 -0
- package/src/server/lib/harness/launch-table.ts +19 -0
- package/src/server/lib/harness/launch.ts +6 -1
- package/src/server/lib/harness/provider-entry.ts +1 -1
- package/src/server/lib/harness/provider-file.server.ts +1 -1
- package/src/server/lib/harness/provider-sources.server.ts +2 -1
- package/src/server/lib/harness/provider-write.server.ts +2 -1
- package/src/server/lib/harness/register.server.ts +8 -1
- package/src/server/lib/harness/schema.server.ts +21 -0
- package/src/server/lib/harness/session-lease.server.test.ts +99 -0
- package/src/server/lib/harness/session-lease.server.ts +193 -0
- package/src/server/lib/harness/session-store.server.test.ts +8 -8
- package/src/server/lib/harness/session-store.server.ts +25 -4
- package/src/server/lib/harness/session-title.server.ts +12 -2
- package/src/server/lib/harness/spawn.server.ts +123 -20
- package/src/server/lib/harness/update-job-store.ts +12 -0
- package/src/server/lib/harness/update-queue.server.ts +18 -13
- package/src/server/lib/lifecycle/after-listen.ts +12 -1
- package/src/server/lib/lifecycle/paths.ts +19 -1
- package/src/server/lib/mcp/registry.server.ts +155 -0
- package/src/server/lib/mcp/registry.test.ts +169 -0
- package/src/server/lib/mcp/store.server.ts +38 -0
- package/src/server/lib/omp/rpc/frame-fold-contract.ts +59 -0
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +64 -1
- package/src/server/lib/omp/rpc/frame-fold-host.test-util.ts +2 -1
- package/src/server/lib/omp/rpc/frame-fold-signals.test.ts +5 -1
- package/src/server/lib/omp/rpc/frame-fold.test.ts +7 -2
- package/src/server/lib/omp/rpc/frame-fold.ts +6 -45
- package/src/server/lib/omp/rpc/lifecycle.test.ts +4 -0
- package/src/server/lib/omp/rpc/prewarm-pool.ts +19 -5
- package/src/server/lib/omp/rpc/run-model.test.ts +116 -0
- package/src/server/lib/omp/rpc/run-model.ts +4 -2
- package/src/server/lib/omp/session/auto-title.server.test.ts +4 -0
- package/src/server/lib/omp/session/delete.server.ts +1 -0
- package/src/server/lib/omp/session/goal-driver.test.ts +5 -1
- package/src/server/lib/omp/session/goal-settings.test.ts +5 -1
- package/src/server/lib/omp/session/sidebar-data.harness.test.ts +6 -3
- package/src/server/lib/omp/session/standby.server.ts +13 -2
- package/src/server/lib/panels/auto-update.server.test.ts +5 -2
- package/src/server/lib/panels/git-update.server.test.ts +5 -2
- package/src/server/lib/panels/install.server.test.ts +5 -2
- package/src/server/lib/panels/manifest.test.ts +47 -1
- package/src/server/lib/panels/manifest.ts +19 -0
- package/src/server/lib/panels/registry.server.ts +19 -2
- package/src/server/lib/panels/remove.server.test.ts +5 -2
- package/src/server/lib/panels/scan.server.ts +26 -2
- package/src/server/lib/panels/settings-schema.server.ts +72 -0
- package/src/server/lib/plugins/background.server.ts +21 -3
- package/src/server/lib/plugins/background.test.ts +13 -0
- package/src/server/lib/plugins/loader.server.ts +35 -51
- package/src/server/lib/plugins/mcp.server.ts +100 -0
- package/src/server/lib/plugins/mcp.test.ts +75 -0
- package/src/server/lib/plugins/schedule-runner.server.ts +153 -0
- package/src/server/lib/plugins/schedule-runner.test.ts +186 -0
- package/src/server/lib/plugins/schedule-store.server.ts +107 -0
- package/src/server/lib/plugins/schema.server.ts +8 -0
- package/src/server/lib/plugins/settings.server.ts +56 -19
- package/src/server/lib/plugins/shutdown.server.ts +58 -0
- package/src/server/lib/plugins/shutdown.test.ts +28 -3
- package/src/server/lib/realtime/topics/global.server.ts +5 -1
- package/src/server/lib/schedule/rows.server.ts +9 -0
- package/src/server/lib/schedule/runtime.server.test.ts +91 -0
- package/src/server/lib/schedule/runtime.server.ts +101 -23
- package/src/server/lib/schedule/schema.server.ts +15 -0
- package/src/server/lib/schedule/store.server.test.ts +34 -0
- package/src/server/lib/schedule/store.server.ts +33 -9
- package/src/server/lib/sessions/fork.server.test.ts +47 -0
- package/src/server/lib/sessions/fork.server.ts +17 -1
- package/src/server/lib/sessions/spawn.server.ts +2 -2
- package/src/server/lib/waiting/runtime.server.test.ts +48 -0
- package/src/server/lib/waiting/runtime.server.ts +22 -0
- package/src/server/lib/waiting/schema.server.ts +8 -0
- package/src/server/lib/waiting/store.server.test.ts +14 -0
- package/src/server/lib/waiting/store.server.ts +6 -2
- package/src/server/routes/agent/command-resume.test.ts +9 -4
- package/src/server/routes/agent/command.ts +11 -0
- package/src/server/routes/agent/new-mode.test.ts +40 -0
- package/src/server/routes/agent/new.ts +36 -10
- package/src/server/routes/agent/prewarm.ts +48 -7
- package/src/server/routes/chat/index.ts +5 -0
- package/src/server/routes/chat/prompt-history.test.ts +67 -0
- package/src/server/routes/chat/prompt-history.ts +31 -0
- package/src/server/routes/chat/stream.test.ts +21 -0
- package/src/server/routes/chat/stream.ts +5 -0
- package/src/server/routes/fs/action-archive.test.ts +128 -0
- package/src/server/routes/fs/action-bulk.ts +106 -0
- package/src/server/routes/fs/action-save-bytes.test.ts +59 -0
- package/src/server/routes/fs/action-transfer.test.ts +26 -0
- package/src/server/routes/fs/action.ts +100 -12
- package/src/server/routes/fs/archive.ts +20 -0
- package/src/server/routes/fs/digest.test.ts +100 -0
- package/src/server/routes/fs/digest.ts +106 -0
- package/src/server/routes/fs/grant.test.ts +5 -2
- package/src/server/routes/fs/index.ts +4 -0
- package/src/server/routes/fs/read.ts +6 -1
- package/src/server/routes/fs/scope.test.ts +6 -2
- package/src/server/routes/harness/custom.test.ts +131 -0
- package/src/server/routes/harness/import-action.ts +3 -3
- package/src/server/routes/harness/root.ts +47 -9
- package/src/server/routes/harness/summary.test.ts +50 -0
- package/src/server/routes/harness/update-status.ts +41 -2
- package/src/server/routes/harness/update.test.ts +56 -2
- package/src/server/routes/harness/update.ts +2 -2
- package/src/server/routes/panels/bindings.ts +2 -0
- package/src/server/routes/panels/settings.test.ts +165 -0
- package/src/server/routes/panels/settings.ts +106 -0
- package/src/server/routes/schedule/body.ts +14 -0
- package/src/server/routes/schedule/index.ts +28 -4
- package/src/server/routes/sessions/delete.test.ts +4 -0
- package/src/server/routes/settings/mcp.ts +9 -26
- package/src/server/routes/waiting/index.ts +21 -2
- package/src/server/routes/waiting/routes.test.ts +21 -0
- package/src/shared/lib/chat/ask-form/index.ts +39 -31
- package/src/shared/lib/chat/ask-form/labels.ts +46 -0
- package/src/shared/lib/chat/ask-form/tokens.ts +11 -2
- package/src/shared/lib/chat/ask-form.test.ts +57 -0
- package/src/shared/lib/chat/ask-questions.ts +31 -0
- package/src/shared/lib/chat/composer/delegation.ts +3 -3
- package/src/shared/lib/chat/composer/history.test.ts +67 -0
- package/src/shared/lib/chat/composer/history.ts +61 -0
- package/src/shared/lib/chat/irc-notice.ts +42 -0
- package/src/shared/lib/chat/timeline/fork-anchor.test.ts +99 -0
- package/src/shared/lib/chat/timeline/fork-anchor.ts +47 -0
- package/src/shared/lib/chat/todo/parser.ts +6 -4
- package/src/shared/lib/fs/archive.test.ts +101 -0
- package/src/shared/lib/fs/archive.ts +191 -0
- package/src/shared/lib/fs/clipboard.test.ts +32 -7
- package/src/shared/lib/fs/clipboard.ts +59 -14
- package/src/shared/lib/fs/content-hash.ts +29 -0
- package/src/shared/lib/fs/csv.test.ts +50 -0
- package/src/shared/lib/fs/csv.ts +40 -0
- package/src/shared/lib/fs/document-kind.test.ts +13 -6
- package/src/shared/lib/fs/document-kind.ts +18 -6
- package/src/shared/lib/fs/file-kind-classify.test.ts +4 -0
- package/src/shared/lib/fs/file-kind.test.ts +2 -7
- package/src/shared/lib/fs/file-kind.ts +4 -2
- package/src/shared/lib/fs/grid-edit.test.ts +24 -0
- package/src/shared/lib/fs/grid-edit.ts +29 -0
- package/src/shared/lib/fs/grid-selection.test.ts +137 -0
- package/src/shared/lib/fs/grid-selection.ts +138 -0
- package/src/shared/lib/harness/brand-color.ts +5 -0
- package/src/shared/lib/harness/catalog.test.ts +22 -0
- package/src/shared/lib/harness/catalog.ts +60 -7
- package/src/shared/lib/harness/config-fields.test.ts +25 -0
- package/src/shared/lib/harness/config-fields.ts +33 -3
- package/src/shared/lib/harness/dialects.ts +1 -1
- package/src/shared/lib/harness/fork.ts +60 -0
- package/src/shared/lib/harness/mcp-facts.test.ts +30 -0
- package/src/shared/lib/harness/mcp-facts.ts +69 -0
- package/src/shared/lib/harness/menu.test.ts +16 -1
- package/src/shared/lib/harness/menu.ts +2 -2
- package/src/shared/lib/harness/provider-contracts.ts +109 -0
- package/src/shared/lib/harness/provider-facts.test.ts +2 -1
- package/src/shared/lib/harness/provider-facts.ts +24 -115
- package/src/shared/lib/harness/provider-lookup.ts +37 -0
- package/src/shared/lib/harness/providers.ts +2 -1
- package/src/shared/lib/harness/rewind.ts +6 -6
- package/src/shared/lib/harness/session-modes.ts +31 -0
- package/src/shared/lib/harness/transcript.test.ts +29 -0
- package/src/shared/lib/harness/transcript.ts +19 -0
- package/src/shared/lib/harness/updates.ts +10 -0
- package/src/shared/lib/notifications/settings.test.ts +21 -0
- package/src/shared/lib/notifications/settings.ts +24 -0
- package/src/shared/lib/omp/session/mapper.test.ts +31 -0
- package/src/shared/lib/omp/session/mapper.ts +17 -0
- package/src/shared/lib/omp/session/messages-map-notice.test.ts +68 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +1 -35
- package/src/shared/lib/omp/session/messages-map.ts +17 -0
- package/src/shared/lib/omp/session/prewarm.test.ts +28 -4
- package/src/shared/lib/omp/session/prewarm.ts +25 -6
- package/src/shared/lib/omp/session/stream-state.server.test.ts +25 -0
- package/src/shared/lib/omp/session/stream-state.server.ts +8 -4
- package/src/shared/lib/omp/session/wait.ts +10 -1
- package/src/shared/lib/panels/capabilities.test.ts +1 -1
- package/src/shared/lib/panels/capabilities.ts +3 -0
- package/src/shared/lib/plugins/settings.ts +22 -0
- package/src/shared/lib/schedule/parse.test.ts +48 -0
- package/src/shared/lib/schedule/parse.ts +69 -45
- package/src/shared/lib/schedule/timezone.ts +128 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/settings/sections.ts +8 -4
- package/src/shared/lib/ui/picker-filter.test.ts +23 -0
- package/src/shared/lib/ui/picker-filter.ts +20 -0
- package/src/shared/lib/workspace/refresh-cadence.test.ts +25 -1
- package/src/shared/lib/workspace/relative-time.ts +16 -0
- package/src/shared/types/chat.ts +4 -0
- package/src/shared/types/harness.ts +12 -1
- package/src/shared/types/omp/agent.ts +6 -0
- package/src/shared/types/omp/session.ts +18 -0
- package/src/shared/types/panels-registry.ts +3 -3
- package/src/shared/types/panels.ts +4 -2
- package/src/shared/types/schedule.ts +13 -0
- package/src/shared/types/settings/state.ts +18 -7
- package/src/shared/types/todo.ts +3 -1
- package/src/shared/types/waiting.ts +9 -0
- package/src/test-support/file-actions.test-util.ts +4 -0
- package/src/test-support/file-archive.test-util.ts +41 -0
- package/src/test-support/file-clipboard.test-util.ts +9 -6
- package/src/test-support/file-editor.test-util.ts +70 -5
- package/src/test-support/harness-table.test-util.ts +2 -0
- package/src/test-support/preload.ts +46 -0
- package/dist/client/static/js/index-32rpkj6b.css +0 -1
- package/src/client/hooks/editor/use-external-change-notice.ts +0 -71
- package/src/client/hooks/editor/use-external-change.test.ts +0 -88
- package/src/client/hooks/editor/use-external-change.ts +0 -146
|
@@ -6,18 +6,26 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The panel's header: what it is, then the scope, then the filter.
|
|
8
8
|
*
|
|
9
|
-
* The panel is 320–560px wide, so the
|
|
9
|
+
* The panel is 320–560px wide, so the header is three rows and each row is one
|
|
10
10
|
* idea:
|
|
11
11
|
*
|
|
12
|
-
* - the TITLE row names the panel and carries the refresh
|
|
13
|
-
* whole read;
|
|
14
|
-
* - the SCOPE row is the shared repo picker, the provider
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* label/text pair — and it collapses behind a single control, because a panel
|
|
18
|
-
* that spends three rows on controls has no room for the list.
|
|
12
|
+
* - the TITLE row names the panel and carries the refresh and the credential,
|
|
13
|
+
* which act on the whole read;
|
|
14
|
+
* - the SCOPE row is the shared repo picker, the provider chip and the link out;
|
|
15
|
+
* - the FILTER row is the state segment, "assigned to me", the search field and
|
|
16
|
+
* the label disclosure.
|
|
19
17
|
*
|
|
20
|
-
*
|
|
18
|
+
* **Search is a field, not a hidden mode.** Finding an issue by its text is the
|
|
19
|
+
* most common thing a reader does here, and it used to sit behind a funnel icon
|
|
20
|
+
* that also held the label filter. The two are separate now: the search field is
|
|
21
|
+
* always visible, and the label filter is the one that folds away.
|
|
22
|
+
*
|
|
23
|
+
* **Releases carry no filter row.** No host filters a release collection by
|
|
24
|
+
* state, assignee, label or text, so drawing those controls over it would be a
|
|
25
|
+
* row of switches that change nothing. The row is replaced by the one fact that
|
|
26
|
+
* is true: releases are listed newest first.
|
|
27
|
+
*
|
|
28
|
+
* The provider chip is not decoration: a self-hosted host is routinely GitLab
|
|
21
29
|
* while the reader assumes GitHub, and the vocabulary in the sidebar (MRs vs
|
|
22
30
|
* PRs) is derived from the same fact.
|
|
23
31
|
*
|
|
@@ -29,15 +37,27 @@
|
|
|
29
37
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
|
30
38
|
import { RepoPicker, type RepoScopeHandle } from '@kabmo-labs/kabmo-ui';
|
|
31
39
|
|
|
32
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
DEFAULT_FILTER,
|
|
42
|
+
filterIsDefault,
|
|
43
|
+
type ForgeCredential,
|
|
44
|
+
type ForgeFilter,
|
|
45
|
+
type ForgeList,
|
|
46
|
+
type ForgeProvider,
|
|
47
|
+
type ForgeSection,
|
|
48
|
+
type ForgeState,
|
|
49
|
+
} from '../protocol';
|
|
33
50
|
import { CredentialSheet } from './Credential';
|
|
34
51
|
import { Glyph, ICON } from './Glyph';
|
|
52
|
+
import { providerLabel } from './format';
|
|
35
53
|
import type { Scope } from './use-forge';
|
|
36
54
|
|
|
37
55
|
interface HeaderProps {
|
|
38
56
|
scope: RepoScopeHandle;
|
|
39
57
|
showHeader: boolean;
|
|
58
|
+
section: ForgeSection;
|
|
40
59
|
list: ForgeList | null;
|
|
60
|
+
provider: ForgeProvider;
|
|
41
61
|
filter: ForgeFilter;
|
|
42
62
|
loading: boolean;
|
|
43
63
|
credential: ForgeCredential | null;
|
|
@@ -63,10 +83,30 @@ const STATES: Array<{ value: ForgeState; label: string }> = [
|
|
|
63
83
|
{ value: 'all', label: 'All' },
|
|
64
84
|
];
|
|
65
85
|
|
|
66
|
-
|
|
86
|
+
/** The focus ring every control in this header shares. */
|
|
87
|
+
const CONTROL = 'tap-target cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20';
|
|
88
|
+
|
|
89
|
+
export function Header({
|
|
90
|
+
scope,
|
|
91
|
+
showHeader,
|
|
92
|
+
section,
|
|
93
|
+
list,
|
|
94
|
+
provider,
|
|
95
|
+
filter,
|
|
96
|
+
loading,
|
|
97
|
+
credential,
|
|
98
|
+
target,
|
|
99
|
+
onFilter,
|
|
100
|
+
onRefresh,
|
|
101
|
+
}: HeaderProps) {
|
|
67
102
|
const [expanded, setExpanded] = useState(false);
|
|
68
103
|
const [credentialOpen, setCredentialOpen] = useState(false);
|
|
69
104
|
const narrowed = !filterIsDefault(filter);
|
|
105
|
+
const filterable = section !== 'releases';
|
|
106
|
+
// Bitbucket's list endpoints take no assignee filter, so a "Mine" toggle there
|
|
107
|
+
// would be a control that changes nothing. The server ignores the field; the
|
|
108
|
+
// panel must not offer it.
|
|
109
|
+
const canMine = provider !== 'bitbucket';
|
|
70
110
|
|
|
71
111
|
// The two typed fields keep their own draft, committed after a pause. A
|
|
72
112
|
// controlled input bound straight to the committed filter would move the
|
|
@@ -100,9 +140,30 @@ export function Header({ scope, showHeader, list, filter, loading, credential, t
|
|
|
100
140
|
disabled={loading}
|
|
101
141
|
title="Re-read from the host"
|
|
102
142
|
aria-label="Re-read from the host"
|
|
103
|
-
className=
|
|
143
|
+
className={`flex-shrink-0 cursor-pointer rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink disabled:cursor-default disabled:opacity-50 ${CONTROL}`}
|
|
144
|
+
>
|
|
145
|
+
<span className={loading ? 'inline-flex animate-spin' : 'inline-flex'}>
|
|
146
|
+
<Glyph path={ICON.refresh} size={13} />
|
|
147
|
+
</span>
|
|
148
|
+
</button>
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
const credentialButton = (
|
|
152
|
+
<button
|
|
153
|
+
type="button"
|
|
154
|
+
onClick={() => setCredentialOpen((value) => !value)}
|
|
155
|
+
aria-expanded={credentialOpen}
|
|
156
|
+
title={
|
|
157
|
+
credential?.present
|
|
158
|
+
? `Credential: ${credential.source}. Open for details.`
|
|
159
|
+
: 'No credential: public repositories only. Open for details.'
|
|
160
|
+
}
|
|
161
|
+
aria-label="Credential details"
|
|
162
|
+
className={`flex-shrink-0 cursor-pointer rounded p-1 transition-colors hover:bg-ink/5 ${CONTROL} ${
|
|
163
|
+
credential?.present ? 'text-success-text' : 'text-warning-text'
|
|
164
|
+
}`}
|
|
104
165
|
>
|
|
105
|
-
<Glyph path={ICON.
|
|
166
|
+
<Glyph path={ICON.key} size={12} />
|
|
106
167
|
</button>
|
|
107
168
|
);
|
|
108
169
|
|
|
@@ -114,18 +175,21 @@ export function Header({ scope, showHeader, list, filter, loading, credential, t
|
|
|
114
175
|
<Glyph path={ICON.forge} size={14} />
|
|
115
176
|
<span className="truncate text-xs font-semibold uppercase tracking-wider text-ink">Forge</span>
|
|
116
177
|
</div>
|
|
117
|
-
|
|
178
|
+
<div className="flex items-center gap-0.5">
|
|
179
|
+
{refresh}
|
|
180
|
+
{credentialButton}
|
|
181
|
+
</div>
|
|
118
182
|
</div>
|
|
119
183
|
)}
|
|
120
184
|
|
|
121
|
-
<div className="flex items-center gap-1.5 px-2
|
|
185
|
+
<div className="flex items-center gap-1.5 px-2 pt-1.5">
|
|
122
186
|
<RepoPicker scope={scope} className="min-w-0" />
|
|
123
187
|
{list && (
|
|
124
188
|
<span
|
|
125
|
-
className="flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5
|
|
189
|
+
className="flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 text-[10px] uppercase tracking-wider text-ink/60"
|
|
126
190
|
title={`${list.host}/${list.slug}`}
|
|
127
191
|
>
|
|
128
|
-
{
|
|
192
|
+
{providerLabel(provider)}
|
|
129
193
|
</span>
|
|
130
194
|
)}
|
|
131
195
|
{list && (
|
|
@@ -135,89 +199,91 @@ export function Header({ scope, showHeader, list, filter, loading, credential, t
|
|
|
135
199
|
rel="noopener noreferrer"
|
|
136
200
|
title="Open the repository on its host"
|
|
137
201
|
aria-label="Open the repository on its host"
|
|
138
|
-
className=
|
|
202
|
+
className={`flex-shrink-0 cursor-pointer rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink ${CONTROL}`}
|
|
139
203
|
>
|
|
140
204
|
<Glyph path={ICON.external} size={13} />
|
|
141
205
|
</a>
|
|
142
206
|
)}
|
|
143
|
-
{/*
|
|
144
|
-
The credential indicator is a DOT rather than a sentence: a full token
|
|
145
|
-
is present in the common case, and a row of prose about it would be the
|
|
146
|
-
panel's first line. It is a button because the sheet behind it is where
|
|
147
|
-
the two facts a reader needs live — which source, and whether it writes.
|
|
148
|
-
*/}
|
|
149
|
-
<button
|
|
150
|
-
type="button"
|
|
151
|
-
onClick={() => setCredentialOpen((value) => !value)}
|
|
152
|
-
aria-expanded={credentialOpen}
|
|
153
|
-
title={
|
|
154
|
-
credential?.present
|
|
155
|
-
? `Credential: ${credential.source}. Open for details.`
|
|
156
|
-
: 'No credential: public repositories only. Open for details.'
|
|
157
|
-
}
|
|
158
|
-
aria-label="Credential details"
|
|
159
|
-
className={`flex-shrink-0 rounded p-1 transition-colors hover:bg-ink/5 ${
|
|
160
|
-
credential?.present ? 'text-success' : 'text-warning'
|
|
161
|
-
}`}
|
|
162
|
-
>
|
|
163
|
-
<Glyph path={ICON.key} size={12} />
|
|
164
|
-
</button>
|
|
165
207
|
{!showHeader && refresh}
|
|
208
|
+
{!showHeader && credentialButton}
|
|
166
209
|
</div>
|
|
167
210
|
|
|
168
|
-
{
|
|
169
|
-
<div className="px-2
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
211
|
+
{filterable ? (
|
|
212
|
+
<div className="flex items-center gap-1.5 px-2 py-1.5">
|
|
213
|
+
<div className="flex flex-shrink-0 items-center rounded border border-ink/15 p-px" role="group" aria-label="State filter">
|
|
214
|
+
{STATES.map((state) => (
|
|
215
|
+
<button
|
|
216
|
+
key={state.value}
|
|
217
|
+
type="button"
|
|
218
|
+
onClick={() => onFilter({ ...filter, state: state.value })}
|
|
219
|
+
aria-pressed={filter.state === state.value}
|
|
220
|
+
className={`cursor-pointer rounded-sm px-1.5 py-0.5 text-[10px] transition-colors ${CONTROL} ${
|
|
221
|
+
filter.state === state.value ? 'bg-ink/10 font-medium text-ink' : 'text-ink/60 hover:text-ink'
|
|
222
|
+
}`}
|
|
223
|
+
>
|
|
224
|
+
{state.label}
|
|
225
|
+
</button>
|
|
226
|
+
))}
|
|
227
|
+
</div>
|
|
173
228
|
|
|
174
|
-
|
|
175
|
-
<div className="flex flex-shrink-0 items-center rounded border border-ink/15 p-px" role="group" aria-label="State filter">
|
|
176
|
-
{STATES.map((state) => (
|
|
229
|
+
{canMine && (
|
|
177
230
|
<button
|
|
178
|
-
key={state.value}
|
|
179
231
|
type="button"
|
|
180
|
-
onClick={() => onFilter({ ...filter,
|
|
181
|
-
aria-pressed={filter.
|
|
182
|
-
|
|
183
|
-
|
|
232
|
+
onClick={() => onFilter({ ...filter, mine: !filter.mine })}
|
|
233
|
+
aria-pressed={filter.mine}
|
|
234
|
+
title="Only items assigned to me"
|
|
235
|
+
className={`flex-shrink-0 cursor-pointer rounded border px-1.5 py-0.5 text-[10px] transition-colors ${CONTROL} ${
|
|
236
|
+
filter.mine ? 'border-ink/30 bg-ink/10 font-medium text-ink' : 'border-ink/15 text-ink/60 hover:text-ink'
|
|
184
237
|
}`}
|
|
185
238
|
>
|
|
186
|
-
|
|
239
|
+
Mine
|
|
187
240
|
</button>
|
|
188
|
-
)
|
|
189
|
-
</div>
|
|
241
|
+
)}
|
|
190
242
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<Glyph path={ICON.filter} size={11} />
|
|
216
|
-
{narrowed && <span className="font-medium">filtered</span>}
|
|
217
|
-
</button>
|
|
218
|
-
</div>
|
|
243
|
+
<div className="flex min-w-0 flex-1 items-center gap-1 rounded border border-ink/15 bg-canvas px-1.5 py-1 focus-within:border-ink/40">
|
|
244
|
+
<span className="flex-shrink-0 text-ink/40">
|
|
245
|
+
<Glyph path={ICON.search} size={11} />
|
|
246
|
+
</span>
|
|
247
|
+
<input
|
|
248
|
+
type="text"
|
|
249
|
+
value={query}
|
|
250
|
+
onInput={(event) => setQuery(event.currentTarget.value)}
|
|
251
|
+
placeholder="Search"
|
|
252
|
+
aria-label="Search titles and bodies"
|
|
253
|
+
className="min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder-ink/40"
|
|
254
|
+
/>
|
|
255
|
+
{query && (
|
|
256
|
+
<button
|
|
257
|
+
type="button"
|
|
258
|
+
onClick={() => setQuery('')}
|
|
259
|
+
title="Clear the search"
|
|
260
|
+
aria-label="Clear the search"
|
|
261
|
+
className={`flex-shrink-0 cursor-pointer rounded p-0.5 text-ink/50 hover:text-ink ${CONTROL}`}
|
|
262
|
+
>
|
|
263
|
+
<Glyph path={ICON.cross} size={10} />
|
|
264
|
+
</button>
|
|
265
|
+
)}
|
|
266
|
+
</div>
|
|
219
267
|
|
|
220
|
-
|
|
268
|
+
<button
|
|
269
|
+
type="button"
|
|
270
|
+
onClick={() => setExpanded((value) => !value)}
|
|
271
|
+
aria-expanded={expanded}
|
|
272
|
+
title="Label filter"
|
|
273
|
+
aria-label="Label filter"
|
|
274
|
+
className={`flex flex-shrink-0 cursor-pointer items-center gap-1 rounded px-1.5 py-0.5 text-[10px] transition-colors ${CONTROL} ${
|
|
275
|
+
narrowed ? 'text-ink' : 'text-ink/60 hover:text-ink'
|
|
276
|
+
}`}
|
|
277
|
+
>
|
|
278
|
+
<Glyph path={ICON.filter} size={11} />
|
|
279
|
+
{narrowed && <span className="font-medium">filtered</span>}
|
|
280
|
+
</button>
|
|
281
|
+
</div>
|
|
282
|
+
) : (
|
|
283
|
+
<div className="px-2 pb-1.5 text-[10px] text-ink/55">Newest first. Releases are not filtered.</div>
|
|
284
|
+
)}
|
|
285
|
+
|
|
286
|
+
{expanded && filterable && (
|
|
221
287
|
<div className="flex flex-col gap-1 px-2 pb-1.5">
|
|
222
288
|
<input
|
|
223
289
|
type="text"
|
|
@@ -225,15 +291,7 @@ export function Header({ scope, showHeader, list, filter, loading, credential, t
|
|
|
225
291
|
onInput={(event) => setLabel(event.currentTarget.value)}
|
|
226
292
|
placeholder="Label, exactly"
|
|
227
293
|
aria-label="Label filter"
|
|
228
|
-
className="w-full rounded border border-ink/15 bg-canvas px-1.5 py-1 text-[11px] text-ink outline-none placeholder-ink/
|
|
229
|
-
/>
|
|
230
|
-
<input
|
|
231
|
-
type="text"
|
|
232
|
-
value={query}
|
|
233
|
-
onInput={(event) => setQuery(event.currentTarget.value)}
|
|
234
|
-
placeholder="Text in the title or body"
|
|
235
|
-
aria-label="Text filter"
|
|
236
|
-
className="w-full rounded border border-ink/15 bg-canvas px-1.5 py-1 text-[11px] text-ink outline-none placeholder-ink/35 focus:border-ink/40"
|
|
294
|
+
className="w-full rounded border border-ink/15 bg-canvas px-1.5 py-1 text-[11px] text-ink outline-none placeholder-ink/40 focus:border-ink/40"
|
|
237
295
|
/>
|
|
238
296
|
{narrowed && (
|
|
239
297
|
<button
|
|
@@ -241,15 +299,21 @@ export function Header({ scope, showHeader, list, filter, loading, credential, t
|
|
|
241
299
|
onClick={() => {
|
|
242
300
|
setLabel('');
|
|
243
301
|
setQuery('');
|
|
244
|
-
onFilter(
|
|
302
|
+
onFilter(DEFAULT_FILTER);
|
|
245
303
|
}}
|
|
246
|
-
className=
|
|
304
|
+
className={`self-start cursor-pointer text-[10px] text-ink/60 underline underline-offset-2 hover:text-ink ${CONTROL}`}
|
|
247
305
|
>
|
|
248
306
|
Clear every filter
|
|
249
307
|
</button>
|
|
250
308
|
)}
|
|
251
309
|
</div>
|
|
252
310
|
)}
|
|
311
|
+
|
|
312
|
+
{credentialOpen && (
|
|
313
|
+
<div className="px-2 pb-1.5">
|
|
314
|
+
<CredentialSheet scope={target} credential={credential} onClose={() => setCredentialOpen(false)} />
|
|
315
|
+
</div>
|
|
316
|
+
)}
|
|
253
317
|
</div>
|
|
254
318
|
);
|
|
255
319
|
}
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
* own page remains one click away, because that is where the diff view, the
|
|
18
18
|
* review threads and the checks' logs live in full.
|
|
19
19
|
*
|
|
20
|
+
* **The back control is always drawn.** The item replaces the list at every
|
|
21
|
+
* width, so a back control hidden at a wide container is a dead end: the reader
|
|
22
|
+
* can open an item and has no way to return to the list it came from.
|
|
23
|
+
*
|
|
20
24
|
* **A system or bot comment is drawn differently.** GitLab's `system` notes are
|
|
21
25
|
* "changed the description", "approved this merge request"; GitHub's App accounts
|
|
22
26
|
* are `dependabot[bot]`. Both are worth showing — an approval recorded only as a
|
|
@@ -32,7 +36,7 @@ import { ChangeCommits, ChangeFiles } from './Change';
|
|
|
32
36
|
import { CiBadge } from './CiBadge';
|
|
33
37
|
import { Glyph, ICON } from './Glyph';
|
|
34
38
|
import { WriteBar } from './Write';
|
|
35
|
-
import { itemIdLabel, relativeTime } from './format';
|
|
39
|
+
import { fullTime, itemIdLabel, relativeTime } from './format';
|
|
36
40
|
import type { ForgeWriteState } from './use-forge';
|
|
37
41
|
|
|
38
42
|
interface ItemViewProps {
|
|
@@ -44,26 +48,29 @@ interface ItemViewProps {
|
|
|
44
48
|
credential: ForgeCredential | null;
|
|
45
49
|
write: ForgeWriteState;
|
|
46
50
|
onBack: () => void;
|
|
51
|
+
onRetry: () => void;
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
const FOCUS = 'tap-target focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink/20';
|
|
55
|
+
|
|
49
56
|
/** One comment: a message, or a muted line when the host wrote it itself. */
|
|
50
57
|
function Comment({ comment }: { comment: ForgeComment }) {
|
|
51
58
|
if (comment.system) {
|
|
52
59
|
return (
|
|
53
60
|
<div className="flex items-baseline gap-1.5 border-t border-ink/8 px-2.5 py-1">
|
|
54
|
-
<span className="flex-shrink-0 text-[10px] font-medium text-ink/
|
|
55
|
-
<span className="min-w-0 flex-1 text-[10px] italic text-ink/
|
|
61
|
+
<span className="flex-shrink-0 text-[10px] font-medium text-ink/60">{comment.author}</span>
|
|
62
|
+
<span className="min-w-0 flex-1 text-[10px] italic text-ink/55">{comment.body}</span>
|
|
56
63
|
</div>
|
|
57
64
|
);
|
|
58
65
|
}
|
|
59
66
|
return (
|
|
60
|
-
<div className="border-t border-ink/8 px-2.5 py-
|
|
61
|
-
<div className="flex items-center gap-1.5 text-[10px] text-ink/
|
|
62
|
-
<span className="font-medium text-ink/
|
|
67
|
+
<div className="border-t border-ink/8 px-2.5 py-2">
|
|
68
|
+
<div className="flex items-center gap-1.5 text-[10px] text-ink/60">
|
|
69
|
+
<span className="font-medium text-ink/80">{comment.author}</span>
|
|
63
70
|
{comment.bot && (
|
|
64
|
-
<span className="rounded border border-ink/15 px-1 text-[
|
|
71
|
+
<span className="rounded border border-ink/15 px-1 text-[10px] uppercase tracking-wider text-ink/60">bot</span>
|
|
65
72
|
)}
|
|
66
|
-
<span>{relativeTime(comment.createdAt)}</span>
|
|
73
|
+
<span title={fullTime(comment.createdAt)}>{relativeTime(comment.createdAt)}</span>
|
|
67
74
|
{comment.url && (
|
|
68
75
|
<a
|
|
69
76
|
href={comment.url}
|
|
@@ -71,43 +78,55 @@ function Comment({ comment }: { comment: ForgeComment }) {
|
|
|
71
78
|
rel="noopener noreferrer"
|
|
72
79
|
title="Open this comment on the host"
|
|
73
80
|
aria-label="Open this comment on the host"
|
|
74
|
-
className=
|
|
81
|
+
className={`ml-auto cursor-pointer rounded p-0.5 text-ink/50 transition-colors hover:text-ink ${FOCUS}`}
|
|
75
82
|
>
|
|
76
83
|
<Glyph path={ICON.external} size={10} />
|
|
77
84
|
</a>
|
|
78
85
|
)}
|
|
79
86
|
</div>
|
|
80
|
-
<div className="mt-
|
|
87
|
+
<div className="mt-1">
|
|
81
88
|
<Markdown content={comment.body} className="prose-content text-xs" />
|
|
82
89
|
</div>
|
|
83
90
|
</div>
|
|
84
91
|
);
|
|
85
92
|
}
|
|
86
93
|
|
|
87
|
-
|
|
94
|
+
/** The body's loading shape, so the panel does not jump when the read lands. */
|
|
95
|
+
function DetailSkeleton() {
|
|
96
|
+
return (
|
|
97
|
+
<div aria-hidden="true" className="flex flex-col gap-2 px-2.5 py-3">
|
|
98
|
+
<span className="h-2.5 w-32 animate-pulse rounded bg-ink/10" />
|
|
99
|
+
<span className="h-2.5 w-full animate-pulse rounded bg-ink/5" />
|
|
100
|
+
<span className="h-2.5 w-40 animate-pulse rounded bg-ink/5" />
|
|
101
|
+
<span className="h-2.5 w-24 animate-pulse rounded bg-ink/5" />
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function ItemView({ item, detail, loading, error, credential, write, onBack, onRetry }: ItemViewProps) {
|
|
88
107
|
const capabilities = detail?.capabilities ?? null;
|
|
89
108
|
return (
|
|
90
109
|
<div className="flex h-full min-h-0 flex-col">
|
|
91
|
-
<div className="flex flex-shrink-0 items-start gap-1.5 border-b border-ink/10 px-2.5 py-
|
|
110
|
+
<div className="flex flex-shrink-0 items-start gap-1.5 border-b border-ink/10 px-2.5 py-2">
|
|
92
111
|
<button
|
|
93
112
|
type="button"
|
|
94
113
|
onClick={onBack}
|
|
95
114
|
title="Back to the list"
|
|
96
115
|
aria-label="Back to the list"
|
|
97
|
-
className=
|
|
116
|
+
className={`mt-0.5 flex-shrink-0 cursor-pointer rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink ${FOCUS}`}
|
|
98
117
|
>
|
|
99
118
|
<Glyph path={ICON.back} size={13} />
|
|
100
119
|
</button>
|
|
101
|
-
<div className="flex min-w-0 flex-1 flex-col gap-
|
|
102
|
-
<div className="flex items-center gap-1
|
|
120
|
+
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
|
121
|
+
<div className="flex flex-wrap items-center gap-x-2 gap-y-1">
|
|
103
122
|
<StateBadge state={item.state} />
|
|
104
|
-
<span className="flex-shrink-0 font-mono text-[10px] text-ink/
|
|
105
|
-
<span className="min-w-0 truncate text-[10px] text-ink/
|
|
106
|
-
{item.author} · {relativeTime(item.updatedAt)}
|
|
123
|
+
<span className="flex-shrink-0 font-mono text-[10px] text-ink/60">{itemIdLabel(item)}</span>
|
|
124
|
+
<span className="min-w-0 truncate text-[10px] text-ink/60">
|
|
125
|
+
{item.author} · <span title={fullTime(item.updatedAt)}>{relativeTime(item.updatedAt)}</span>
|
|
107
126
|
</span>
|
|
108
127
|
{detail?.ci && <CiBadge ci={detail.ci} />}
|
|
109
128
|
</div>
|
|
110
|
-
<span className="text-
|
|
129
|
+
<span className="text-[13px] font-medium leading-snug text-ink">{item.title}</span>
|
|
111
130
|
<LabelChips labels={item.labels} max={6} />
|
|
112
131
|
</div>
|
|
113
132
|
<a
|
|
@@ -116,7 +135,7 @@ export function ItemView({ item, detail, loading, error, credential, write, onBa
|
|
|
116
135
|
rel="noopener noreferrer"
|
|
117
136
|
title="Open on the host"
|
|
118
137
|
aria-label="Open on the host"
|
|
119
|
-
className=
|
|
138
|
+
className={`flex-shrink-0 cursor-pointer rounded p-1 text-ink/60 transition-colors hover:bg-ink/5 hover:text-ink ${FOCUS}`}
|
|
120
139
|
>
|
|
121
140
|
<Glyph path={ICON.external} size={13} />
|
|
122
141
|
</a>
|
|
@@ -124,36 +143,38 @@ export function ItemView({ item, detail, loading, error, credential, write, onBa
|
|
|
124
143
|
|
|
125
144
|
<div className="min-h-0 flex-1 overflow-y-auto scrollbar-overlay-container">
|
|
126
145
|
{error && (
|
|
127
|
-
<div className="px-2.5 py-2">
|
|
128
|
-
<p className="text-[11px] text-error">{error}</p>
|
|
146
|
+
<div className="flex flex-col items-start gap-1.5 px-2.5 py-2">
|
|
147
|
+
<p className="text-[11px] leading-relaxed text-error-text">{error}</p>
|
|
148
|
+
<button
|
|
149
|
+
type="button"
|
|
150
|
+
onClick={onRetry}
|
|
151
|
+
className={`cursor-pointer rounded border border-ink/20 px-2.5 py-1 text-[10px] text-ink transition-colors hover:bg-ink/5 ${FOCUS}`}
|
|
152
|
+
>
|
|
153
|
+
Try again
|
|
154
|
+
</button>
|
|
129
155
|
</div>
|
|
130
156
|
)}
|
|
131
157
|
|
|
132
|
-
{!detail && loading &&
|
|
133
|
-
<div className="flex items-center justify-center gap-2 py-6 text-ink/40">
|
|
134
|
-
<span className="inline-block h-3 w-3 animate-spin rounded-full border border-ink/30 border-t-ink/70" />
|
|
135
|
-
<span className="text-[11px]">Reading…</span>
|
|
136
|
-
</div>
|
|
137
|
-
)}
|
|
158
|
+
{!detail && loading && <DetailSkeleton />}
|
|
138
159
|
|
|
139
160
|
{detail && (
|
|
140
161
|
<>
|
|
141
162
|
{detail.facts.length > 0 && (
|
|
142
|
-
<div className="flex flex-wrap gap-x-3 gap-y-1 border-b border-ink/8 px-2.5 py-
|
|
163
|
+
<div className="flex flex-wrap gap-x-3 gap-y-1 border-b border-ink/8 px-2.5 py-2">
|
|
143
164
|
{detail.facts.map((fact) => (
|
|
144
165
|
<span key={fact.label} className="flex items-baseline gap-1 text-[10px]">
|
|
145
|
-
<span className="uppercase tracking-wider text-ink/
|
|
146
|
-
<span className="font-mono text-ink/
|
|
166
|
+
<span className="uppercase tracking-wider text-ink/55">{fact.label}</span>
|
|
167
|
+
<span className="font-mono text-ink/80">{fact.value}</span>
|
|
147
168
|
</span>
|
|
148
169
|
))}
|
|
149
170
|
</div>
|
|
150
171
|
)}
|
|
151
172
|
|
|
152
|
-
<div className="px-2.5 py-2">
|
|
173
|
+
<div className="px-2.5 py-2.5">
|
|
153
174
|
{detail.body.trim() ? (
|
|
154
175
|
<Markdown content={detail.body} className="prose-content text-xs" />
|
|
155
176
|
) : (
|
|
156
|
-
<p className="text-[11px] italic text-ink/
|
|
177
|
+
<p className="text-[11px] italic text-ink/55">No description.</p>
|
|
157
178
|
)}
|
|
158
179
|
</div>
|
|
159
180
|
|
|
@@ -162,8 +183,9 @@ export function ItemView({ item, detail, loading, error, credential, write, onBa
|
|
|
162
183
|
|
|
163
184
|
{detail.comments.length > 0 && (
|
|
164
185
|
<div className="border-t border-ink/10">
|
|
165
|
-
<div className="px-2.5 py-1
|
|
166
|
-
|
|
186
|
+
<div className="flex items-baseline gap-1.5 px-2.5 py-1.5">
|
|
187
|
+
<span className="text-[10px] font-semibold uppercase tracking-wider text-ink/55">Conversation</span>
|
|
188
|
+
<span className="font-mono text-[10px] tabular-nums text-ink/55">{detail.comments.length}</span>
|
|
167
189
|
</div>
|
|
168
190
|
{detail.comments.map((comment) => (
|
|
169
191
|
<Comment key={comment.id} comment={comment} />
|
|
@@ -172,9 +194,9 @@ export function ItemView({ item, detail, loading, error, credential, write, onBa
|
|
|
172
194
|
)}
|
|
173
195
|
|
|
174
196
|
{detail.notes.length > 0 && (
|
|
175
|
-
<div className="border-t border-ink/8 px-2.5 py-1.5">
|
|
197
|
+
<div className="flex flex-col gap-0.5 border-t border-ink/8 px-2.5 py-1.5">
|
|
176
198
|
{detail.notes.map((note) => (
|
|
177
|
-
<p key={note} className="text-[10px] text-ink/
|
|
199
|
+
<p key={note} className="text-[10px] leading-relaxed text-ink/60">
|
|
178
200
|
{note}
|
|
179
201
|
</p>
|
|
180
202
|
))}
|
|
@@ -185,13 +207,7 @@ export function ItemView({ item, detail, loading, error, credential, write, onBa
|
|
|
185
207
|
</div>
|
|
186
208
|
|
|
187
209
|
{detail && (
|
|
188
|
-
<WriteBar
|
|
189
|
-
item={item}
|
|
190
|
-
detail={detail}
|
|
191
|
-
capabilities={capabilities}
|
|
192
|
-
write={write}
|
|
193
|
-
{...(credential ? { credential } : {})}
|
|
194
|
-
/>
|
|
210
|
+
<WriteBar item={item} capabilities={capabilities} write={write} {...(credential ? { credential } : {})} />
|
|
195
211
|
)}
|
|
196
212
|
</div>
|
|
197
213
|
);
|