@kortix/ui 0.15.11 → 0.16.1
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/dist/_vendor/kortix-shared.js +485 -187
- package/dist/_vendor/shared/my-kortix-agent.d.ts +5 -3
- package/dist/_vendor/shared/session/attachment-tile.d.ts +8 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +3 -0
- package/dist/access/access/copy-row.d.ts +7 -1
- package/dist/access/access/copy-row.js +2 -2
- package/dist/animated-copy-icon.js +2 -1
- package/dist/browser/sandbox-browser-chrome.d.ts +2 -1
- package/dist/browser/sandbox-browser-chrome.js +1 -1
- package/dist/customize/agents/agent-cover-card.d.ts +1 -1
- package/dist/customize/agents/agent-cover-card.js +10 -2
- package/dist/customize/agents/agent-filter.js +3 -1
- package/dist/customize/agents/agent-overview.d.ts +10 -0
- package/dist/customize/agents/agent-overview.js +5 -4
- package/dist/customize/agents/agent-page-chrome.d.ts +5 -6
- package/dist/customize/agents/agent-page-chrome.js +16 -13
- package/dist/customize/agents/agent-page.js +6 -28
- package/dist/customize/agents/agent-tabs.d.ts +1 -0
- package/dist/customize/agents/agent-tabs.js +1 -0
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/agents/create-agent-modal.d.ts +9 -0
- package/dist/customize/agents/create-agent-modal.js +21 -3
- package/dist/customize/agents/use-default-agent.js +2 -2
- package/dist/customize/connectors/connector-identity.d.ts +11 -2
- package/dist/customize/connectors/connector-identity.js +16 -4
- package/dist/customize/connectors/connectors-page.js +10 -6
- package/dist/customize/connectors/detail/app-page.js +2 -2
- package/dist/customize/connectors/install/install-dialog.d.ts +2 -0
- package/dist/customize/connectors/install/install-dialog.js +6 -1
- package/dist/customize/connectors/use-agent-access.d.ts +1 -0
- package/dist/customize/evals/eval-compare-view.d.ts +10 -0
- package/dist/customize/evals/eval-compare-view.js +68 -0
- package/dist/customize/evals/eval-dataset-view.d.ts +20 -0
- package/dist/customize/evals/eval-dataset-view.js +81 -0
- package/dist/customize/evals/eval-datasets-page.d.ts +25 -0
- package/dist/customize/evals/eval-datasets-page.js +91 -0
- package/dist/customize/evals/eval-job-view.d.ts +12 -0
- package/dist/customize/evals/eval-job-view.js +360 -0
- package/dist/customize/evals/eval-jobs-page.d.ts +4 -0
- package/dist/customize/evals/eval-jobs-page.js +69 -0
- package/dist/customize/evals/eval-meta.d.ts +97 -0
- package/dist/customize/evals/eval-meta.js +228 -0
- package/dist/customize/evals/eval-task-view.d.ts +13 -0
- package/dist/customize/evals/eval-task-view.js +123 -0
- package/dist/customize/evals/eval-tasks-page.d.ts +8 -0
- package/dist/customize/evals/eval-tasks-page.js +56 -0
- package/dist/customize/evals/eval-ui.d.ts +97 -0
- package/dist/customize/evals/eval-ui.js +153 -0
- package/dist/customize/evals/evals-page.d.ts +10 -0
- package/dist/customize/evals/evals-page.js +56 -0
- package/dist/customize/evals/run-eval-modal.d.ts +28 -0
- package/dist/customize/evals/run-eval-modal.js +167 -0
- package/dist/customize/project-settings/project-admin-sections.d.ts +3 -2
- package/dist/customize/project-settings/project-admin-sections.js +6 -1
- package/dist/customize/providers/provider-connect.d.ts +13 -0
- package/dist/customize/providers/provider-connect.js +29 -5
- package/dist/customize/providers/provider-sheet.js +5 -4
- package/dist/customize/sections/view/gateway/gateway-overview.d.ts +5 -0
- package/dist/customize/sections/view/gateway/gateway-overview.js +32 -6
- package/dist/customize/sections/view/gateway/routing-parts.d.ts +6 -0
- package/dist/customize/sections/view/gateway/routing-parts.js +21 -13
- package/dist/customize/sections/view/git-view.d.ts +19 -1
- package/dist/customize/sections/view/git-view.js +7 -3
- package/dist/customize/sections/view/manifest-issue-list.d.ts +16 -0
- package/dist/customize/sections/view/manifest-issue-list.js +41 -0
- package/dist/customize/sections/view/manifest-issues-row.d.ts +24 -0
- package/dist/customize/sections/view/manifest-issues-row.js +39 -0
- package/dist/customize/sections/view/sandbox-provider-coverage.d.ts +7 -1
- package/dist/customize/sections/view/sandbox-provider-coverage.js +7 -5
- package/dist/customize/sections/view/secrets-view.d.ts +13 -0
- package/dist/customize/sections/view/secrets-view.js +10 -6
- package/dist/customize/sections/view/subscription-usage.d.ts +2 -7
- package/dist/customize/sections/view/subscription-usage.js +4 -8
- package/dist/customize/settings/settings-tab-header.js +12 -3
- package/dist/customize/settings/tabs/experimental-tab.d.ts +16 -5
- package/dist/customize/settings/tabs/experimental-tab.js +36 -11
- package/dist/customize/settings/tabs/general-tab.js +1 -1
- package/dist/customize/settings/tabs/sandbox-tab.d.ts +10 -0
- package/dist/customize/settings/tabs/sandbox-tab.js +27 -4
- package/dist/customize/settings/tabs/snapshots-tab.d.ts +31 -0
- package/dist/customize/settings/tabs/snapshots-tab.js +61 -5
- package/dist/customize/settings/tabs/workspace-keys.js +6 -3
- package/dist/customize/shared/capability-page-shell.js +9 -1
- package/dist/customize/shared/catalog/catalog-card.d.ts +1 -1
- package/dist/customize/shared/catalog/catalog-card.js +15 -5
- package/dist/customize/shared/customize-tab-bar.js +1 -1
- package/dist/customize/shared/new-entity-menu.d.ts +1 -1
- package/dist/customize/shared/new-entity-menu.js +38 -1
- package/dist/customize/triggers/runtime-triggers.d.ts +4 -0
- package/dist/customize/triggers/runtime-triggers.js +21 -2
- package/dist/customize/triggers/schedule/post-to-field.js +2 -2
- package/dist/customize/triggers/schedule-view.js +2 -1
- package/dist/files/project/components/drive-explorer.js +33 -70
- package/dist/files/project/components/drive-grid-view.d.ts +2 -31
- package/dist/files/project/components/drive-grid-view.js +12 -22
- package/dist/files/project/components/drive-list-view.d.ts +3 -30
- package/dist/files/project/components/drive-list-view.js +8 -18
- package/dist/files/project/components/drive-selection-bar.d.ts +4 -5
- package/dist/files/project/components/drive-selection-bar.js +13 -20
- package/dist/files/project/components/explorer-listing.d.ts +48 -0
- package/dist/files/project/components/explorer-listing.js +64 -0
- package/dist/files/project/components/file-explorer-page.js +7 -204
- package/dist/files/project/components/file-thumbnail.js +3 -1
- package/dist/files/project/components/manifest-issue-mark.d.ts +9 -0
- package/dist/files/project/components/manifest-issue-mark.js +26 -0
- package/dist/files/project/hooks/use-change-requests.d.ts +10 -0
- package/dist/files/project/hooks/use-change-requests.js +17 -0
- package/dist/files/project/manifest-annotations.d.ts +16 -0
- package/dist/files/project/manifest-annotations.js +19 -0
- package/dist/files/project/store/version-store.d.ts +1 -1
- package/dist/files/project/upload-batch.d.ts +20 -0
- package/dist/files/project/upload-batch.js +20 -0
- package/dist/files/runtime/hooks/use-binary-blob.js +3 -2
- package/dist/files/runtime/hooks/use-file-content.js +3 -2
- package/dist/files/runtime/hooks/use-file-list.js +1 -2
- package/dist/files/runtime/hooks/use-file-mutations.js +69 -6
- package/dist/files/runtime/hooks/use-file-refresh.d.ts +4 -0
- package/dist/files/runtime/hooks/use-file-refresh.js +6 -0
- package/dist/files/tree/components/file-tree-item.js +1 -4
- package/dist/files/viewer/file-annotations.d.ts +18 -0
- package/dist/files/viewer/file-annotations.js +21 -0
- package/dist/files/viewer/file-content-renderer.js +1 -1
- package/dist/files/viewer/file-viewer.js +2 -1
- package/dist/files/viewer/index.d.ts +1 -0
- package/dist/files/viewer/index.js +1 -0
- package/dist/files/viewer/use-file-content-state.js +8 -1
- package/dist/i18n/en.d.ts +497 -46
- package/dist/i18n/en.js +538 -87
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +0 -4
- package/dist/icons/caret-right-solid.d.ts +11 -0
- package/dist/icons/caret-right-solid.js +15 -0
- package/dist/internal/auth/auth-art.d.ts +12 -0
- package/dist/internal/auth/auth-art.js +118 -0
- package/dist/internal/auth/auth-card-shell.d.ts +14 -10
- package/dist/internal/auth/auth-card-shell.js +20 -31
- package/dist/internal/auth/auth-consent.d.ts +3 -1
- package/dist/internal/auth/auth-consent.js +2 -2
- package/dist/internal/auth/auth-primitives.d.ts +26 -1
- package/dist/internal/auth/auth-primitives.js +37 -8
- package/dist/internal/connector-logo/connector-logo.d.ts +2 -1
- package/dist/internal/connector-logo/connector-logo.js +11 -2
- package/dist/internal/files/file-read-retry.d.ts +18 -2
- package/dist/internal/files/file-read-retry.js +42 -4
- package/dist/internal/hooks/projects/use-new-project-session.js +5 -10
- package/dist/internal/hooks/use-auto-scroll-physics.d.ts +1 -1
- package/dist/internal/hooks/use-auto-scroll-physics.js +2 -10
- package/dist/internal/hooks/use-reduced-motion.d.ts +4 -0
- package/dist/internal/hooks/use-reduced-motion.js +12 -0
- package/dist/internal/hooks/use-save-shortcut.d.ts +8 -0
- package/dist/internal/hooks/use-save-shortcut.js +28 -0
- package/dist/internal/layout/connect-mcp-modal.d.ts +1 -1
- package/dist/internal/layout/connect-mcp-modal.js +9 -4
- package/dist/internal/layout/panel-chrome.d.ts +28 -0
- package/dist/internal/layout/panel-chrome.js +27 -0
- package/dist/internal/layout/project-page-header.js +5 -1
- package/dist/internal/lib/browser-noise/rules/webview.js +16 -0
- package/dist/internal/lib/manifest-health.d.ts +25 -1
- package/dist/internal/lib/manifest-health.js +56 -0
- package/dist/internal/lib/project-preamble.js +1 -1
- package/dist/internal/lib/web-notifications.d.ts +1 -1
- package/dist/internal/lib/web-notifications.js +3 -0
- package/dist/internal/notifications/notification-inbox.js +2 -1
- package/dist/internal/notifications/notification-rows.d.ts +1 -1
- package/dist/internal/notifications/notification-rows.js +15 -1
- package/dist/internal/selection/selection-bar.d.ts +2 -8
- package/dist/internal/selection/selection-bar.js +15 -38
- package/dist/internal/stores/active-space-store.d.ts +1 -1
- package/dist/internal/stores/browser-recents-store.d.ts +1 -1
- package/dist/internal/stores/current-account-store.d.ts +1 -1
- package/dist/internal/stores/first-chat-store.d.ts +1 -1
- package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
- package/dist/internal/stores/session-browser-store.d.ts +1 -1
- package/dist/internal/stores/session-expanded-store.d.ts +1 -1
- package/dist/internal/stores/session-filter-store.d.ts +1 -1
- package/dist/internal/stores/session-history-view-store.d.ts +1 -1
- package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
- package/dist/internal/stores/sound-store.d.ts +1 -1
- package/dist/internal/stores/tab-store.d.ts +1 -1
- package/dist/internal/stores/user-preferences-store.d.ts +9 -1
- package/dist/internal/stores/user-preferences-store.js +2 -0
- package/dist/internal/stores/web-notification-store.d.ts +1 -1
- package/dist/lib/base-ui-compat.js +28 -1
- package/dist/lib/dotmatrix-hooks.d.ts +1 -0
- package/dist/lib/dotmatrix-hooks.js +3 -13
- package/dist/lib/reduced-motion.d.ts +10 -0
- package/dist/lib/reduced-motion.js +104 -0
- package/dist/lib/routes.d.ts +9 -0
- package/dist/lib/routes.js +7 -4
- package/dist/markdown/artifact-link.d.ts +11 -0
- package/dist/markdown/artifact-link.js +62 -0
- package/dist/markdown/code/index.d.ts +1 -1
- package/dist/markdown/code/index.js +1 -1
- package/dist/markdown/code/inline-code.d.ts +1 -1
- package/dist/markdown/code/inline-code.js +1 -1
- package/dist/markdown/genui/components/map-canvas.js +2 -1
- package/dist/markdown/index.d.ts +3 -1
- package/dist/markdown/index.js +2 -1
- package/dist/markdown/{code/inline-chip.js → inline-chip.js} +2 -2
- package/dist/markdown/inline-code-text.d.ts +34 -0
- package/dist/markdown/inline-code-text.js +68 -0
- package/dist/markdown/setup-links/approval-decision.js +3 -3
- package/dist/markdown/soft-breaks.d.ts +21 -0
- package/dist/markdown/soft-breaks.js +33 -0
- package/dist/markdown/unified-markdown.d.ts +9 -1
- package/dist/markdown/unified-markdown.js +31 -9
- package/dist/primitives/action-bar.d.ts +50 -0
- package/dist/primitives/action-bar.js +87 -0
- package/dist/primitives/calendar.js +4 -2
- package/dist/primitives/inline-meta.js +2 -2
- package/dist/primitives/kortix-loader.js +2 -1
- package/dist/primitives/modal.d.ts +1 -1
- package/dist/primitives/paper-wallpaper-shaders.d.ts +1 -0
- package/dist/primitives/paper-wallpaper-shaders.js +6 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/primitives/resize-seam.d.ts +3 -2
- package/dist/primitives/resize-seam.js +4 -3
- package/dist/primitives/settings-section-header.d.ts +30 -1
- package/dist/primitives/settings-section-header.js +37 -0
- package/dist/primitives/sliding-tab-indicator.js +2 -1
- package/dist/primitives/switch.js +15 -8
- package/dist/primitives/text-shimmer.js +6 -0
- package/dist/primitives/toast-clearance.d.ts +52 -0
- package/dist/primitives/toast-clearance.js +116 -0
- package/dist/primitives/toast.d.ts +3 -1
- package/dist/primitives/toast.js +2 -0
- package/dist/primitives/typed-title.js +1 -1
- package/dist/primitives/wallpaper-shaders.js +1 -1
- package/dist/session/actions/project-session-list-helpers.d.ts +16 -0
- package/dist/session/actions/project-session-list-helpers.js +18 -0
- package/dist/session/agents/agent-model.d.ts +1 -0
- package/dist/session/agents/agent-model.js +2 -1
- package/dist/session/agents/agent-strip.js +10 -4
- package/dist/session/agents/workflow-run-controls.d.ts +27 -4
- package/dist/session/agents/workflow-run-controls.js +63 -10
- package/dist/session/composer/ComposerCard.js +3 -0
- package/dist/session/composer/agent-selector.js +6 -4
- package/dist/session/composer/animated-placeholder.js +2 -1
- package/dist/session/composer/attachment-tile.d.ts +2 -2
- package/dist/session/composer/attachment-tile.js +25 -3
- package/dist/session/composer/composer-agent-access.d.ts +10 -1
- package/dist/session/composer/composer-agent-access.js +18 -4
- package/dist/session/composer/composer-chat-input.js +7 -2
- package/dist/session/composer/composer.d.ts +2 -2
- package/dist/session/composer/composer.js +7 -6
- package/dist/session/composer/hooks/use-file-search.d.ts +12 -2
- package/dist/session/composer/hooks/use-file-search.js +71 -7
- package/dist/session/composer/menus/menu-items.js +6 -2
- package/dist/session/composer/menus/menu-shell.d.ts +3 -1
- package/dist/session/composer/menus/menu-shell.js +2 -2
- package/dist/session/composer/menus/slash-menu.d.ts +7 -0
- package/dist/session/composer/menus/slash-menu.js +48 -1
- package/dist/session/composer/use-instant-session-send.js +7 -1
- package/dist/session/header/session-reminders-indicator.js +3 -2
- package/dist/session/header/session-site-header.js +24 -6
- package/dist/session/media/sandbox-url-detector.js +1 -1
- package/dist/session/models/model-connection-gate.js +2 -1
- package/dist/session/models/model-selector.js +1 -1
- package/dist/session/models/subscription-switcher.d.ts +7 -0
- package/dist/session/models/subscription-switcher.js +52 -10
- package/dist/session/models/subscription-windows.d.ts +2 -0
- package/dist/session/models/subscription-windows.js +2 -0
- package/dist/session/outcomes/session-outcomes-provider.js +14 -7
- package/dist/session/panel/action-panel.js +8 -19
- package/dist/session/panel/easy/app-preview.d.ts +4 -1
- package/dist/session/panel/easy/app-preview.js +95 -33
- package/dist/session/panel/easy/apps-card.js +6 -11
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.d.ts +14 -0
- package/dist/session/panel/easy/changes-card.js +60 -0
- package/dist/session/panel/easy/context-card.d.ts +5 -1
- package/dist/session/panel/easy/context-card.js +13 -28
- package/dist/session/panel/easy/context-meter.d.ts +18 -0
- package/dist/session/panel/easy/context-meter.js +73 -0
- package/dist/session/panel/easy/detail-view.d.ts +1 -1
- package/dist/session/panel/easy/detail-view.js +24 -21
- package/dist/session/panel/easy/easy-panel.js +7 -5
- package/dist/session/panel/easy/file-preview.js +3 -1
- package/dist/session/panel/easy/frame-history.d.ts +91 -0
- package/dist/session/panel/easy/frame-history.js +198 -0
- package/dist/session/panel/easy/outputs-card.d.ts +10 -0
- package/dist/session/panel/easy/outputs-card.js +28 -31
- package/dist/session/panel/easy/panel-card.d.ts +1 -3
- package/dist/session/panel/easy/panel-card.js +24 -8
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/easy/step-icon.d.ts +4 -1
- package/dist/session/panel/easy/step-icon.js +2 -2
- package/dist/session/panel/session-action-panel-column.d.ts +5 -0
- package/dist/session/panel/session-action-panel-column.js +198 -101
- package/dist/session/panel/session-desktop.js +5 -1
- package/dist/session/panel/session-diff-viewer.d.ts +3 -1
- package/dist/session/panel/session-diff-viewer.js +7 -4
- package/dist/session/panel/session-panel-provider.js +29 -5
- package/dist/session/panel/shared/derive-panels.js +64 -4
- package/dist/session/status/session-busy-indicator.js +2 -1
- package/dist/session/status/session-error-banner.js +1 -1
- package/dist/session/thread/chat-minimap.js +2 -1
- package/dist/session/thread/session-body.js +4 -1
- package/dist/session/thread/session-chat.js +18 -3
- package/dist/session/thread/session-turn-meta-rows.d.ts +13 -5
- package/dist/session/thread/session-turn-meta-rows.js +33 -5
- package/dist/session/thread/transcript.d.ts +1 -2
- package/dist/session/thread/transcript.js +26 -24
- package/dist/session/thread/typing-indicator.d.ts +2 -2
- package/dist/session/thread/typing-indicator.js +10 -3
- package/dist/session/tool/tools/session-spawn-tool.js +3 -3
- package/dist/session/tool/tools/workflow-run-card.d.ts +11 -1
- package/dist/session/tool/tools/workflow-run-card.js +31 -7
- package/dist/session/tool/tools/workflow-run-cost.d.ts +29 -0
- package/dist/session/tool/tools/workflow-run-cost.js +75 -0
- package/dist/session/tool/tools/workflow-tool.d.ts +1 -1
- package/dist/session/tool/tools/workflow-tool.js +40 -15
- package/dist/session/turn/peer-message-row.js +1 -1
- package/dist/session/turn/queued-prompt-bubbles.d.ts +3 -2
- package/dist/session/turn/queued-prompt-bubbles.js +1 -1
- package/dist/session/turn/throttled-markdown.js +1 -1
- package/dist/styles/theme.css +68 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-terminal.js +1 -1
- package/dist/terminal/session-terminal-connect-bar.js +2 -1
- package/dist/test-utils/intl.d.ts +497 -46
- package/dist/workspace/admin/project-admin-dashboard.js +21 -7
- package/dist/workspace/admin/settings-search-landing.js +2 -1
- package/dist/workspace/calendar/calendar-dates.d.ts +31 -0
- package/dist/workspace/calendar/calendar-dates.js +64 -0
- package/dist/workspace/calendar/calendar-new-item.d.ts +11 -0
- package/dist/workspace/calendar/calendar-new-item.js +47 -0
- package/dist/workspace/calendar/calendar-page.d.ts +3 -0
- package/dist/workspace/calendar/calendar-page.js +177 -0
- package/dist/workspace/calendar/calendar-panel.d.ts +13 -0
- package/dist/workspace/calendar/calendar-panel.js +103 -0
- package/dist/workspace/calendar/calendar-people.d.ts +52 -0
- package/dist/workspace/calendar/calendar-people.js +117 -0
- package/dist/workspace/calendar/calendar-scheduled.d.ts +29 -0
- package/dist/workspace/calendar/calendar-scheduled.js +118 -0
- package/dist/workspace/calendar/calendar-views.d.ts +32 -0
- package/dist/workspace/calendar/calendar-views.js +124 -0
- package/dist/workspace/calendar/calendar-when.d.ts +14 -0
- package/dist/workspace/calendar/calendar-when.js +81 -0
- package/dist/workspace/calendar/mention-textarea.d.ts +19 -0
- package/dist/workspace/calendar/mention-textarea.js +84 -0
- package/dist/workspace/home/access-requests-bell.js +2 -1
- package/dist/workspace/inbox/workspace-inbox.d.ts +1 -1
- package/dist/workspace/inbox/workspace-inbox.js +1 -1
- package/dist/workspace/layout/project-files-view.js +2 -1
- package/dist/workspace/layout/project-home.js +2 -1
- package/dist/workspace/memory/memory-page-list.js +1 -1
- package/dist/workspace/new/workspace-handoff.js +2 -1
- package/dist/workspace/projects/modal/project-icon-field.js +2 -1
- package/dist/workspace/session-workspace.js +13 -12
- package/dist/workspace/setup/setup-banner.d.ts +4 -0
- package/dist/workspace/setup/setup-banner.js +57 -0
- package/dist/workspace/setup/setup-steps.d.ts +57 -0
- package/dist/workspace/setup/setup-steps.js +53 -0
- package/dist/workspace/setup/use-setup-steps.d.ts +18 -0
- package/dist/workspace/setup/use-setup-steps.js +57 -0
- package/dist/workspace/setup/workspace-setup-page.d.ts +10 -0
- package/dist/workspace/setup/workspace-setup-page.js +91 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +5 -1
- package/dist/workspace/sidebar/footer/project-calendar-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-calendar-nav.js +31 -0
- package/dist/workspace/sidebar/footer/project-chrome-nav.d.ts +14 -6
- package/dist/workspace/sidebar/footer/project-chrome-nav.js +37 -25
- package/dist/workspace/sidebar/footer/project-computer-nav.d.ts +17 -9
- package/dist/workspace/sidebar/footer/project-computer-nav.js +36 -26
- package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-download-app-nav.js +25 -13
- package/dist/workspace/sidebar/footer/project-inbox-nav.d.ts +8 -0
- package/dist/workspace/sidebar/footer/project-inbox-nav.js +29 -0
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.d.ts +3 -13
- package/dist/workspace/sidebar/footer/project-manifest-issues-alert.js +6 -48
- package/dist/workspace/sidebar/footer/project-mcp-nav.d.ts +7 -7
- package/dist/workspace/sidebar/footer/project-mcp-nav.js +31 -13
- package/dist/workspace/sidebar/footer/project-phone-app-nav.d.ts +10 -0
- package/dist/workspace/sidebar/footer/project-phone-app-nav.js +61 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.d.ts +21 -0
- package/dist/workspace/sidebar/footer/project-promo-cards.js +33 -0
- package/dist/workspace/sidebar/footer/promo-card.d.ts +41 -0
- package/dist/workspace/sidebar/footer/promo-card.js +47 -0
- package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +12 -4
- package/dist/workspace/sidebar/project-session-list.js +58 -26
- package/dist/workspace/sidebar/project-sidebar.js +2 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +2 -1
- package/dist/workspace/sidebar/session-brief-hover-card.d.ts +24 -0
- package/dist/workspace/sidebar/session-brief-hover-card.js +4 -3
- package/dist/workspace/sidebar/session-group-sections.d.ts +26 -7
- package/dist/workspace/sidebar/session-group-sections.js +121 -41
- package/dist/workspace/sidebar/sidebar-drill.js +6 -0
- package/dist/workspace/sidebar/sidebar-more-group.js +3 -2
- package/dist/workspace/sidebar/use-workspace-list.d.ts +7 -0
- package/dist/workspace/sidebar/use-workspace-list.js +11 -1
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +14 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +46 -2
- package/dist/workspace/space/space-tab-panels.js +1 -1
- package/dist/workspace/spaces/space-timeline.js +2 -2
- package/package.json +67 -10
- package/skills/kortix-ui/SKILL.md +2 -2
- package/skills/kortix-ui/references/modules.md +5 -3
- package/dist/session/thread/turn-share.d.ts +0 -16
- package/dist/session/thread/turn-share.js +0 -161
- package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +0 -11
- package/dist/workspace/sidebar/footer/promo-nav-row.js +0 -7
- /package/dist/markdown/{code/inline-chip.d.ts → inline-chip.d.ts} +0 -0
|
@@ -26,11 +26,11 @@ import { SessionDeleteModal } from '../../session/actions/session-delete-modal.j
|
|
|
26
26
|
import { subagentTitle } from '../../session/agents/agent-model.js';
|
|
27
27
|
import { SessionLabelsModal } from './modal/session-labels-modal.js';
|
|
28
28
|
import { ShareSessionModal } from './modal/share-session-modal.js';
|
|
29
|
-
import { getSessionDisplayTitle, groupChangeRequestsBySession, projectSessionsRefetchInterval, resolveSessionListViewState, shortRelative, starterSectionOf, } from '../../session/actions/project-session-list-helpers.js';
|
|
29
|
+
import { BACKGROUND_WORK_POLL_MS, getSessionDisplayTitle, groupChangeRequestsBySession, projectSessionsRefetchInterval, resolveSessionListViewState, sessionsWorkingInBackground, shortRelative, starterSectionOf, } from '../../session/actions/project-session-list-helpers.js';
|
|
30
30
|
import { SessionBriefDescription, SessionBriefCardHost, SessionBriefHoverCard, SubagentHoverCard, } from './session-brief-hover-card.js';
|
|
31
31
|
import { SessionFilterMenu } from './session-filter-menu.js';
|
|
32
32
|
import { SESSION_MENU_TRIGGER_CLASS, SESSION_ROW_HEIGHT_CLASS, SIDEBAR_PAGE_SIZE, ShowMoreButton, } from '../../session/list/session-list-chrome.js';
|
|
33
|
-
import { SessionGroupNameModal, SessionGroupSections, UngroupDropArea, startSessionDrag, useSessionGroupActions, } from './session-group-sections.js';
|
|
33
|
+
import { SessionGroupNameModal, SessionGroupSections, NewSessionGroupRow, keepFocusForNewGroup, markNewGroupFocus, nextSessionGroupName, sessionGroupSectionId, UngroupDropArea, startSessionDrag, useSessionGroupActions, } from './session-group-sections.js';
|
|
34
34
|
import { groupSessions, } from './session-grouping.js';
|
|
35
35
|
import { useSessionOpenIntent } from './session-open-intent.js';
|
|
36
36
|
import { GoalStatusMark, isReviewOverdue, SessionStatusMark } from '../../session/list/session-status-mark.js';
|
|
@@ -43,13 +43,13 @@ import { selectCollapsedSections, selectGroupMode, selectHiddenSections, selectL
|
|
|
43
43
|
import { shouldBeginSessionSwitch, useSessionSwitchStore } from '../../internal/stores/session-switch-store.js';
|
|
44
44
|
import { directSubsessions, createProjectSession, listChangeRequests, restartProjectSession, sessionParentId, stopProjectSession, } from '@kortix/sdk';
|
|
45
45
|
import { qk, useProjectSession, useProjectSessions, useRuntimeSupports, useSessionChildren, useFeatureFlag, useProjectSessionGroups, useSessionGoal, } from '@kortix/sdk/react';
|
|
46
|
-
import { ArchiveIcon, ArrowsSplitIcon,
|
|
46
|
+
import { ArchiveIcon, ArrowsSplitIcon, CheckIcon, DotsThreeIcon, FolderSimpleIcon, FolderSimpleMinusIcon, PlusIcon, PushPinIcon, PushPinSlashIcon, RobotIcon, GitForkIcon, PencilSimpleIcon, ArrowCounterClockwiseIcon as RotateCcw, ShareIcon as Share, SquareIcon as Square, TagIcon, TrashIcon, } from '@phosphor-icons/react';
|
|
47
47
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
48
48
|
import { formatDistanceToNowStrict } from 'date-fns';
|
|
49
49
|
import { UiLink, useUiPathname, useUiRouter, useUiSearchParams, useUiViewerId } from '../../providers/ui-provider.js';
|
|
50
|
-
import { useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
50
|
+
import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
|
|
51
51
|
import { useSessionListActions } from '../../session/actions/use-session-list-actions.js';
|
|
52
|
-
import {
|
|
52
|
+
import { CaretRightSolidIcon } from '../../icons/caret-right-solid.js';
|
|
53
53
|
const SESSION_RELATIVE_TIME_CLASS = 'text-muted-foreground block w-10 min-w-10 max-w-10 shrink-0 truncate text-right text-xs tabular-nums';
|
|
54
54
|
/** The same trigger on a device that cannot hover (touch).
|
|
55
55
|
*
|
|
@@ -113,6 +113,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
113
113
|
const groupFilter = groupsEnabled ? 'none' : undefined;
|
|
114
114
|
const groups = useMemo(() => (groupsEnabled ? (groupsQuery.data ?? []) : []), [groupsEnabled, groupsQuery.data]);
|
|
115
115
|
const groupActions = useSessionGroupActions(projectId, groups);
|
|
116
|
+
const tGroups = useTranslations('sidebar.sessionGroups');
|
|
116
117
|
const [groupToRename, setGroupToRename] = useState(null);
|
|
117
118
|
// `fileSessionId`: the row whose "New group…" opened the dialog goes into the new group.
|
|
118
119
|
const [groupCreate, setGroupCreate] = useState(null);
|
|
@@ -131,9 +132,14 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
131
132
|
labels,
|
|
132
133
|
group: groupFilter,
|
|
133
134
|
enabled: listsReady,
|
|
135
|
+
// One sidebar page, as the other sections read; "Load more" reads the next.
|
|
136
|
+
// Without a limit the server answered its default 50 rows (~145 KB), read
|
|
137
|
+
// again on every open and turn edge.
|
|
138
|
+
limit: SIDEBAR_PAGE_SIZE,
|
|
134
139
|
refetchInterval: (loaded) => projectSessionsRefetchInterval({
|
|
135
140
|
sessions: loaded,
|
|
136
141
|
hasOpenSession: Boolean(activeSessionId),
|
|
142
|
+
openSessionId: activeSessionId,
|
|
137
143
|
}),
|
|
138
144
|
// Focus IS the cross-tab signal this list has: a session started in
|
|
139
145
|
// another tab (the home send is the default creation path now) has no
|
|
@@ -141,6 +147,9 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
141
147
|
// sessions page already refetches on focus for the same reason.
|
|
142
148
|
refetchOnWindowFocus: true,
|
|
143
149
|
});
|
|
150
|
+
// A row that works where no stream reaches it (a run, a colleague, another
|
|
151
|
+
// chat) polls until it settles, on every route, not only a session page.
|
|
152
|
+
const backgroundWorkPoll = useCallback((loaded) => sessionsWorkingInBackground(loaded, activeSessionId) ? BACKGROUND_WORK_POLL_MS : false, [activeSessionId]);
|
|
144
153
|
// Runs other members started, and runs automation started. Each is its own
|
|
145
154
|
// paged query with the same top-level filter, so a busy trigger cannot push
|
|
146
155
|
// the viewer's own sessions out of their list.
|
|
@@ -152,6 +161,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
152
161
|
enabled: listsReady,
|
|
153
162
|
limit: SIDEBAR_PAGE_SIZE,
|
|
154
163
|
refetchOnWindowFocus: true,
|
|
164
|
+
refetchInterval: backgroundWorkPoll,
|
|
155
165
|
});
|
|
156
166
|
const automatedQuery = useProjectSessions(projectId, {
|
|
157
167
|
parent: 'root',
|
|
@@ -161,6 +171,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
161
171
|
enabled: listsReady,
|
|
162
172
|
limit: SIDEBAR_PAGE_SIZE,
|
|
163
173
|
refetchOnWindowFocus: true,
|
|
174
|
+
refetchInterval: backgroundWorkPoll,
|
|
164
175
|
});
|
|
165
176
|
// The viewer's pinned sessions, at the top (KRTX-2418). Any starter, any
|
|
166
177
|
// depth: a pin is the viewer's choice. A pinned row is not repeated below.
|
|
@@ -169,6 +180,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
169
180
|
labels,
|
|
170
181
|
limit: SIDEBAR_PAGE_SIZE,
|
|
171
182
|
refetchOnWindowFocus: true,
|
|
183
|
+
refetchInterval: backgroundWorkPoll,
|
|
172
184
|
});
|
|
173
185
|
const listActions = useSessionListActions(projectId);
|
|
174
186
|
// Open state of the tree: parent ids and `section:*` ids, persisted.
|
|
@@ -215,7 +227,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
215
227
|
// the sidebar lists. Never the whole history (565 KB measured on prod,
|
|
216
228
|
// polled every 60 s; KRTX-2316).
|
|
217
229
|
const { data: changeRequestData } = useQuery({
|
|
218
|
-
queryKey:
|
|
230
|
+
queryKey: changeRequestKeys.sidebarRecent(projectId),
|
|
219
231
|
queryFn: () => listChangeRequests(projectId, undefined, { limit: SIDEBAR_CHANGE_REQUEST_LIMIT }),
|
|
220
232
|
staleTime: 5_000,
|
|
221
233
|
refetchInterval: 60_000,
|
|
@@ -239,6 +251,7 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
239
251
|
const collapsedSections = useSessionFilterStore(selectCollapsedSections(projectId));
|
|
240
252
|
const collapsedSectionIds = useMemo(() => new Set(collapsedSections), [collapsedSections]);
|
|
241
253
|
const toggleSectionCollapsed = useSessionFilterStore((s) => s.toggleSectionCollapsed);
|
|
254
|
+
const collapseAllSections = useSessionFilterStore((s) => s.collapseAllSections);
|
|
242
255
|
// Open by default: the collapsed-sections store, as Channels and Direct
|
|
243
256
|
// messages. Closed by default (`secondary`): the expanded store, as Shared
|
|
244
257
|
// and Automated. Both persist per project.
|
|
@@ -382,10 +395,10 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
382
395
|
// that case here instead of letting `FadedScrollArea` render nothing with
|
|
383
396
|
// no explanation.
|
|
384
397
|
// `more`: no row yet, but a list has a next page. Its Load more renders below.
|
|
385
|
-
if (viewState !== 'more' && grouped.sections.length === 0 && visibleOtherCount === 0
|
|
398
|
+
if (viewState !== 'more' && grouped.sections.length === 0 && visibleOtherCount === 0) {
|
|
386
399
|
return (_jsx("div", { className: "text-muted-foreground px-2 pt-1 pb-2 text-xs", children: t('allSectionsHidden') }));
|
|
387
400
|
}
|
|
388
|
-
return (
|
|
401
|
+
return (_jsx(FadedScrollArea, { fadeColor: "from-background", className: "h-full min-h-0 space-y-px", children: groupsEnabled ? (_jsx(UngroupDropArea, { onDropSession: (sessionId) => void groupActions.move(sessionId, null), children: renderUngrouped(grouped) })) : (renderUngrouped(grouped)) }));
|
|
389
402
|
}
|
|
390
403
|
/** The sessions in no group: the grouped sections, Load more, Shared, Automated and the first chat. */
|
|
391
404
|
function renderUngrouped(grouped) {
|
|
@@ -396,15 +409,22 @@ export function ProjectSessionList({ projectId, secondary = false }) {
|
|
|
396
409
|
}
|
|
397
410
|
return (_jsxs("div", { className: cn('flex min-h-0 flex-col space-y-px',
|
|
398
411
|
// Below the spaces: the header alone while closed, an equal share of the column while open.
|
|
399
|
-
secondary ? (listOpen ? 'flex-1' : 'shrink-0') : 'h-full'), children: [
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
//
|
|
406
|
-
|
|
407
|
-
|
|
412
|
+
secondary ? (listOpen ? 'flex-1' : 'shrink-0') : 'h-full'), children: [listsReady && (pinnedQuery.sessions.length > 0 || pinnedQuery.hasNextPage || groups.length > 0 || groupCreate) && (_jsxs("div", { className: "max-h-[50%] min-h-0 shrink-0 space-y-px overflow-y-auto", children: [_jsx(StarterSection, { title: tPinArchive('section'), query: pinnedQuery, sessions: visiblePinned, open: !collapsedSectionIds.has(PINNED_SECTION_ID), onToggle: () => toggleSectionCollapsed(projectId, PINNED_SECTION_ID), renderNode: (session) => renderSessionNode(session, false), caretOnHover: true }), groups.length > 0 && (_jsx(SessionGroupSections, { projectId: projectId, groups: groups, labels: labels, collapsedSectionIds: collapsedSectionIds, onToggleSection: (sectionId) => toggleSectionCollapsed(projectId, sectionId), passesFacets: passesFacets, renderNode: (session) => renderSessionNode(session, false), actions: groupActions, onRename: setGroupToRename, onNewGroup: () => setGroupCreate({ fileSessionId: null }), onCollapseOthers: (groupId) => collapseAllSections(projectId, [
|
|
413
|
+
...Array.from(collapsedSectionIds).filter((id) => id !== sessionGroupSectionId(groupId)),
|
|
414
|
+
...groups
|
|
415
|
+
.filter((group) => group.group_id !== groupId)
|
|
416
|
+
.map((group) => sessionGroupSectionId(group.group_id)),
|
|
417
|
+
]) })), groupsEnabled && groupCreate && (
|
|
418
|
+
// A new group is named in place, at the end of the groups: no dialog.
|
|
419
|
+
_jsx(NewSessionGroupRow, { projectId: projectId, defaultName: nextSessionGroupName(groups, tGroups('newGroup')), onDone: (group) => {
|
|
420
|
+
const fileSessionId = groupCreate.fileSessionId;
|
|
421
|
+
setGroupCreate(null);
|
|
422
|
+
// The row whose "New group…" opened it goes in.
|
|
423
|
+
if (group && fileSessionId)
|
|
424
|
+
void groupActions.move(fileSessionId, group.group_id);
|
|
425
|
+
} }))] })), _jsxs(Disclosure, { open: listOpen, onOpenChange: toggleListOpen, className: "group/sessions flex min-h-0 flex-1 flex-col space-y-px", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(SessionListHeader, { projectId: projectId, sessions: sessions, reviewCountBySession: needsYouBySession, onMenuOpenChange: holdPeek, onNewGroup: groupsEnabled ? () => setGroupCreate({ fileSessionId: null }) : undefined, secondary: secondary }), _jsx(DisclosureContent, { className: "flex min-h-0 flex-1 flex-col", contentClassName: "flex min-h-0 flex-1 flex-col overflow-hidden", children: renderBody() })] }), _jsx(ShareSessionModal, { projectId: projectId, session: sessionToShare, open: !!sessionToShare, onOpenChange: (open) => !open && setSessionToShare(null), onSaved: () => queryClient.invalidateQueries({ queryKey: qk.project.sessionsScope(projectId) }) }), _jsx(SessionLabelsModal, { projectId: projectId, session: sessionToLabel, open: !!sessionToLabel, onOpenChange: (open) => !open && setSessionToLabel(null) }), _jsx(RenameSessionModal, { projectId: projectId, sessionId: sessionToRename?.id ?? null, currentName: sessionToRename?.name, open: !!sessionToRename, onOpenChange: (open) => !open && setSessionToRename(null) }), groupsEnabled && (_jsx(SessionGroupNameModal, { projectId: projectId, group: groupToRename, open: !!groupToRename, onOpenChange: (open) => {
|
|
426
|
+
if (!open)
|
|
427
|
+
setGroupToRename(null);
|
|
408
428
|
} })), _jsx(SessionDeleteModal, { projectId: projectId, sessionId: sessionToDelete?.id ?? null, sessionLabel: sessionToDelete?.label, open: !!sessionToDelete, onOpenChange: (open) => !open && setSessionToDelete(null) }), canShowSessionHoverCard && _jsx(SessionBriefCardHost, {})] }));
|
|
409
429
|
}
|
|
410
430
|
/** The `Sessions` row above the list. Lives here — not in `project-sidebar.tsx`
|
|
@@ -422,10 +442,10 @@ function SessionListHeader({ projectId, sessions, reviewCountBySession, onMenuOp
|
|
|
422
442
|
// Secondary: the header's controls show on hover or focus only, as the Channels header's `+`.
|
|
423
443
|
const controlClass = cn(SESSION_MENU_TRIGGER_CLASS, secondary &&
|
|
424
444
|
'opacity-0 group-focus-within/sessions-header:opacity-100 group-hover/sessions-header:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100');
|
|
425
|
-
return (_jsxs("div", { className: cn('group/sessions-header hover:bg-sidebar-row flex w-full shrink-0 flex-row items-center gap-1 rounded-md px-2 transition-colors', SESSION_ROW_HEIGHT_CLASS), children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('text-muted-foreground group-hover/sessions-header:text-sidebar-foreground flex min-w-0 flex-1 cursor-pointer flex-row items-center gap-1 self-stretch focus-visible:outline-none', secondary ? 'text-xs' : 'text-sm font-medium'), children: [_jsx("span", { className: "truncate", children: t('sessions') }), _jsx(
|
|
445
|
+
return (_jsxs("div", { className: cn('group/sessions-header hover:bg-sidebar-row flex w-full shrink-0 flex-row items-center gap-1 rounded-md px-2 transition-colors', SESSION_ROW_HEIGHT_CLASS), children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('text-muted-foreground group-hover/sessions-header:text-sidebar-foreground flex min-w-0 flex-1 cursor-pointer flex-row items-center gap-1 self-stretch focus-visible:outline-none', secondary ? 'text-xs' : 'text-sm font-medium'), children: [_jsx("span", { className: "truncate", children: t('sessions') }), _jsx(CaretRightSolidIcon, { "aria-hidden": true, className: "duration-normal size-4 shrink-0 opacity-0 transition-transform ease-out group-hover/sessions-header:opacity-100 group-data-[state=open]/sessions:rotate-90" })] }) }), secondary && (_jsx(Hint, { side: "top", label: t('newSession'), children: _jsx(Button, { asChild: true, variant: "ghost", size: "icon-xs", className: controlClass, children: _jsx(UiLink, { href: newSessionHref(projectId), "aria-label": t('newSession'), onClick: () => {
|
|
426
446
|
if (isMobile)
|
|
427
447
|
setOpenMobile(false);
|
|
428
|
-
}, children: _jsx(PlusIcon, { className: "size-3.5" }) }) }) })), onNewGroup && (_jsx(Hint, { side: "top", label: tGroups('newGroup'), children: _jsx(Button, { variant: "ghost", size: "icon-xs", type: "button", "aria-label": tGroups('newGroup'), className: controlClass, onClick: onNewGroup, children: _jsx(
|
|
448
|
+
}, children: _jsx(PlusIcon, { className: "size-3.5" }) }) }) })), onNewGroup && (_jsx(Hint, { side: "top", label: tGroups('newGroup'), children: _jsx(Button, { variant: "ghost", size: "icon-xs", type: "button", "aria-label": tGroups('newGroup'), className: controlClass, onClick: onNewGroup, children: _jsx(PlusIcon, { className: "size-3.5" }) }) })), sessions.length > 0 && (_jsxs(DropdownMenu, { onOpenChange: onMenuOpenChange, children: [_jsx(SessionFilterMenu, { projectId: projectId, sessions: sessions, reviewCountBySession: reviewCountBySession, align: "start" }), _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-xs", type: "button", "aria-label": t('sessionViewOptions'), className: controlClass, children: _jsx(DotsThreeIcon, { className: "size-4" }) }) })] }))] }));
|
|
429
449
|
}
|
|
430
450
|
/** Non-sticky by design: FadedScrollArea masks its own edges, and a sticky
|
|
431
451
|
* header fights that mask.
|
|
@@ -462,7 +482,7 @@ function SessionListSection({ section, projectId, sessions, reviewCountBySession
|
|
|
462
482
|
if (!showHeader) {
|
|
463
483
|
return _jsx("div", { className: "space-y-px", children: children });
|
|
464
484
|
}
|
|
465
|
-
return (_jsxs(Disclosure, { open: open, onOpenChange: onOpenChange, className: "group/section space-y-1", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('group/section-header text-muted-foreground flex items-center gap-1 px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS), children: [_jsx("span", { className: "truncate", children: sectionKey ? t(sectionKey) : section.label }), _jsx(
|
|
485
|
+
return (_jsxs(Disclosure, { open: open, onOpenChange: onOpenChange, className: "group/section space-y-1", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('group/section-header text-muted-foreground flex items-center gap-1 px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS), children: [_jsx("span", { className: "truncate", children: sectionKey ? t(sectionKey) : section.label }), _jsx(CaretRightSolidIcon, { "aria-hidden": true, className: "duration-normal size-4 shrink-0 opacity-0 transition-transform ease-out group-hover/section-header:opacity-100 group-data-[state=open]/section:rotate-90" }), _jsx(SessionSectionMenu, { projectId: projectId, sessions: sessions, reviewCountBySession: reviewCountBySession })] }) }), _jsx(DisclosureContent, { contentClassName: "space-y-px", children: children })] }));
|
|
466
486
|
}
|
|
467
487
|
/** The section header's own `⋯` — mounts the SAME `SessionFilterMenu` as the
|
|
468
488
|
* Sessions header (project-sidebar.tsx), no section-scoped filter state.
|
|
@@ -506,7 +526,7 @@ function ChildRunsToggle({ count, open, onToggle, clearOfMenu, }) {
|
|
|
506
526
|
}, className: cn('flex shrink-0 items-center gap-0.5 rounded-sm', open ? 'text-sidebar-foreground' : 'text-muted-foreground hover:text-sidebar-foreground', 'focus-visible:ring-kortix-base focus-visible:ring-[0.6px] focus-visible:outline-none',
|
|
507
527
|
// Reserve the `⋯` slot at rest. A toggle that slid out of the way on
|
|
508
528
|
// hover moved away from the pointer and put the menu under the click.
|
|
509
|
-
clearOfMenu && 'mr-6'), children: _jsx(CountBadge, { count: count, className: cn(open && 'bg-foreground/12') }) }));
|
|
529
|
+
clearOfMenu && 'mr-6'), children: _jsx(CountBadge, { "aria-hidden": true, count: count, className: cn(open && 'bg-foreground/12') }) }));
|
|
510
530
|
}
|
|
511
531
|
/**
|
|
512
532
|
* The Shared and Automated sections: top-level sessions another member or an
|
|
@@ -518,7 +538,7 @@ function StarterSection({ title, query, sessions, open, onToggle, renderNode, ca
|
|
|
518
538
|
// rows the viewer can see may sit past the first pages (KRTX-1727).
|
|
519
539
|
if (query.sessions.length === 0 && !query.hasNextPage)
|
|
520
540
|
return null;
|
|
521
|
-
return (_jsxs(Disclosure, { open: open, onOpenChange: onToggle, className: "group/section space-y-1", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('group/section-header text-muted-foreground flex items-center gap-1 px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS), children: [_jsx("span", { className: "truncate", children: title }), _jsx(
|
|
541
|
+
return (_jsxs(Disclosure, { open: open, onOpenChange: onToggle, className: "group/section space-y-1", transition: { duration: 0.15, ease: 'easeOut' }, children: [_jsx(DisclosureTrigger, { children: _jsxs("div", { className: cn('group/section-header text-muted-foreground flex items-center gap-1 px-2 text-sm font-medium', SESSION_ROW_HEIGHT_CLASS), children: [_jsx("span", { className: "truncate", children: title }), _jsx(CaretRightSolidIcon, { "aria-hidden": true, className: cn('duration-normal size-4 shrink-0 transition-[transform,opacity] ease-out group-data-[state=open]/section:rotate-90', caretOnHover &&
|
|
522
542
|
'opacity-0 group-hover/section-header:opacity-100 group-focus-visible/section-header:opacity-100') })] }) }), _jsxs(DisclosureContent, { contentClassName: "space-y-px", children: [sessions.map(renderNode), query.hasNextPage && (_jsx(ShowMoreButton, { loading: query.isFetchingNextPage, failed: query.isFetchNextPageError, label: t('loadMore'), onClick: () => query.fetchNextPage() }))] })] }));
|
|
523
543
|
}
|
|
524
544
|
/**
|
|
@@ -540,7 +560,16 @@ function ChildRunBranch({ continues, children }) {
|
|
|
540
560
|
}
|
|
541
561
|
function SpawnedSessions({ projectId, parentId, renderNode, }) {
|
|
542
562
|
const t = useTranslations('sidebar');
|
|
543
|
-
const
|
|
563
|
+
const [childrenWork, setChildrenWork] = useState(false);
|
|
564
|
+
// A workflow runner or a colleague works where no stream reaches it: the
|
|
565
|
+
// children poll while one of them works, so its row settles on any route.
|
|
566
|
+
const children = useSessionChildren(projectId, parentId, {
|
|
567
|
+
limit: SIDEBAR_PAGE_SIZE,
|
|
568
|
+
refetchInterval: childrenWork ? BACKGROUND_WORK_POLL_MS : undefined,
|
|
569
|
+
});
|
|
570
|
+
const anyChildWorks = sessionsWorkingInBackground(children.sessions, null);
|
|
571
|
+
if (anyChildWorks !== childrenWork)
|
|
572
|
+
setChildrenWork(anyChildWorks);
|
|
544
573
|
if (children.data === undefined) {
|
|
545
574
|
return (_jsx("div", { className: "px-2", children: _jsx(Skeleton, { className: "h-3 w-24 py-0", "aria-hidden": true }) }));
|
|
546
575
|
}
|
|
@@ -587,7 +616,7 @@ function ProjectSessionRow({ session, href, isActive, isSwitching, onNavigate, d
|
|
|
587
616
|
// same `reviewCount` prop, so they agree by construction rather than by luck.
|
|
588
617
|
const displayStatus = sessionDisplayStatus(session, reviewCount);
|
|
589
618
|
const waitingOn = awaitingAnswer ? 'answer' : 'review';
|
|
590
|
-
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: _jsx(SessionLeadingMark, { session: session, spawned: spawned, displayStatus: displayStatus, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests }) }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx(SessionTitle, { title: displayTitle, className: cn('min-w-0', isActive && 'font-medium') }) }), subagentCount + spawnedCount > 0 && onToggleChildRuns && (_jsx(ChildRunsToggle, { count: subagentCount + spawnedCount, open: childRunsOpen, onToggle: onToggleChildRuns, clearOfMenu: !hasIndicators })), hasIndicators && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-0 transition-none', 'pointer-coarse:hidden [@media(hover:none)]:hidden', 'group-hover/session-list:pointer-events-none group-hover/session-list:opacity-0', 'group-has-data-[state=open]/session-list:pointer-events-none group-has-data-[state=open]/session-list:opacity-0'), "data-session-indicators": "true", children: [showStarter && (_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", "data-session-source": "true", "data-session-starter": starter.type, children: _jsx(Hint, { side: "top", label: t('startedByLabel', { name: starter.label }), children: _jsx("span", { className: "text-muted-foreground flex size-5 items-center justify-center", children: _jsx(SessionStarterMark, { session: session, starter: starter, iconClassName: "size-3", avatarClassName: "size-5" }) }) }) })), !inSharedGroup && _jsx(SessionSharedIcon, { session: session })] }))] }));
|
|
619
|
+
const sessionLink = (_jsxs(HoverPrefetchLink, { href: href, prefetch: true, onClick: onNavigate, ...openIntent, "aria-busy": isSwitching || undefined, "aria-current": isActive ? 'page' : undefined, "aria-label": displayTitle, "aria-describedby": descriptionId, className: "focus-visible:ring-kortix-base flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-md py-1 focus-visible:ring-[0.6px] focus-visible:outline-none", children: [_jsx("div", { className: "size-4 shrink-0", children: _jsx(SessionLeadingMark, { session: session, spawned: spawned, displayStatus: displayStatus, reviewCount: reviewCount, waitingOn: waitingOn, changeRequests: changeRequests }) }), _jsx("span", { className: "min-w-0 flex-1", children: _jsx(SessionTitle, { title: displayTitle, className: cn('min-w-0', isActive && 'font-medium') }) }), subagentCount + spawnedCount > 0 && onToggleChildRuns && (_jsx(ChildRunsToggle, { count: subagentCount + spawnedCount, open: childRunsOpen, onToggle: onToggleChildRuns, clearOfMenu: !hasIndicators })), hasIndicators && (_jsxs("div", { className: cn('flex shrink-0 items-center gap-0 transition-none', 'pointer-coarse:hidden [@media(hover:none)]:hidden', 'group-hover/session-list:pointer-events-none group-hover/session-list:opacity-0', 'group-has-data-[state=open]/session-list:pointer-events-none group-has-data-[state=open]/session-list:opacity-0'), "data-session-indicators": "true", children: [showStarter && (_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", "data-session-source": "true", "data-session-starter": starter.type, children: _jsx(Hint, { side: "top", label: t('startedByLabel', { name: starter.label }), children: _jsx("span", { className: "text-muted-foreground flex size-5 items-center justify-center", children: _jsx(SessionStarterMark, { session: session, starter: starter, iconClassName: "size-3", avatarClassName: "size-5" }) }) }) })), !inSharedGroup && _jsx(SessionSharedIcon, { session: session })] }))] }));
|
|
591
620
|
return (_jsx("div", { className: "group/session-list block", onDragStart: onDragStart, children: _jsxs("div", { className: cn(
|
|
592
621
|
// --session-row-surface paints the row AND the title fade in the same
|
|
593
622
|
// style pass. Do not transition background — transition-colors made the
|
|
@@ -599,10 +628,13 @@ function ProjectSessionRow({ session, href, isActive, isSwitching, onNavigate, d
|
|
|
599
628
|
: 'text-muted-foreground hover:text-sidebar-foreground bg-(--session-row-surface) [--session-row-surface:var(--background)] hover:[--session-row-surface:var(--sidebar-row)]'), children: [canShowHoverCard ? (_jsx(SessionBriefHoverCard, { sessionId: session.session_id, title: displayTitle, status: displayStatus, createdAt: session.created_at, source: source, changeRequests: changeRequests, waitingOn: waitingOn, spawned: spawned, subagentCount: subagentCount, spawnedCount: spawnedCount, labels: session.labels, projectId: session.project_id, children: sessionLink })) : (sessionLink), _jsx(SessionBriefDescription, { projectId: session.project_id, sessionId: session.session_id, id: descriptionId, status: displayStatus, createdAt: session.created_at, source: source, changeRequests: changeRequests, waitingOn: waitingOn }), _jsxs(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", type: "button", "aria-label": t('sessionList.actionsFor', { title: displayTitle }), className: cn(SESSION_MENU_TRIGGER_CLASS, 'absolute top-1/2 right-1 z-10 -translate-y-1/2', 'bg-(--session-row-surface)', 'pointer-events-none opacity-0', 'group-hover/session-list:pointer-events-auto group-hover/session-list:opacity-100', 'focus-visible:pointer-events-auto focus-visible:opacity-100', 'data-[state=open]:pointer-events-auto data-[state=open]:opacity-100', SESSION_MENU_TRIGGER_TOUCH_CLASS), onClick: (e) => {
|
|
600
629
|
e.preventDefault();
|
|
601
630
|
e.stopPropagation();
|
|
602
|
-
}, children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "start", side: "right", className: "w-44", children: [_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onRename(session.session_id, displayTitle)), children: [_jsx(PencilSimpleIcon, {}), tI18nComplete.raw('text3064d79a295c')] }), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onEditLabels(session)), children: [_jsx(TagIcon, {}), t('labels.menu')] }), groups && onMoveToGroup && (_jsxs(DropdownMenuSub, { children: [_jsxs(DropdownMenuSubTrigger, { className: "cursor-pointer", children: [_jsx(FolderSimpleIcon, {}), tGroups('moveTo')] }), _jsxs(DropdownMenuSubContent, { className: "w-48", children: [groups.map((group) => {
|
|
631
|
+
}, children: _jsx(DotsThreeIcon, { className: "size-4" }) }) }), _jsxs(DropdownMenuContent, { align: "start", side: "right", className: "w-44", onCloseAutoFocus: keepFocusForNewGroup, children: [_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onRename(session.session_id, displayTitle)), children: [_jsx(PencilSimpleIcon, {}), tI18nComplete.raw('text3064d79a295c')] }), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onEditLabels(session)), children: [_jsx(TagIcon, {}), t('labels.menu')] }), groups && onMoveToGroup && (_jsxs(DropdownMenuSub, { children: [_jsxs(DropdownMenuSubTrigger, { className: "cursor-pointer", children: [_jsx(FolderSimpleIcon, {}), tGroups('moveTo')] }), _jsxs(DropdownMenuSubContent, { className: "w-48", children: [groups.map((group) => {
|
|
603
632
|
const current = session.group_id === group.group_id;
|
|
604
633
|
return (_jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: current, onSelect: () => deferAfterClose(() => onMoveToGroup(session.session_id, group.group_id)), children: [current ? _jsx(CheckIcon, {}) : _jsx(FolderSimpleIcon, {}), _jsx("span", { className: "truncate", children: group.name })] }, group.group_id));
|
|
605
|
-
}), groups.length > 0 && _jsx(DropdownMenuSeparator, {}), onNewGroupFor && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () =>
|
|
634
|
+
}), groups.length > 0 && _jsx(DropdownMenuSeparator, {}), onNewGroupFor && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => {
|
|
635
|
+
markNewGroupFocus();
|
|
636
|
+
deferAfterClose(() => onNewGroupFor(session.session_id));
|
|
637
|
+
}, children: [_jsx(PlusIcon, {}), tGroups('newGroupFromMenu')] })), session.group_id && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onMoveToGroup(session.session_id, null)), children: [_jsx(FolderSimpleMinusIcon, {}), tGroups('removeFromGroup')] }))] })] })), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onShare(session)), children: [_jsx(Share, {}), session.can_manage_sharing !== false
|
|
606
638
|
? 'Share'
|
|
607
639
|
: tI18nComplete.raw('textadc01d813da0')] }), session.pinned_at !== undefined && (_jsxs(_Fragment, { children: [_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onPin(session.session_id, !session.pinned_at)), children: [session.pinned_at ? _jsx(PushPinSlashIcon, {}) : _jsx(PushPinIcon, {}), tPinArchive(session.pinned_at ? 'unpin' : 'pin')] }), _jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onArchive(session.session_id, !session.archived_at)), children: [_jsx(ArchiveIcon, {}), tPinArchive(session.archived_at ? 'unarchive' : 'archive')] })] })), session.can_manage_lifecycle !== false && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: isRestarting, onSelect: () => deferAfterClose(() => onRestart(session.session_id, displayTitle)), children: [isRestarting ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(RotateCcw, {}), tI18nComplete.raw('text6b983a81e5e8')] })), sessionCanBeStopped(session) && session.can_manage_lifecycle !== false && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: isStopping, onSelect: () => deferAfterClose(() => onStop(session.session_id, displayTitle)), children: [isStopping ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(Square, {}), tI18nComplete.raw('textcae7d57bc067')] })), canFork && runtimeRootId && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", disabled: isForking, onSelect: () => deferAfterClose(() => onFork(runtimeRootId, href)), children: [isForking ? _jsx(Loading, { className: "size-4 shrink-0" }) : _jsx(GitForkIcon, {}), tI18nComplete.raw('text0e5f7f6732e0')] })), session.can_manage_lifecycle !== false && (_jsxs(DropdownMenuItem, { className: "cursor-pointer", onSelect: () => deferAfterClose(() => onDelete(session.session_id, displayTitle)), children: [_jsx(TrashIcon, {}), tI18nComplete.raw('texte2d0a54968ea')] }))] })] })] }) }));
|
|
608
640
|
}
|
|
@@ -7,9 +7,7 @@ import { Kbd, KbdGroup } from '../../primitives/kbd.js';
|
|
|
7
7
|
import { Sidebar, SidebarContent, SidebarGroup, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarRail, useSidebar, } from '../../primitives/sidebar.js';
|
|
8
8
|
import { ComputerConnectModal } from '../../internal/tunnel/computer-connect.js';
|
|
9
9
|
import { ConnectMcpModal } from '../../internal/layout/connect-mcp-modal.js';
|
|
10
|
-
import {
|
|
11
|
-
import { ProjectComputerNavItem } from './footer/project-computer-nav.js';
|
|
12
|
-
import { ProjectDownloadAppNavItem } from './footer/project-download-app-nav.js';
|
|
10
|
+
import { ProjectPromoCards } from './footer/project-promo-cards.js';
|
|
13
11
|
import { ProjectManifestIssuesAlert } from './footer/project-manifest-issues-alert.js';
|
|
14
12
|
import { ProjectSandboxAlert } from './footer/project-sandbox-alert.js';
|
|
15
13
|
import { ProjectRepositoryDisconnectedAlert } from '../repository-disconnected.js';
|
|
@@ -27,7 +25,6 @@ import { useBillingAccountId } from '../../internal/stores/billing-account-conte
|
|
|
27
25
|
import { useFeatureFlag } from '@kortix/sdk/react';
|
|
28
26
|
import { AppsModal } from '../../internal/apps-and-extensions/apps-modal.js';
|
|
29
27
|
import { useAppsModalStore } from '../../internal/stores/apps-modal-store.js';
|
|
30
|
-
import { ProjectChromeNavItem } from './footer/project-chrome-nav.js';
|
|
31
28
|
import { CHROME_UI_ENABLED } from '../../internal/chrome/use-chrome-offered.js';
|
|
32
29
|
import { MagnifyingGlassIcon, NavigationArrowIcon, } from '@phosphor-icons/react';
|
|
33
30
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
@@ -114,7 +111,7 @@ export function ProjectSidebar({ projectId, menu, onOpenSearch, onOpenDownloadAp
|
|
|
114
111
|
}, [handleNewSession]);
|
|
115
112
|
// The connect rows and the upgrade call to action. Spaces on (`chat`), they
|
|
116
113
|
// live inside "More": the bottom of the sidebar is More and the status alerts.
|
|
117
|
-
const connectRows = (_jsxs(_Fragment, { children: [_jsx("li", { className: "not-has-[li]:hidden", children:
|
|
114
|
+
const connectRows = (_jsxs(_Fragment, { children: [_jsx("li", { className: "not-has-[li]:hidden", children: _jsx("ul", { className: "pb-1", children: _jsx(ProjectPromoCards, { projectId: projectId, onOpenMcp: () => setConnectMcpOpen(true), onOpenComputer: () => setComputerConnectOpen(true), onOpenChrome: chrome ? () => useAppsModalStore.getState().setOpen(true) : undefined, onOpenDownloadApp: onOpenDownloadApp }) }) }), _jsx(SidebarUpgradeButton, { accountId: accountId })] }));
|
|
118
115
|
return (
|
|
119
116
|
// The New agent modal mounts beside <Sidebar>, outside the mobile sheet.
|
|
120
117
|
_jsxs(NewAgentModalProvider, { projectId: projectId, children: [_jsxs(Sidebar, { collapsible: "offcanvas", variant: "inset",
|
|
@@ -9,6 +9,7 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
9
9
|
import { HoverPrefetchLink } from '../../internal/components/hover-prefetch-link.js';
|
|
10
10
|
import { useIsMobile } from '../../internal/hooks/index.js';
|
|
11
11
|
import { reviewHref } from '../../internal/lib/capability-tab-routes.js';
|
|
12
|
+
import { ProjectInboxNavItem } from './footer/project-inbox-nav.js';
|
|
12
13
|
import { uiRoutes } from '../../lib/routes.js';
|
|
13
14
|
import { Button } from '../../primitives/button.js';
|
|
14
15
|
import { CountBadge } from '../../primitives/count-badge.js';
|
|
@@ -60,7 +61,7 @@ export function ProjectSpacesNav({ projectId }) {
|
|
|
60
61
|
const review = reviewHref(projectId);
|
|
61
62
|
const openAsks = useReviewNeedsYouCount(projectId);
|
|
62
63
|
const hrefOf = (space) => space.kind === 'dm' ? uiRoutes().dm(projectId, space.dm_agent_name ?? '') : uiRoutes().channel(projectId, space.slug ?? '');
|
|
63
|
-
return (_jsxs(FadedScrollArea, { fadeColor: "from-background", className: "h-full min-h-0", children: [_jsxs(SidebarMenu, { className: "gap-px", onKeyDown: moveFocus, children: [review ? (
|
|
64
|
+
return (_jsxs(FadedScrollArea, { fadeColor: "from-background", className: "h-full min-h-0", children: [_jsxs(SidebarMenu, { className: "gap-px", onKeyDown: moveFocus, children: [_jsx(ProjectInboxNavItem, {}), review ? (
|
|
64
65
|
// Spacing, not a rule, sets Review apart from the spaces.
|
|
65
66
|
_jsx(SidebarMenuItem, { className: "mb-2", children: _jsx(SidebarMenuButton, { asChild: true, isActive: isAt(pathname, review), className: "text-sidebar-foreground", children: _jsxs(HoverPrefetchLink, { href: review, children: [_jsx(CheckIcon, {}), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('spaces.review') }), openAsks > 0 ? _jsx(CountBadge, { count: openAsks, tone: "waiting" }) : null] }) }) })) : null, _jsx(SpaceRow, { projectId: projectId, space: personal, href: chatHref, active: isAt(pathname, chatHref) || isAt(pathname, uiRoutes().dm(projectId, MY_KORTIX_AGENT_NAME)), name: personalName, personal: true, isPrivate: true, names: names }), spaces.isError && !spaces.data ? (_jsxs("li", { className: "space-y-1.5 px-2 py-2", children: [_jsx("p", { className: "text-destructive/80 text-xs", children: t('spaces.loadError') }), _jsx(Button, { variant: "outline", size: "xs", onClick: () => spaces.refetch(), children: t('retry') })] })) : null, others.map((space) => {
|
|
66
67
|
const href = hrefOf(space);
|
|
@@ -17,10 +17,34 @@ interface SessionBrief {
|
|
|
17
17
|
/** What this session started: its sub-agents and the sessions it spawned. */
|
|
18
18
|
subagentCount?: number;
|
|
19
19
|
spawnedCount?: number;
|
|
20
|
+
/**
|
|
21
|
+
* The session that spawned this one, as a link. The sidebar draws a spawned
|
|
22
|
+
* session under its parent and leaves this out; a host that shows the
|
|
23
|
+
* session alone (the desktop tab strip) passes it.
|
|
24
|
+
*/
|
|
25
|
+
parent?: {
|
|
26
|
+
title: string;
|
|
27
|
+
href: string;
|
|
28
|
+
};
|
|
20
29
|
}
|
|
21
30
|
interface SessionBriefInteractionProps {
|
|
22
31
|
projectId: string;
|
|
23
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The panel: an identity block, then the changes this session proposed.
|
|
35
|
+
*
|
|
36
|
+
* The two halves are separated by a hairline because only the lower one is
|
|
37
|
+
* clickable. Without the seam a hover highlight appears on the third line and
|
|
38
|
+
* not the first two, with nothing to explain why — the rule reads as "below
|
|
39
|
+
* this, things are targets".
|
|
40
|
+
*
|
|
41
|
+
* `px-3.5` on the header is not a guess: the list is `p-1` and its rows are
|
|
42
|
+
* `px-2.5`, so 3.5 spacing steps is exactly where the row labels start. The
|
|
43
|
+
* title and the change titles share one left edge.
|
|
44
|
+
*/
|
|
45
|
+
export declare function SessionBriefContent({ sessionId, title, status, createdAt, source, changeRequests, labels, waitingOn, spawned, subagentCount, spawnedCount, parent, projectId, onDismiss, }: SessionBrief & SessionBriefInteractionProps & {
|
|
46
|
+
onDismiss: () => void;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
24
48
|
/**
|
|
25
49
|
* The one card for the whole session list. Rows do not own a card: the active
|
|
26
50
|
* row renders its brief into this host's slot (`SessionBriefCard`), and the
|
|
@@ -22,6 +22,7 @@ import { CR_ID_PREFIX } from '../review/review-actions.js';
|
|
|
22
22
|
import { SessionLabelBadges } from '../sessions/session-label-badges.js';
|
|
23
23
|
import { SOURCE_ICONS } from './session-source-icons.js';
|
|
24
24
|
import { isReviewOverdue, SessionStatusMark } from '../../session/list/session-status-mark.js';
|
|
25
|
+
import { prefersReducedMotion } from '../../internal/hooks/use-reduced-motion.js';
|
|
25
26
|
const DATE_TIME_OPTIONS = {
|
|
26
27
|
year: 'numeric',
|
|
27
28
|
month: 'short',
|
|
@@ -95,7 +96,7 @@ function ChangeRequestRow({ changeRequest, projectId, onDismiss, }) {
|
|
|
95
96
|
* `px-2.5`, so 3.5 spacing steps is exactly where the row labels start. The
|
|
96
97
|
* title and the change titles share one left edge.
|
|
97
98
|
*/
|
|
98
|
-
function SessionBriefContent({ sessionId, title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, projectId, onDismiss, }) {
|
|
99
|
+
export function SessionBriefContent({ sessionId, title, status, createdAt, source, changeRequests, labels, waitingOn, spawned = false, subagentCount = 0, spawnedCount = 0, parent, projectId, onDismiss, }) {
|
|
99
100
|
const gate = useFeatureFlag(projectId, 'goals');
|
|
100
101
|
const { goal } = useSessionGoal(gate.enabled ? projectId : null, sessionId);
|
|
101
102
|
const goalLink = goal ? goalHref(projectId, goal) : null;
|
|
@@ -106,7 +107,7 @@ function SessionBriefContent({ sessionId, title, status, createdAt, source, chan
|
|
|
106
107
|
const goalClassName = 'text-muted-foreground flex min-w-0 items-center gap-2 text-xs';
|
|
107
108
|
const goalContent = goal ? (_jsxs(_Fragment, { children: [_jsx(TargetIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsxs("span", { className: "min-w-0 flex-1 truncate", children: [tGoals('sessionChip'), ": ", goal.goal?.objective ?? goal.slug] }), _jsx(GoalStatusBadge, { status: goal.goal?.status, paused: goalPaused(goal) })] })) : null;
|
|
108
109
|
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-1.5 px-3.5 py-2.5", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium", children: title }), _jsx(RelativeCreatedTime, { createdAt: createdAt })] }), _jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(SessionStatusMark, { status: status, waitingOn: waitingOn, overdue: isReviewOverdue(changeRequests) }), _jsx("span", { children: statusLabel })] }), goalContent &&
|
|
109
|
-
(goalLink ? (_jsx(HoverPrefetchLink, { href: goalLink, onClick: onDismiss, className: goalClassName, children: goalContent })) : (_jsx("div", { className: goalClassName, children: goalContent }))), spawned
|
|
110
|
+
(goalLink ? (_jsx(HoverPrefetchLink, { href: goalLink, onClick: onDismiss, className: goalClassName, children: goalContent })) : (_jsx("div", { className: goalClassName, children: goalContent }))), parent ? (_jsxs(HoverPrefetchLink, { href: parent.href, onClick: onDismiss, className: goalClassName, children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: t('spawnedBy', { title: parent.title }) })] })) : spawned ? (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawned') })] })) : null, subagentCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(RobotIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('subAgentCount', { count: subagentCount }) })] })), spawnedCount > 0 && (_jsxs("div", { className: "text-muted-foreground flex items-center gap-2 text-xs", children: [_jsx(ArrowsSplitIcon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsx("span", { children: t('spawnedCount', { count: spawnedCount }) })] })), SourceIcon ? (_jsxs("div", { className: "text-muted-foreground flex min-w-0 items-center gap-2 text-xs", children: [_jsx(SourceIcon, { className: "size-3.5 shrink-0" }), _jsxs("span", { className: "text-foreground min-w-0 truncate", children: [source.label, source.triggerSlug ? (_jsxs("span", { className: "text-muted-foreground", children: [" \u00B7 ", source.triggerSlug] })) : null] })] })) : null, labels?.length ? (_jsx(SessionLabelBadges, { session: { labels: [...labels] }, max: 6, className: "flex-wrap" })) : null] }), changeRequests.length > 0 ? (_jsx("ul", { className: "border-border max-h-64 overflow-y-auto overscroll-contain border-t p-1", children: changeRequests.map((changeRequest) => (_jsx("li", { children: _jsx(ChangeRequestRow, { changeRequest: changeRequest, projectId: projectId, onDismiss: onDismiss }) }, changeRequest.cr_id))) })) : null] }));
|
|
110
111
|
}
|
|
111
112
|
const CARD_EDGE_PX = 8;
|
|
112
113
|
/**
|
|
@@ -150,7 +151,7 @@ export function SessionBriefCardHost() {
|
|
|
150
151
|
const position = () => {
|
|
151
152
|
const rect = anchor.getBoundingClientRect();
|
|
152
153
|
const top = Math.max(CARD_EDGE_PX, Math.min(rect.top, window.innerHeight - CARD_EDGE_PX - el.offsetHeight));
|
|
153
|
-
const reduce =
|
|
154
|
+
const reduce = prefersReducedMotion();
|
|
154
155
|
// A move between rows glides; the first open fades in, as the reminders card does.
|
|
155
156
|
el.style.transition =
|
|
156
157
|
shown.current && via === 'pointer' && !reduce
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Session groups in the sidebar (`session_groups` flag): the project's shared,
|
|
3
3
|
* named folders of sessions, between Pinned and the rest of the list.
|
|
4
4
|
*
|
|
5
|
-
* Each group is a section. Its rows load when it is open (one paged list per
|
|
5
|
+
* Each group is a section header like Pinned's (no icon). Its rows load when it is open (one paged list per
|
|
6
6
|
* group, any starter, any depth), and its open state is the viewer's own,
|
|
7
7
|
* beside the other sections in the session-filter store. A session moves into
|
|
8
8
|
* a group from its `⋯` menu or by dragging its row onto the group; a group
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type ProjectSession, type ProjectSessionGroup } from '@kortix/sdk';
|
|
13
13
|
import { type DragEvent, type ReactNode } from 'react';
|
|
14
|
+
/** Call before opening the new-group row from a menu item. */
|
|
15
|
+
export declare function markNewGroupFocus(): void;
|
|
16
|
+
/** `onCloseAutoFocus` of a menu with a "New group" item. */
|
|
17
|
+
export declare function keepFocusForNewGroup(event: Event): void;
|
|
14
18
|
/** The collapsed-sections id of one group. */
|
|
15
19
|
export declare function sessionGroupSectionId(groupId: string): string;
|
|
16
20
|
/** `onDragStart` of a session row: the row's link drag also carries the session id. */
|
|
@@ -24,17 +28,28 @@ export declare function useSessionGroupActions(projectId: string, groups: readon
|
|
|
24
28
|
reorder: (groupIds: string[] | null) => Promise<void>;
|
|
25
29
|
};
|
|
26
30
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* the change.
|
|
30
|
-
* its session into it).
|
|
31
|
+
* Rename a group (a new group is named in place, `NewSessionGroupRow`). A
|
|
32
|
+
* taken name shows in the dialog; the dialog closes with a toast once the
|
|
33
|
+
* list holds the change.
|
|
31
34
|
*/
|
|
32
|
-
export declare function SessionGroupNameModal({ projectId, group, open, onOpenChange,
|
|
35
|
+
export declare function SessionGroupNameModal({ projectId, group, open, onOpenChange, }: {
|
|
33
36
|
projectId: string;
|
|
34
37
|
group: ProjectSessionGroup | null;
|
|
35
38
|
open: boolean;
|
|
36
39
|
onOpenChange: (open: boolean) => void;
|
|
37
|
-
|
|
40
|
+
}): import("react").JSX.Element;
|
|
41
|
+
/** `base`, or `base 2`, `base 3`…: the first name no group of the project has (names are unique per project). */
|
|
42
|
+
export declare function nextSessionGroupName(groups: readonly ProjectSessionGroup[], base: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* A new group, named in place: the row a group header takes, holding an input
|
|
45
|
+
* with `defaultName` selected. Enter or a click elsewhere creates it; Escape,
|
|
46
|
+
* or an empty name, drops the row. A taken name or the group limit shows as a
|
|
47
|
+
* toast and keeps the row open. `onDone` gets the new group, or null.
|
|
48
|
+
*/
|
|
49
|
+
export declare function NewSessionGroupRow({ projectId, defaultName, onDone, }: {
|
|
50
|
+
projectId: string;
|
|
51
|
+
defaultName: string;
|
|
52
|
+
onDone: (group: ProjectSessionGroup | null) => void;
|
|
38
53
|
}): import("react").JSX.Element;
|
|
39
54
|
interface SessionGroupSectionsProps {
|
|
40
55
|
projectId: string;
|
|
@@ -48,6 +63,10 @@ interface SessionGroupSectionsProps {
|
|
|
48
63
|
renderNode: (session: ProjectSession) => ReactNode;
|
|
49
64
|
actions: ReturnType<typeof useSessionGroupActions>;
|
|
50
65
|
onRename: (group: ProjectSessionGroup) => void;
|
|
66
|
+
/** Open the New group dialog. */
|
|
67
|
+
onNewGroup: () => void;
|
|
68
|
+
/** Close every group except this one; this one stays open. */
|
|
69
|
+
onCollapseOthers: (groupId: string) => void;
|
|
51
70
|
}
|
|
52
71
|
/** Every group of the project, in order. */
|
|
53
72
|
export declare function SessionGroupSections({ groups, ...rest }: SessionGroupSectionsProps): import("react").JSX.Element;
|