@kortix/ui 0.15.2 → 0.15.4
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 +243 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +1 -1
- package/dist/_vendor/shared/index.d.ts +1 -0
- package/dist/_vendor/shared/markdown-math.d.ts +6 -0
- package/dist/_vendor/shared/workspace-actions.d.ts +155 -0
- package/dist/_vendor/shared/workspace-settings.d.ts +62 -0
- package/dist/access/access/access-dialog-share.js +6 -6
- package/dist/access/access/access-dialog.d.ts +44 -1
- package/dist/access/access/access-dialog.js +8 -8
- package/dist/access/access/agent-principals.d.ts +3 -3
- package/dist/access/access/agent-principals.js +5 -4
- package/dist/access/access/invite-people-dialog.d.ts +37 -0
- package/dist/access/access/invite-people-dialog.js +140 -0
- package/dist/access/access/principal-picker.js +3 -2
- package/dist/access/access/project-select.js +2 -2
- package/dist/access/access/role-select.d.ts +9 -8
- package/dist/access/access/role-select.js +22 -25
- package/dist/access/access/workspace-role-dialog.d.ts +27 -0
- package/dist/access/access/workspace-role-dialog.js +48 -0
- package/dist/access/iam/add-github-account-dialog.d.ts +1 -1
- package/dist/access/iam/add-github-account-dialog.js +1 -1
- package/dist/access/iam/api-key-expiry.d.ts +18 -0
- package/dist/access/iam/api-key-expiry.js +47 -0
- package/dist/access/iam/api-key-rows.d.ts +6 -0
- package/dist/access/iam/api-key-rows.js +3 -0
- package/dist/access/iam/workspace-key-acts-as.d.ts +41 -0
- package/dist/access/iam/workspace-key-acts-as.js +48 -0
- package/dist/access/sharing-intent.js +1 -1
- package/dist/access/sharing-picker.js +1 -1
- package/dist/animated-copy-icon.d.ts +2 -2
- package/dist/animated-copy-icon.js +7 -4
- package/dist/apps/app-shared.js +2 -2
- package/dist/artifacts/artifact-session.js +1 -1
- package/dist/customize/agents/agent-drives-section.d.ts +1 -3
- package/dist/customize/agents/agent-drives-section.js +5 -6
- package/dist/customize/agents/agent-page-chrome.js +1 -1
- package/dist/customize/agents/agent-page.js +6 -7
- package/dist/customize/agents/agent-tabs.d.ts +1 -1
- package/dist/customize/agents/agent-tabs.js +1 -2
- package/dist/customize/agents/agents-page.js +2 -3
- package/dist/customize/connectors/connector-identity.d.ts +1 -1
- package/dist/customize/connectors/connector-identity.js +1 -1
- package/dist/customize/connectors/connector-moves-banner.js +2 -2
- package/dist/customize/connectors/connectors-page.d.ts +10 -2
- package/dist/customize/connectors/connectors-page.js +38 -5
- package/dist/customize/connectors/detail/app-page.js +1 -1
- package/dist/customize/connectors/detail/connector-page.d.ts +1 -1
- package/dist/customize/connectors/detail/connector-page.js +1 -1
- package/dist/customize/connectors/detail/connector-policy-sets.js +2 -2
- package/dist/customize/connectors/detail/connector-tools.js +7 -7
- package/dist/customize/connectors/detail/connector-triggers.js +2 -3
- package/dist/customize/connectors/detail/email-inboxes.js +2 -2
- package/dist/customize/models/models-page.d.ts +1 -1
- package/dist/customize/models/models-page.js +1 -1
- package/dist/customize/project-settings/project-admin-sections.d.ts +53 -17
- package/dist/customize/project-settings/project-admin-sections.js +80 -31
- package/dist/customize/project-settings/project-settings-page.d.ts +2 -2
- package/dist/customize/project-settings/project-settings-page.js +6 -4
- package/dist/customize/project-settings/project-settings-sections.d.ts +2 -3
- package/dist/customize/project-settings/project-settings-sections.js +9 -4
- package/dist/customize/providers/provider-accordion.d.ts +3 -1
- package/dist/customize/providers/provider-accordion.js +2 -2
- package/dist/customize/secrets/secrets-page.d.ts +1 -1
- package/dist/customize/secrets/secrets-page.js +1 -1
- package/dist/customize/sections/component/email-connect-form.js +2 -2
- package/dist/customize/sections/component/slack-byo-wizard.js +3 -3
- package/dist/customize/sections/connectors-view.js +17 -17
- package/dist/customize/sections/gateway-view.d.ts +7 -5
- package/dist/customize/sections/gateway-view.js +28 -17
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +2 -2
- package/dist/customize/sections/llm-provider/custom-provider-form.js +2 -2
- package/dist/customize/sections/llm-provider/llm-provider-modal.d.ts +1 -1
- package/dist/customize/sections/llm-provider/llm-provider-modal.js +4 -4
- package/dist/customize/sections/llm-provider/models-tab-row.js +5 -3
- package/dist/customize/sections/llm-provider/types.d.ts +2 -0
- package/dist/customize/sections/view/agent-editor-access-fields.js +1 -3
- package/dist/customize/sections/view/agent-editor-catalog.d.ts +5 -6
- package/dist/customize/sections/view/agent-editor-catalog.js +33 -14
- package/dist/customize/sections/view/agent-editor.js +1 -1
- package/dist/customize/sections/view/channels-view.js +13 -13
- package/dist/customize/sections/view/gateway/gateway-budgets.js +12 -10
- package/dist/customize/sections/view/gateway/gateway-logs.d.ts +1 -1
- package/dist/customize/sections/view/gateway/gateway-logs.js +3 -3
- package/dist/customize/sections/view/gateway/gateway-overview.js +1 -1
- package/dist/customize/sections/view/gateway/gateway-routing.js +1 -1
- package/dist/customize/sections/view/git-view.js +3 -3
- package/dist/customize/sections/view/grant-mode-field.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +1 -1
- package/dist/customize/sections/view/review-view.d.ts +0 -15
- package/dist/customize/sections/view/review-view.js +1 -23
- package/dist/customize/sections/view/secret-delivery.js +2 -2
- package/dist/customize/sections/view/secrets-view.js +16 -16
- package/dist/customize/sections/view/subscription-usage-tab.d.ts +12 -1
- package/dist/customize/sections/view/subscription-usage-tab.js +71 -72
- package/dist/customize/settings/rail-copy-context.js +1 -1
- package/dist/customize/settings/rail.d.ts +1 -1
- package/dist/customize/settings/rail.js +11 -18
- package/dist/customize/settings/settings-tab-header.d.ts +1 -1
- package/dist/customize/settings/settings-tab-header.js +1 -1
- package/dist/customize/settings/settings-tabs.d.ts +5 -12
- package/dist/customize/settings/settings-tabs.js +31 -44
- package/dist/customize/settings/tabs/experimental-tab.js +4 -4
- package/dist/customize/settings/tabs/general-tab.d.ts +29 -11
- package/dist/customize/settings/tabs/general-tab.js +55 -25
- package/dist/customize/settings/tabs/project-edit-patch.d.ts +0 -13
- package/dist/customize/settings/tabs/project-edit-patch.js +0 -28
- package/dist/customize/settings/tabs/sandbox-tab.js +2 -2
- package/dist/customize/settings/tabs/tokens-tab.d.ts +32 -2
- package/dist/customize/settings/tabs/tokens-tab.js +157 -32
- package/dist/customize/settings/tabs/workspace-keys.d.ts +6 -0
- package/dist/customize/settings/tabs/workspace-keys.js +240 -0
- package/dist/customize/shared/capability-library.js +3 -1
- package/dist/customize/shared/catalog/catalog-space-tabs.js +2 -2
- package/dist/customize/shared/customize-tab-bar.d.ts +6 -2
- package/dist/customize/shared/customize-tab-bar.js +36 -35
- package/dist/customize/shared/standalone-settings-nav.js +2 -2
- package/dist/customize/triggers/schedule/schedule-copy.d.ts +1 -1
- package/dist/customize/triggers/schedule/trigger-composer.js +5 -6
- package/dist/customize/triggers/schedule/trigger-list.js +2 -2
- package/dist/customize/triggers/schedule/trigger-session-access-copy.d.ts +6 -6
- package/dist/customize/triggers/schedule/trigger-session-access-copy.js +3 -3
- package/dist/customize/triggers/schedule/when-event.js +4 -4
- package/dist/customize/triggers/schedule/when-webhook-address.js +2 -2
- package/dist/customize/triggers/schedule/when-webhook.js +2 -2
- package/dist/customize/triggers/schedule-view.js +4 -5
- package/dist/customize/triggers/triggers-page.d.ts +1 -1
- package/dist/customize/triggers/triggers-page.js +1 -1
- package/dist/files/drives/drive-storage.d.ts +2 -2
- package/dist/files/drives/drive-storage.js +13 -6
- package/dist/files/project/components/change-request-detail-dialog.js +6 -6
- package/dist/files/project/components/change-requests-panel.js +2 -2
- package/dist/files/project/components/diff-preview-banner.d.ts +1 -1
- package/dist/files/project/components/diff-preview-banner.js +1 -1
- package/dist/files/project/components/drive-explorer.js +64 -43
- package/dist/files/project/components/drive-grid-view.js +1 -1
- package/dist/files/project/components/drive-list-view.js +1 -1
- package/dist/files/project/components/drive-upload-tray.d.ts +2 -1
- package/dist/files/project/components/drive-upload-tray.js +9 -4
- package/dist/files/project/context.d.ts +1 -1
- package/dist/files/project/context.js +1 -1
- package/dist/files/project/drop-tree.d.ts +16 -0
- package/dist/files/project/drop-tree.js +39 -0
- package/dist/files/project/upload-batch.d.ts +15 -0
- package/dist/files/project/upload-batch.js +12 -0
- package/dist/files/renderers/image-renderer.js +1 -1
- package/dist/files/runtime/hooks/use-binary-blob.js +12 -2
- package/dist/files/runtime/hooks/use-file-content.js +18 -2
- package/dist/files/viewer/file-content-renderer.js +2 -2
- package/dist/files/viewer/preview-fit.d.ts +1 -1
- package/dist/files/viewer/preview-fit.js +1 -1
- package/dist/i18n/en.d.ts +317 -31
- package/dist/i18n/en.js +882 -596
- package/dist/i18n/ui-catalog/account-hub-translation-keys.generated.js +9 -9
- package/dist/i18n/ui-catalog/app-registry-translation-keys.generated.js +12 -6
- package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +5 -5
- package/dist/i18n/ui-catalog/remaining-ui-translation-keys.generated.js +67 -60
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/icons/solid-right-arrow.d.ts +8 -0
- package/dist/icons/solid-right-arrow.js +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/account-hub/account-hub-entry.js +9 -8
- package/dist/internal/account-hub/account-hub-location.d.ts +20 -3
- package/dist/internal/account-hub/account-hub-location.js +16 -7
- package/dist/internal/account-hub/hub-sheet.d.ts +1 -1
- package/dist/internal/account-hub/hub-sheet.js +1 -1
- package/dist/internal/account-hub/sections.d.ts +2 -2
- package/dist/internal/account-hub/sections.js +10 -10
- package/dist/internal/account-hub/use-account-hub-access.d.ts +2 -0
- package/dist/internal/account-hub/use-account-hub-access.js +13 -5
- package/dist/internal/account-hub/workspace-settings-route.d.ts +27 -0
- package/dist/internal/account-hub/workspace-settings-route.js +51 -0
- package/dist/internal/billing/use-cost-explorer.d.ts +19 -1
- package/dist/internal/billing/use-cost-explorer.js +27 -1
- package/dist/internal/components/nav-rail.d.ts +3 -1
- package/dist/internal/components/nav-rail.js +2 -0
- package/dist/internal/components/repository-disconnected.js +2 -2
- package/dist/internal/desktop/desktop-back-button.d.ts +1 -1
- package/dist/internal/files/file-read-retry.d.ts +13 -0
- package/dist/internal/files/file-read-retry.js +53 -1
- package/dist/internal/goals/goal-meta.d.ts +2 -1
- package/dist/internal/goals/goal-meta.js +4 -2
- package/dist/internal/hooks/account/use-accounts-list.d.ts +2 -12
- package/dist/internal/hooks/account/use-accounts-list.js +1 -14
- package/dist/internal/hooks/account/use-my-invites.d.ts +1 -1
- package/dist/internal/hooks/account/use-my-invites.js +1 -1
- package/dist/internal/hooks/use-review-session-summary.d.ts +7 -0
- package/dist/internal/hooks/use-review-session-summary.js +12 -1
- package/dist/internal/layout/project-capability-nav.d.ts +6 -17
- package/dist/internal/layout/project-capability-nav.js +7 -79
- package/dist/internal/layout/project-settings-nav.d.ts +2 -2
- package/dist/internal/layout/project-settings-nav.js +3 -3
- package/dist/internal/lib/billing/billing-gate-state.d.ts +10 -0
- package/dist/internal/lib/billing/billing-gate-state.js +20 -3
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.js +2 -3
- package/dist/internal/lib/browser-noise/rules/extensions.js +18 -0
- package/dist/internal/lib/browser-noise/rules/injected-scripts.d.ts +5 -1
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +141 -5
- package/dist/internal/lib/capability-tab-routes.d.ts +16 -40
- package/dist/internal/lib/capability-tab-routes.js +25 -54
- package/dist/internal/lib/desktop.d.ts +1 -1
- package/dist/internal/lib/desktop.js +1 -1
- package/dist/internal/lib/github-installations.d.ts +1 -1
- package/dist/internal/lib/github-installations.js +1 -1
- package/dist/internal/lib/mermaid-utils.js +2 -24
- package/dist/internal/lib/model-pricing.js +1 -1
- package/dist/internal/lib/navigation/session-href.d.ts +1 -1
- package/dist/internal/lib/navigation/session-href.js +1 -1
- package/dist/internal/lib/onboarding/landing-destination.d.ts +12 -4
- package/dist/internal/lib/onboarding/landing-destination.js +17 -5
- package/dist/internal/lib/onboarding/last-project-cookie.d.ts +1 -1
- package/dist/internal/lib/onboarding/last-project-cookie.js +1 -1
- package/dist/internal/lib/project-actions.d.ts +1 -4
- package/dist/internal/lib/project-actions.js +2 -5
- package/dist/internal/lib/provider-branding.js +11 -3
- package/dist/internal/lib/use-project-can.d.ts +1 -3
- package/dist/internal/lib/use-project-can.js +0 -5
- package/dist/internal/lib/web-notifications.js +5 -5
- package/dist/internal/notifications/notification-inbox.d.ts +8 -2
- package/dist/internal/notifications/notification-inbox.js +8 -5
- package/dist/internal/notifications/use-inbox-summary.d.ts +8 -4
- package/dist/internal/notifications/use-inbox-summary.js +12 -6
- package/dist/internal/reminders/use-refetch-after-fire.d.ts +0 -2
- package/dist/internal/reminders/use-refetch-after-fire.js +1 -10
- package/dist/internal/stores/account-panel-store.d.ts +17 -1
- package/dist/internal/stores/account-panel-store.js +19 -2
- package/dist/internal/stores/project-switch-store.d.ts +2 -2
- package/dist/internal/stores/project-switch-store.js +4 -4
- package/dist/internal/stores/settings-panel-store.d.ts +6 -0
- package/dist/internal/stores/settings-panel-store.js +4 -1
- package/dist/internal/stores/workspace-settings-rail-store.d.ts +67 -0
- package/dist/internal/stores/workspace-settings-rail-store.js +11 -0
- package/dist/lib/routes.js +19 -18
- package/dist/lib/z-stack.d.ts +7 -0
- package/dist/lib/z-stack.js +13 -0
- package/dist/markdown/copy-button.d.ts +2 -2
- package/dist/markdown/copy-button.js +22 -20
- package/dist/markdown/setup-links/setup-link-button.js +1 -1
- package/dist/primitives/emoji-tint.d.ts +1 -1
- package/dist/primitives/emoji-tint.js +1 -1
- package/dist/primitives/error-state.js +8 -1
- package/dist/primitives/inline-meta.d.ts +12 -1
- package/dist/primitives/inline-meta.js +38 -5
- package/dist/primitives/mermaid-render.js +3 -20
- package/dist/primitives/page-search-bar.js +6 -6
- package/dist/primitives/section.d.ts +3 -3
- package/dist/primitives/section.js +9 -9
- package/dist/primitives/status.d.ts +5 -5
- package/dist/primitives/status.js +33 -33
- package/dist/primitives/tabs.d.ts +14 -26
- package/dist/primitives/tabs.js +103 -105
- package/dist/primitives/tag.d.ts +1 -1
- package/dist/primitives/toast.d.ts +6 -6
- package/dist/primitives/toast.js +55 -48
- package/dist/providers/session-ids.d.ts +1 -1
- package/dist/providers/ui-provider.d.ts +2 -0
- package/dist/session/agents/agent-strip.js +6 -6
- package/dist/session/agents/subagent-dialog-content.js +3 -4
- package/dist/session/agents/workflow-run-controls.d.ts +0 -2
- package/dist/session/agents/workflow-run-controls.js +1 -12
- package/dist/session/composer/ComposerCard.d.ts +1 -1
- package/dist/session/composer/ComposerCard.js +2 -2
- package/dist/session/composer/animated-placeholder.js +1 -1
- package/dist/session/composer/chat-input/chat-input-control.js +1 -8
- package/dist/session/composer/composer-chat-input.d.ts +14 -1
- package/dist/session/composer/composer-chat-input.js +4 -2
- package/dist/session/composer/composer-toolbar.d.ts +22 -17
- package/dist/session/composer/composer-toolbar.js +12 -3
- package/dist/session/composer/composer.d.ts +8 -0
- package/dist/session/composer/composer.js +5 -13
- package/dist/session/composer/reasoning-effort-selector.d.ts +21 -0
- package/dist/session/composer/reasoning-effort-selector.js +46 -1
- package/dist/session/composer/send-stop-control.d.ts +15 -1
- package/dist/session/composer/send-stop-control.js +30 -5
- package/dist/session/header/session-embed-menu-item.d.ts +12 -0
- package/dist/session/header/session-embed-menu-item.js +30 -0
- package/dist/{workspace/sidebar/modal/session-embed-section.d.ts → session/header/session-embed-snippet.d.ts} +2 -11
- package/dist/session/header/session-embed-snippet.js +21 -0
- package/dist/session/header/session-goal-indicator.js +2 -3
- package/dist/session/header/session-reminders-indicator.js +3 -3
- package/dist/session/header/session-site-header.js +10 -3
- package/dist/session/index.d.ts +1 -1
- package/dist/session/models/ask-owner-for-credits-button.d.ts +7 -1
- package/dist/session/models/ask-owner-for-credits-button.js +3 -2
- package/dist/session/models/model-availability.d.ts +11 -0
- package/dist/session/models/model-availability.js +12 -0
- package/dist/session/models/model-connection-gate.d.ts +11 -26
- package/dist/session/models/model-connection-gate.js +22 -35
- package/dist/session/models/model-grouping.d.ts +30 -0
- package/dist/session/models/model-grouping.js +46 -0
- package/dist/session/models/model-picker-panel.d.ts +62 -0
- package/dist/session/models/model-picker-panel.js +181 -0
- package/dist/session/models/model-selector.d.ts +28 -4
- package/dist/session/models/model-selector.js +59 -15
- package/dist/session/models/model-tags.d.ts +4 -8
- package/dist/session/models/model-tags.js +20 -13
- package/dist/session/models/subscription-offer.d.ts +35 -0
- package/dist/session/models/subscription-offer.js +91 -0
- package/dist/session/models/use-model-connection-gate.d.ts +3 -3
- package/dist/session/models/use-model-connection-gate.js +8 -6
- package/dist/session/overrides/session-overrides-toolbar.js +8 -5
- package/dist/session/panel/open-session-quick-view.js +1 -1
- package/dist/session/panel/session-detail-panel.js +5 -1
- package/dist/session/panel/session-panel-provider.js +2 -2
- package/dist/session/panel/session-reminders-panel.js +2 -2
- package/dist/session/panel/shared/use-panel-derivations.d.ts +1 -0
- package/dist/session/panel/shared/use-panel-derivations.js +1 -1
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +2 -2
- package/dist/session/panel/shared/use-panel-handoffs.js +22 -3
- package/dist/session/panel/use-session-panel-state.js +1 -1
- package/dist/session/prompts/ask-deck.d.ts +5 -3
- package/dist/session/prompts/ask-deck.js +30 -10
- package/dist/session/prompts/session-access-prompt.d.ts +61 -0
- package/dist/session/prompts/session-access-prompt.js +88 -0
- package/dist/session/prompts/session-permission-prompt.js +1 -1
- package/dist/session/scope/session-scope-control.js +2 -2
- package/dist/session/status/session-notice-banner.js +3 -3
- package/dist/session/status/session-route-prefetch.d.ts +2 -2
- package/dist/session/thread/optimistic-turn.js +1 -1
- package/dist/session/thread/session-chat.js +51 -19
- package/dist/session/thread/session-context-message-explorer.js +2 -2
- package/dist/session/thread/session-history.js +3 -3
- package/dist/session/tool/render-static.d.ts +11 -0
- package/dist/session/tool/render-static.js +16 -0
- package/dist/session/tool/shared/session-helpers.js +2 -2
- package/dist/session/tool/tool-part-renderer.d.ts +6 -1
- package/dist/session/tool/tool-part-renderer.js +9 -5
- package/dist/session/tool/tools/kortix-action-tool.js +4 -25
- package/dist/session/tool/tools/task-tool.js +9 -2
- package/dist/session/tool/tools/workflow-run-card.js +5 -1
- package/dist/session/tool/tools/workflow-tool.js +3 -14
- package/dist/session/turn/user-message.js +1 -1
- package/dist/session/voice/composer-call.d.ts +31 -0
- package/dist/session/voice/composer-call.js +46 -0
- package/dist/session/voice/voice-call-card.js +2 -0
- package/dist/session/voice/voice-call-store.d.ts +8 -0
- package/dist/session/voice/voice-call-store.js +5 -0
- package/dist/session/voice/voice-call.d.ts +2 -2
- package/dist/session/voice/voice-call.js +6 -6
- package/dist/styles.css +1 -1
- package/dist/test-utils/intl.d.ts +10103 -0
- package/dist/test-utils/intl.js +27 -0
- package/dist/test-utils/strip-tags.d.ts +24 -0
- package/dist/test-utils/strip-tags.js +32 -0
- package/dist/workspace/admin/project-admin-dashboard.d.ts +51 -33
- package/dist/workspace/admin/project-admin-dashboard.js +269 -81
- package/dist/workspace/admin/settings-search-landing.d.ts +11 -0
- package/dist/workspace/admin/settings-search-landing.js +103 -0
- package/dist/workspace/admin/settings-search.d.ts +69 -0
- package/dist/workspace/admin/settings-search.js +393 -0
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +22 -0
- package/dist/workspace/home/existing-repo-setup-prompt.js +57 -0
- package/dist/workspace/home/no-agent-home.d.ts +25 -0
- package/dist/workspace/home/no-agent-home.js +44 -0
- package/dist/workspace/home/welcome-body.js +2 -1
- package/dist/workspace/inbox/workspace-inbox.d.ts +21 -0
- package/dist/workspace/inbox/workspace-inbox.js +52 -0
- package/dist/workspace/instant-session-shell.js +11 -1
- package/dist/workspace/layout/project-files-view.js +1 -1
- package/dist/workspace/layout/project-home.js +84 -11
- package/dist/workspace/layout/use-project-home-call.d.ts +24 -0
- package/dist/workspace/layout/use-project-home-call.js +56 -0
- package/dist/workspace/memory/memory-body.js +2 -2
- package/dist/workspace/new/account-param.d.ts +1 -1
- package/dist/workspace/new/account-param.js +4 -4
- package/dist/workspace/new/advanced-fields.js +3 -3
- package/dist/workspace/new/clone-param.d.ts +1 -1
- package/dist/workspace/new/clone-param.js +1 -1
- package/dist/workspace/new/create-workspace-key.js +1 -1
- package/dist/workspace/new/github-source.d.ts +6 -6
- package/dist/workspace/new/github-source.js +6 -6
- package/dist/workspace/new/new-workspace-form.d.ts +11 -141
- package/dist/workspace/new/new-workspace-form.js +9 -195
- package/dist/workspace/new/provision-new-workspace.d.ts +14 -0
- package/dist/workspace/new/provision-new-workspace.js +14 -0
- package/dist/workspace/new/repository-options.d.ts +2 -2
- package/dist/workspace/new/repository-options.js +2 -2
- package/dist/workspace/new/source-param.d.ts +2 -2
- package/dist/workspace/new/source-param.js +2 -2
- package/dist/workspace/new/use-create-workspace.d.ts +43 -102
- package/dist/workspace/new/use-create-workspace.js +77 -136
- package/dist/workspace/new/use-project-quota.d.ts +1 -1
- package/dist/workspace/new/use-project-quota.js +1 -1
- package/dist/workspace/new/workspace-handoff.d.ts +2 -2
- package/dist/workspace/new/workspace-handoff.js +2 -2
- package/dist/workspace/new/workspace-name.d.ts +14 -1
- package/dist/workspace/new/workspace-name.js +21 -1
- package/dist/workspace/project-selector/project-selector-model.d.ts +115 -57
- package/dist/workspace/project-selector/project-selector-model.js +157 -111
- package/dist/workspace/projects/modal/project-icon-field.d.ts +5 -5
- package/dist/workspace/projects/modal/project-icon-field.js +4 -4
- package/dist/workspace/projects/policies-panel.js +3 -3
- package/dist/workspace/sessions/board-grouping.js +1 -1
- package/dist/workspace/sessions/project-sessions-view.js +2 -2
- package/dist/workspace/sessions/session-detail.js +2 -2
- package/dist/workspace/sessions/sessions-board.d.ts +1 -1
- package/dist/workspace/sessions/sessions-board.js +1 -1
- package/dist/workspace/settings/split-notice-banner.d.ts +13 -0
- package/dist/workspace/settings/split-notice-banner.js +59 -0
- package/dist/workspace/settings/use-leave-workspace.d.ts +16 -0
- package/dist/workspace/settings/use-leave-workspace.js +60 -0
- package/dist/workspace/sidebar/footer/project-balance-warning.js +9 -6
- package/dist/workspace/sidebar/footer/project-files-nav.js +2 -2
- package/dist/workspace/sidebar/footer/sandbox-health.js +1 -1
- package/dist/workspace/sidebar/footer/sidebar-alert.d.ts +1 -1
- package/dist/workspace/sidebar/invitations-menu-group.d.ts +2 -2
- package/dist/workspace/sidebar/invitations-menu-group.js +4 -4
- package/dist/workspace/sidebar/modal/share-session-access.js +1 -1
- package/dist/workspace/sidebar/modal/share-session-modal.js +4 -5
- package/dist/workspace/sidebar/project-nav-items.js +14 -25
- package/dist/workspace/sidebar/project-sidebar.js +17 -2
- package/dist/workspace/sidebar/project-spaces-nav.js +6 -15
- package/dist/workspace/sidebar/sidebar-drill.d.ts +37 -0
- package/dist/workspace/sidebar/sidebar-drill.js +110 -0
- package/dist/workspace/sidebar/use-workspace-directory.d.ts +24 -0
- package/dist/workspace/sidebar/use-workspace-directory.js +24 -0
- package/dist/workspace/sidebar/use-workspace-list.d.ts +37 -0
- package/dist/workspace/sidebar/use-workspace-list.js +71 -0
- package/dist/workspace/sidebar/workspace-grouping.d.ts +6 -67
- package/dist/workspace/sidebar/workspace-grouping.js +4 -107
- package/dist/workspace/sidebar/workspace-menu-model.d.ts +30 -12
- package/dist/workspace/sidebar/workspace-menu-model.js +13 -107
- package/dist/workspace/sidebar/workspace-menu-section.d.ts +7 -1
- package/dist/workspace/sidebar/workspace-menu-section.js +65 -100
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.d.ts +34 -0
- package/dist/workspace/sidebar/workspace-settings-sidebar-nav.js +282 -0
- package/dist/workspace/space/space-filter-tabs.js +2 -2
- package/dist/workspace/space/space-page.d.ts +1 -1
- package/dist/workspace/space/space-page.js +1 -1
- package/package.json +55 -51
- package/skills/kortix-ui/SKILL.md +66 -66
- package/skills/kortix-ui/references/custom-dashboard.md +15 -15
- package/skills/kortix-ui/references/modules.md +15 -15
- package/dist/customize/agents/agent-pin-button.d.ts +0 -10
- package/dist/customize/agents/agent-pin-button.js +0 -20
- package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +0 -4
- package/dist/customize/settings/tabs/transfer-workspace-dialog.js +0 -82
- package/dist/internal/account-hub/account-settings-shell.d.ts +0 -7
- package/dist/internal/account-hub/account-settings-shell.js +0 -87
- package/dist/internal/account-hub/account-settings-sidebar.d.ts +0 -2
- package/dist/internal/account-hub/account-settings-sidebar.js +0 -169
- package/dist/internal/lib/use-project-feature-flags.d.ts +0 -28
- package/dist/internal/lib/use-project-feature-flags.js +0 -76
- package/dist/internal/stores/pinned-agents-store.d.ts +0 -26
- package/dist/internal/stores/pinned-agents-store.js +0 -20
- package/dist/primitives/info-banner.d.ts +0 -14
- package/dist/primitives/info-banner.js +0 -72
- package/dist/workspace/new/account-picker.d.ts +0 -71
- package/dist/workspace/new/account-picker.js +0 -92
- package/dist/workspace/new/use-creatable-accounts.d.ts +0 -8
- package/dist/workspace/new/use-creatable-accounts.js +0 -33
- package/dist/workspace/sidebar/modal/session-embed-section.js +0 -71
|
@@ -53,7 +53,7 @@ function resolveGlyphFace(glyph) {
|
|
|
53
53
|
const GlyphComponent = glyphDrawing(glyph.name);
|
|
54
54
|
return GlyphComponent ? { GlyphComponent, name: glyph.name, color: glyph.color } : null;
|
|
55
55
|
}
|
|
56
|
-
/** Icon trigger for `/new`'s create form and workspace Settings' edit
|
|
56
|
+
/** Icon trigger for `/workspaces/new`'s create form and workspace Settings' edit
|
|
57
57
|
* section. Sits beside the name input and opens the Emoji/Icon picker in a
|
|
58
58
|
* popover. Controlled: the host owns the icon so it can send it with its
|
|
59
59
|
* payload (create) or diff it against the stored project (edit), and reset
|
|
@@ -118,16 +118,16 @@ export function ProjectIconField({ value, onChange, onGlyphChange, onClear, disa
|
|
|
118
118
|
// 240.31px of the picker, including the point the wheel was aimed at.
|
|
119
119
|
// `modal` leaves the popover's geometry byte-identical to before.
|
|
120
120
|
//
|
|
121
|
-
// On `/new` this field has no Dialog ancestor at all, so the bug above
|
|
121
|
+
// On `/workspaces/new` this field has no Dialog ancestor at all, so the bug above
|
|
122
122
|
// cannot occur there — `modal` is simply inert in that host, not wrong.
|
|
123
123
|
_jsxs(Popover, { open: open && !disabled, onOpenChange: setOpen, modal: true, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(Button
|
|
124
|
-
// On `/new` the field renders inside that page's <form>, where a
|
|
124
|
+
// On `/workspaces/new` the field renders inside that page's <form>, where a
|
|
125
125
|
// missing `type="button"` would submit it on click. Workspace
|
|
126
126
|
// Settings has no surrounding <form>, so this is a no-op there —
|
|
127
127
|
// still correct to keep, since a shared control should not assume
|
|
128
128
|
// which host it is in.
|
|
129
129
|
, {
|
|
130
|
-
// On `/new` the field renders inside that page's <form>, where a
|
|
130
|
+
// On `/workspaces/new` the field renders inside that page's <form>, where a
|
|
131
131
|
// missing `type="button"` would submit it on click. Workspace
|
|
132
132
|
// Settings has no surrounding <form>, so this is a no-op there —
|
|
133
133
|
// still correct to keep, since a shared control should not assume
|
|
@@ -24,7 +24,7 @@ import { CheckIcon, PlusIcon, ShieldCheckIcon, TrashIcon } from '@phosphor-icons
|
|
|
24
24
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
25
25
|
import { useEffect, useMemo, useState } from 'react';
|
|
26
26
|
import { Button } from '../../primitives/button.js';
|
|
27
|
-
import {
|
|
27
|
+
import { Alert as BannerAlert, AlertTitle as BannerAlertTitle, AlertDescription as BannerAlertDescription } from '../../primitives/alert.js';
|
|
28
28
|
import { Input } from '../../primitives/input.js';
|
|
29
29
|
import { Label } from '../../primitives/label.js';
|
|
30
30
|
import Loading from '../../primitives/loading.js';
|
|
@@ -191,7 +191,7 @@ export function PoliciesPanel({ projectId }) {
|
|
|
191
191
|
setDefaultMode(seeded.defaultMode);
|
|
192
192
|
}
|
|
193
193
|
if (isForbidden) {
|
|
194
|
-
return (
|
|
194
|
+
return (_jsxs(BannerAlert, { variant: "warning", children: [_jsx(BannerAlertTitle, { children: tI18nHardcoded.raw('autoComponentsProjectsPoliciesPanelJsxAttrTitleAdminAccessRequired34f66101') }), _jsx(BannerAlertDescription, { children: tI18nHardcoded.raw('autoComponentsProjectsPoliciesPanelJsxTextOnlyProjectManagersCan603f67fc') })] }));
|
|
195
195
|
}
|
|
196
196
|
const parseErrors = query.data?.errors ?? [];
|
|
197
197
|
return (_jsxs("div", { className: "flex h-full w-full flex-1 grow flex-col space-y-8", children: [_jsxs("section", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: tI18nHardcoded.raw('i18nComplete.texta98b3578d57b') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tI18nHardcoded.raw('i18nComplete.text39839e17c1cd') })] }), query.isLoading ? (_jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [_jsx(Skeleton, { className: "h-18 rounded-md" }), _jsx(Skeleton, { className: "h-18 rounded-md" })] })) : (_jsx("div", { className: "grid gap-2 sm:grid-cols-2", children: defaultOptions.map((opt) => {
|
|
@@ -202,7 +202,7 @@ export function PoliciesPanel({ projectId }) {
|
|
|
202
202
|
'transition-[background-color,border-color,scale] duration-normal ease-out', 'motion-safe:active:scale-[0.99]', selected
|
|
203
203
|
? 'border-primary/40 bg-primary/[0.06]'
|
|
204
204
|
: 'bg-popover hover:bg-foreground/[0.03]'), children: [_jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [_jsx("span", { className: "text-foreground text-sm font-medium", children: opt.label }), selected ? _jsx(CheckIcon, { className: "text-foreground size-4 shrink-0" }) : null] }), _jsx("span", { className: "text-muted-foreground text-xs text-pretty", children: opt.description })] }, opt.value));
|
|
205
|
-
}) }))] }), _jsxs("section", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: tI18nHardcoded.raw('i18nComplete.text4228aeb07c41') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tI18nHardcoded.raw('i18nComplete.texteb35a8dd49a7') })] }), draft.length > 0 && (_jsxs(Button, { size: "sm", variant: "secondary", className: "shrink-0 gap-1.5 self-start sm:self-auto", onClick: addRule, disabled: query.isLoading, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), tI18nHardcoded.raw('i18nComplete.texta27cff51a2e0')] }))] }), parseErrors.length > 0 && (
|
|
205
|
+
}) }))] }), _jsxs("section", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { children: tI18nHardcoded.raw('i18nComplete.text4228aeb07c41') }), _jsx("p", { className: "text-muted-foreground text-xs text-pretty", children: tI18nHardcoded.raw('i18nComplete.texteb35a8dd49a7') })] }), draft.length > 0 && (_jsxs(Button, { size: "sm", variant: "secondary", className: "shrink-0 gap-1.5 self-start sm:self-auto", onClick: addRule, disabled: query.isLoading, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), tI18nHardcoded.raw('i18nComplete.texta27cff51a2e0')] }))] }), parseErrors.length > 0 && (_jsxs(BannerAlert, { variant: "warning", children: [_jsx(BannerAlertTitle, { children: tI18nHardcoded.raw('autoComponentsProjectsPoliciesPanelJsxAttrTitleKortixTomlHad8db85c74') }), _jsx(BannerAlertDescription, { children: _jsx("ul", { className: "space-y-1", children: parseErrors.map((e) => (_jsxs("li", { className: "text-xs", children: [_jsx("span", { className: "font-mono", children: e.path }), ": ", e.error] }, `${e.path}:${e.error}`))) }) })] })), query.isLoading ? (_jsx("div", { className: "space-y-2", children: [0, 1].map((i) => (_jsx(Skeleton, { className: "h-28 rounded-md" }, i))) })) : draft.length === 0 ? (_jsx("div", { className: "bg-popover rounded-md border", children: _jsx(EmptyState, { icon: ShieldCheckIcon, size: "sm", className: "p-8 md:p-10", title: tI18nHardcoded.raw('autoComponentsProjectsPoliciesPanelJsxAttrTitleNoRulesYet795c2fb5'), description: tI18nHardcoded.raw('autoComponentsProjectsPoliciesPanelJsxAttrDescriptionRequireApprovalFor7e7b9477'), action: _jsxs(Button, { size: "sm", variant: "outline", className: "gap-1.5", onClick: addRule, children: [_jsx(PlusIcon, { className: "size-4 shrink-0" }), tI18nHardcoded.raw('i18nComplete.texta27cff51a2e0')] }) }) })) : (_jsx("ul", { className: "space-y-2", children: draft.map((rule, idx) => (_jsx(RuleRow, { rule: rule, index: idx, onChange: (patch) => updateRule(rule.id, patch), onRemove: () => removeRule(rule.id), onAddCondition: () => addCondition(rule.id), onChangeCondition: (cIdx, patch) => updateCondition(rule.id, cIdx, patch), onRemoveCondition: (cIdx) => removeCondition(rule.id, cIdx) }, rule.id))) }))] }), dirty && (_jsxs("div", { className: "bg-popover z-10 mt-auto flex flex-wrap items-center justify-between gap-3 rounded-md border px-4 py-3", children: [_jsxs("p", { className: "text-muted-foreground min-w-0 text-xs text-pretty", children: [tI18nHardcoded.raw('i18nComplete.text53121d4517f7'), ' ', _jsx("code", { className: "bg-muted text-foreground rounded-sm px-1 py-0.5 font-mono text-xs", children: "kortix.yaml" }), "."] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: revert, disabled: save.isPending, children: tI18nHardcoded.raw('i18nComplete.text0026c5053478') }), _jsxs(Button, { size: "sm", onClick: () => save.mutate(), disabled: save.isPending, children: [save.isPending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, tI18nHardcoded.raw('i18nComplete.textdd0ae7a5cbcf')] })] })] }))] }));
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* One rule: which tool it covers, what to do, and any argument conditions.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The agent board (`/
|
|
2
|
+
* The agent board (`/workspaces/<id>/sessions?view=board`): every session of the
|
|
3
3
|
* project grouped by what it needs from the person, as Claude Code's agent view
|
|
4
4
|
* groups background sessions. Pure functions; the board component renders them.
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ import { Button } from '../../primitives/button.js';
|
|
|
7
7
|
import { Disclosure, DisclosureContent, DisclosureTrigger } from '../../primitives/disclosure.js';
|
|
8
8
|
import { FadedScrollArea } from '../../primitives/faded-scroll-area.js';
|
|
9
9
|
import { Skeleton } from '../../primitives/skeleton.js';
|
|
10
|
-
import { Tabs, TabsList,
|
|
10
|
+
import { Tabs, TabsList, TabsTrigger } from '../../primitives/tabs.js';
|
|
11
11
|
import { errorToast, successToast, warningToast } from '../../primitives/toast.js';
|
|
12
12
|
import { EmptyState } from '../../primitives/empty-state.js';
|
|
13
13
|
import { ErrorState } from '../../primitives/error-state.js';
|
|
@@ -546,7 +546,7 @@ export function ProjectSessionsView({ projectId }) {
|
|
|
546
546
|
} })) : null }), childrenOpen ? (_jsx(SessionChildrenRows, { projectId: projectId, parentId: session.session_id, q: searching && session.search_match === 'child' ? searchQuery : undefined, renderRow: (child) => renderRow(child) })) : null] }, session.session_id));
|
|
547
547
|
};
|
|
548
548
|
const header = selectMode ? (_jsx(SessionsSelectionBar, { selectedCount: selectedCount, selectableCount: selectableSessions.length, allSelected: allSelected, onSelectAll: () => setSelected(new Set(selectableSessions.map((session) => session.session_id))), onClearSelection: () => setSelected(new Set()), onExit: exitSelectMode, onDelete: () => setBulkConfirmOpen(true), deleting: bulkDeleteMutation.isPending, onArchive: () => bulkArchiveMutation.mutate({ sessionIds: [...visibleSelection], archived: !archivedTab }), archiveLabel: tPinArchive(archivedTab ? 'bulkUnarchive' : 'bulkArchive'), archiving: bulkArchiveMutation.isPending })) : (_jsx(SessionsToolbar, { projectId: projectId, sessions: sessions, reviewCountBySession: needsYouBySession, search: search, onSearchChange: setSearch, searchOpen: searchOpen, onSearchOpenChange: setSearchOpen, onEnterSelectMode: () => setSelectMode(true), creatingSession: creatingSession, canSelect: sessions.length > 0 && !deletedTab, showNewSession: !channelsOn }));
|
|
549
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "relative flex h-full min-h-0 flex-col overflow-hidden", children: [_jsx(SidebarToggle, { placement: "floating" }), _jsxs("header", { className: cn('mx-auto w-full max-w-4xl shrink-0 px-4 pt-10 pb-5 lg:pt-20', 'flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between'), children: [_jsx("div", { className: "space-y-1", children: _jsx("h2", { className: "text-foreground text-xl font-medium", children: tI18nComplete.raw('text6fa3cbf451b2') }) }), _jsxs("div", { className: "mt-2 flex shrink-0 items-center gap-2 sm:mt-0", children: [_jsx(Tabs, { value: layout, onValueChange: (value) => selectLayout(value), children: _jsxs(TabsList, { "aria-label": tBoard('layoutLabel'), children: [_jsxs(TabsTrigger, { value: "list", size: "sm", className: "gap-1.5", children: [_jsx(ListIcon, { className: "size-3.5" }), tBoard('layoutList')] }), _jsxs(TabsTrigger, { value: "board", size: "sm", className: "gap-1.5", children: [_jsx(KanbanIcon, { className: "size-3.5" }), tBoard('layoutBoard')] })] }) }), layout === 'list' ? header : null] })] }), _jsx("div", { className: cn('mx-auto flex min-h-0 w-full max-w-4xl flex-1 flex-col px-4 pb-4'), children: layout === 'board' ? (_jsx(SessionsBoard, { projectId: projectId })) : (_jsxs(_Fragment, { children: [_jsx(Tabs, { value: startedBy, onValueChange: (value) => selectTab(value), className: "shrink-0", children: _jsxs(
|
|
549
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "relative flex h-full min-h-0 flex-col overflow-hidden", children: [_jsx(SidebarToggle, { placement: "floating" }), _jsxs("header", { className: cn('mx-auto w-full max-w-4xl shrink-0 px-4 pt-10 pb-5 lg:pt-20', 'flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between'), children: [_jsx("div", { className: "space-y-1", children: _jsx("h2", { className: "text-foreground text-xl font-medium", children: tI18nComplete.raw('text6fa3cbf451b2') }) }), _jsxs("div", { className: "mt-2 flex shrink-0 items-center gap-2 sm:mt-0", children: [_jsx(Tabs, { value: layout, onValueChange: (value) => selectLayout(value), children: _jsxs(TabsList, { "aria-label": tBoard('layoutLabel'), children: [_jsxs(TabsTrigger, { value: "list", size: "sm", className: "gap-1.5", children: [_jsx(ListIcon, { className: "size-3.5" }), tBoard('layoutList')] }), _jsxs(TabsTrigger, { value: "board", size: "sm", className: "gap-1.5", children: [_jsx(KanbanIcon, { className: "size-3.5" }), tBoard('layoutBoard')] })] }) }), layout === 'list' ? header : null] })] }), _jsx("div", { className: cn('mx-auto flex min-h-0 w-full max-w-4xl flex-1 flex-col px-4 pb-4'), children: layout === 'board' ? (_jsx(SessionsBoard, { projectId: projectId })) : (_jsxs(_Fragment, { children: [_jsx(Tabs, { value: startedBy, onValueChange: (value) => selectTab(value), className: "shrink-0", children: _jsxs(TabsList, { size: "xs", "aria-label": tSidebar('startedBy.label'), children: [STARTED_BY_FILTERS.map((value) => (_jsx(TabsTrigger, { value: value, children: tSidebar(`startedBy.${value}`) }, value))), _jsx(TabsTrigger, { value: "archived", children: tPinArchive('view') }), _jsx(TabsTrigger, { value: "deleted", children: tDeleted('view') })] }) }), listState === 'loading' ? (_jsx(SessionListSkeleton, {})) : listState === 'error' ? (_jsx(ErrorState, { size: "sm", title: tI18nComplete.raw('textb6d85433a7ee'), description: sessionsQuery.error instanceof Error ? sessionsQuery.error.message : undefined, action: _jsx(Button, { variant: "outline", size: "sm", onClick: () => sessionsQuery.refetch(), children: tI18nComplete.raw('text942087cc2d41') }) })) : listState === 'more' ? (
|
|
550
550
|
// No row the viewer can see on the pages read so far, and more
|
|
551
551
|
// pages exist (KRTX-1727): offer them, never "No sessions yet".
|
|
552
552
|
_jsx("div", { className: "pt-6", children: loadMoreButton })) : listState === 'empty' && !searching && archivedTab ? (_jsx(EmptyState, { size: "sm", title: tPinArchive('empty') })) : listState === 'empty' && !searching && deletedTab ? (_jsx(EmptyState, { size: "sm", title: tDeleted('empty', { days: RESTORE_DAYS }) })) : deletedTab && listState !== 'empty' ? (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { uiRoutes } from '../../lib/routes.js';
|
|
4
4
|
import { Button } from '../../primitives/button.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Alert as BannerAlert, AlertTitle as BannerAlertTitle, AlertDescription as BannerAlertDescription, AlertMedia as BannerAlertMedia } from '../../primitives/alert.js';
|
|
6
6
|
import { cn } from '../../internal/lib/utils.js';
|
|
7
7
|
import { ArrowSquareOutIcon, WarningIcon } from '@phosphor-icons/react';
|
|
8
8
|
import { useTranslations } from '../../i18n/index.js';
|
|
@@ -16,5 +16,5 @@ export function SessionDetail({ projectId, session, formatted, }) {
|
|
|
16
16
|
const access = sessionAccessMeta(session, tI18nComplete);
|
|
17
17
|
const fields = sessionDetailFields(session, formatted, tI18nComplete);
|
|
18
18
|
const href = uiRoutes().session(projectId, session.session_id);
|
|
19
|
-
return (_jsxs("div", { className: "space-y-5 px-4 py-5", children: [_jsx("dl", { className: "grid gap-x-6 gap-y-4 sm:grid-cols-2 lg:grid-cols-3", children: fields.map((field) => (_jsx(DetailItem, { ...field }, field.label))) }), session.error ? (
|
|
19
|
+
return (_jsxs("div", { className: "space-y-5 px-4 py-5", children: [_jsx("dl", { className: "grid gap-x-6 gap-y-4 sm:grid-cols-2 lg:grid-cols-3", children: fields.map((field) => (_jsx(DetailItem, { ...field }, field.label))) }), session.error ? (_jsxs(BannerAlert, { variant: "destructive", children: [_jsx(BannerAlertMedia, { children: _jsx(WarningIcon, {}) }), _jsx(BannerAlertTitle, { children: tI18nComplete.raw('text650e4f3bbda1') }), _jsx(BannerAlertDescription, { children: _jsx("span", { className: "wrap-break-word", children: session.error }) })] })) : null, session.deleted_at ? (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertTitle, { children: tI18nComplete.raw('textfdb73b4a48f2') }), _jsx(BannerAlertDescription, { children: _jsxs("span", { children: [tI18nComplete.raw('textb48ff39c2e0f'), ' ', formatted.deleted ?? tI18nComplete.raw('texted8aa125a36b'), session.deleted_by ? ` by ${session.deleted_by}` : '', tI18nComplete.raw('text78a10fea0bef')] }) })] })) : session.can_access === false ? (_jsxs(BannerAlert, { variant: "default", children: [_jsx(BannerAlertTitle, { children: tI18nComplete.raw('text4acf3c9c6c5e') }), _jsx(BannerAlertDescription, { children: tI18nComplete.raw('text1f5bdc1c9cf0') })] })) : null, access.canOpen ? (_jsx("div", { className: "flex justify-end border-t pt-4", children: _jsx(Button, { variant: "outline", size: "sm", asChild: true, children: _jsxs(Link, { href: href, children: [tI18nComplete.raw('textb205bb47f81a'), _jsx(ArrowSquareOutIcon, { className: "size-3.5 shrink-0" })] }) }) })) : null] }));
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The agent board (`/
|
|
2
|
+
* The agent board (`/workspaces/<id>/sessions?view=board`), Claude Code's agent
|
|
3
3
|
* view in Kortix's own look: every session of the project, child sessions
|
|
4
4
|
* included, grouped by what it needs (Pinned, Needs input, Working, Ready for
|
|
5
5
|
* review, Completed, Failed · Stopped). One input on top starts a session
|
|
@@ -44,7 +44,7 @@ function useMinuteClock() {
|
|
|
44
44
|
return now;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* The agent board (`/
|
|
47
|
+
* The agent board (`/workspaces/<id>/sessions?view=board`), Claude Code's agent
|
|
48
48
|
* view in Kortix's own look: every session of the project, child sessions
|
|
49
49
|
* included, grouped by what it needs (Pinned, Needs input, Working, Ready for
|
|
50
50
|
* review, Completed, Failed · Stopped). One input on top starts a session
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** `split_notice` on a served workspace (C9). Absent on an older API. */
|
|
2
|
+
export interface WorkspaceSplitNotice {
|
|
3
|
+
role: 'keeper' | 'moved';
|
|
4
|
+
source_name: string;
|
|
5
|
+
completed_at: string;
|
|
6
|
+
billing: 'free' | 'comped' | null;
|
|
7
|
+
comped_until: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function splitNoticeOf(workspace: unknown): WorkspaceSplitNotice | null;
|
|
10
|
+
export declare function SplitNoticeBanner({ workspaceId, className }: {
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* The split notice (design.md C9): for 30 days after a legacy account's
|
|
5
|
+
* workspaces became their own workspaces, `GET /v1/workspaces/:id` carries
|
|
6
|
+
* `split_notice`. The workspace home and Settings › General say what changed:
|
|
7
|
+
* a moved workspace has its own people, billing and settings now; the keeper
|
|
8
|
+
* lost the others. A viewer can dismiss it; the dismissal stays in this
|
|
9
|
+
* browser only.
|
|
10
|
+
*/
|
|
11
|
+
import { useWorkspace } from '@kortix/sdk/react';
|
|
12
|
+
import { XIcon } from '@phosphor-icons/react';
|
|
13
|
+
import { useState } from 'react';
|
|
14
|
+
import { useLocale, useTranslations } from '../../i18n/index.js';
|
|
15
|
+
import { Button } from '../../primitives/button.js';
|
|
16
|
+
import { Alert as BannerAlert, AlertTitle as BannerAlertTitle, AlertDescription as BannerAlertDescription, AlertActions as BannerAlertActions } from '../../primitives/alert.js';
|
|
17
|
+
import { formatWorkspaceDate } from '../project-selector/project-selector-model.js';
|
|
18
|
+
export function splitNoticeOf(workspace) {
|
|
19
|
+
const notice = workspace?.split_notice;
|
|
20
|
+
return notice && (notice.role === 'keeper' || notice.role === 'moved') ? notice : null;
|
|
21
|
+
}
|
|
22
|
+
const DISMISS_KEY = (workspaceId) => `kortix.splitNotice.dismissed.${workspaceId}`;
|
|
23
|
+
function readDismissed(workspaceId) {
|
|
24
|
+
try {
|
|
25
|
+
return window.localStorage.getItem(DISMISS_KEY(workspaceId)) === '1';
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function SplitNoticeBanner({ workspaceId, className }) {
|
|
32
|
+
const t = useTranslations('workspaces.splitNotice');
|
|
33
|
+
const locale = useLocale();
|
|
34
|
+
const workspace = useWorkspace(workspaceId);
|
|
35
|
+
const notice = splitNoticeOf(workspace.data);
|
|
36
|
+
const [dismissed, setDismissed] = useState(() => (typeof window === 'undefined' ? false : readDismissed(workspaceId)));
|
|
37
|
+
if (!notice || dismissed)
|
|
38
|
+
return null;
|
|
39
|
+
const date = formatWorkspaceDate(notice.completed_at, locale);
|
|
40
|
+
const body = notice.role === 'moved'
|
|
41
|
+
? t('movedBody', { source: notice.source_name, date })
|
|
42
|
+
: t('keeperBody', { source: notice.source_name, date });
|
|
43
|
+
const billing = notice.role !== 'moved'
|
|
44
|
+
? null
|
|
45
|
+
: notice.billing === 'comped'
|
|
46
|
+
? t('billingComped', { date: formatWorkspaceDate(notice.comped_until, locale) })
|
|
47
|
+
: notice.billing === 'free'
|
|
48
|
+
? t('billingFree')
|
|
49
|
+
: null;
|
|
50
|
+
return (_jsxs(BannerAlert, { variant: "default", className: className, "data-testid": "split-notice", children: [_jsx(BannerAlertTitle, { children: notice.role === 'moved' ? t('movedTitle') : t('keeperTitle') }), _jsxs(BannerAlertDescription, { children: [body, billing ? ` ${billing}` : null] }), _jsx(BannerAlertActions, { children: _jsx(Button, { variant: "ghost", size: "icon-xs", "aria-label": t('dismiss'), onClick: () => {
|
|
51
|
+
try {
|
|
52
|
+
window.localStorage.setItem(DISMISS_KEY(workspaceId), '1');
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// Private mode: the banner hides for this view only.
|
|
56
|
+
}
|
|
57
|
+
setDismissed(true);
|
|
58
|
+
}, children: _jsx(XIcon, { className: "size-3.5" }) }) })] }));
|
|
59
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type AccountMember, type WorkspaceRole } from '@kortix/sdk';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
/** A member row's ladder role: the served `role`, else the account role an older API sends. */
|
|
4
|
+
export declare function memberWorkspaceRole(member: Pick<AccountMember, 'role' | 'account_role'>): WorkspaceRole;
|
|
5
|
+
/**
|
|
6
|
+
* Leave a workspace: `POST /v1/workspaces/:id/leave`. The last owner cannot
|
|
7
|
+
* leave (they transfer ownership or delete the workspace), so the action is
|
|
8
|
+
* offered only when the caller is not an owner, or another owner exists.
|
|
9
|
+
* General's Danger zone and the workspace menu share it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useLeaveWorkspace(workspaceId: string): {
|
|
12
|
+
canLeave: boolean;
|
|
13
|
+
workspaceName: string;
|
|
14
|
+
open: () => void;
|
|
15
|
+
dialog: ReactNode;
|
|
16
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { leaveWorkspace, listWorkspaceMembers } from '@kortix/sdk';
|
|
4
|
+
import { qk, useWorkspace } from '@kortix/sdk/react';
|
|
5
|
+
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
8
|
+
import { PROJECT_LANDING_PATH } from '../../internal/lib/onboarding/landing-destination.js';
|
|
9
|
+
import { forgetLastProjectId } from '../../internal/lib/onboarding/last-project-cookie.js';
|
|
10
|
+
import { useSettingsPanelStore } from '../../internal/stores/settings-panel-store.js';
|
|
11
|
+
import { ConfirmDialog } from '../../primitives/confirm-dialog.js';
|
|
12
|
+
import { errorToast, successToast } from '../../primitives/toast.js';
|
|
13
|
+
import { useUiRouter, useUiViewerId } from '../../providers/ui-provider.js';
|
|
14
|
+
/** A member row's ladder role: the served `role`, else the account role an older API sends. */
|
|
15
|
+
export function memberWorkspaceRole(member) {
|
|
16
|
+
return member.role ?? member.account_role ?? 'member';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Leave a workspace: `POST /v1/workspaces/:id/leave`. The last owner cannot
|
|
20
|
+
* leave (they transfer ownership or delete the workspace), so the action is
|
|
21
|
+
* offered only when the caller is not an owner, or another owner exists.
|
|
22
|
+
* General's Danger zone and the workspace menu share it.
|
|
23
|
+
*/
|
|
24
|
+
export function useLeaveWorkspace(workspaceId) {
|
|
25
|
+
const t = useTranslations('workspaces.settings');
|
|
26
|
+
const queryClient = useQueryClient();
|
|
27
|
+
const router = useUiRouter();
|
|
28
|
+
const viewerId = useUiViewerId();
|
|
29
|
+
const [isOpen, setOpen] = useState(false);
|
|
30
|
+
const workspace = useWorkspace(workspaceId);
|
|
31
|
+
const isOwner = workspace.data?.role === 'owner';
|
|
32
|
+
const members = useQuery({
|
|
33
|
+
queryKey: ['workspace-members', workspaceId],
|
|
34
|
+
queryFn: () => listWorkspaceMembers(workspaceId),
|
|
35
|
+
enabled: isOwner,
|
|
36
|
+
staleTime: 30_000,
|
|
37
|
+
});
|
|
38
|
+
const ownerCount = (members.data ?? []).filter((member) => memberWorkspaceRole(member) === 'owner').length;
|
|
39
|
+
const canLeave = !!workspace.data && (!isOwner || ownerCount > 1);
|
|
40
|
+
const workspaceName = workspace.data?.name ?? '';
|
|
41
|
+
const leave = useMutation({
|
|
42
|
+
mutationFn: () => leaveWorkspace(workspaceId),
|
|
43
|
+
onSuccess: () => {
|
|
44
|
+
forgetLastProjectId(viewerId, workspaceId);
|
|
45
|
+
void queryClient.invalidateQueries({ queryKey: qk.projects.scope() });
|
|
46
|
+
void queryClient.invalidateQueries({ queryKey: qk.accounts.scope() });
|
|
47
|
+
successToast(t('leftToast', { name: workspaceName }));
|
|
48
|
+
setOpen(false);
|
|
49
|
+
useSettingsPanelStore.getState().close();
|
|
50
|
+
router.replace(PROJECT_LANDING_PATH);
|
|
51
|
+
},
|
|
52
|
+
onError: (error) => errorToast(error.message || t('leaveFailed')),
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
canLeave,
|
|
56
|
+
workspaceName,
|
|
57
|
+
open: () => setOpen(true),
|
|
58
|
+
dialog: (_jsx(ConfirmDialog, { open: isOpen, onOpenChange: setOpen, title: t('leaveTitle'), description: t('leaveDialog', { name: workspaceName }), confirmLabel: t('leaveWorkspace'), confirmVariant: "destructive", onConfirm: () => leave.mutate(), isPending: leave.isPending })),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -11,12 +11,15 @@ import { useCallback } from 'react';
|
|
|
11
11
|
function useBalanceWarning(accountId, tI18nComplete) {
|
|
12
12
|
const { data: accountState } = useAccountState({ accountId });
|
|
13
13
|
const openUpgradeDialog = useUpgradeDialogStore((s) => s.openUpgradeDialog);
|
|
14
|
-
//
|
|
15
|
-
// a
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
14
|
+
// The row is a door into the billing dialog, so it shows only where that
|
|
15
|
+
// dialog has a way out: one-off top-ups, or (since 2026-11-09, when top-ups
|
|
16
|
+
// went Enterprise-only) a live subscription whose monthly tier can be raised.
|
|
17
|
+
// A free account keeps the "Upgrade Plan" button instead. A caller without
|
|
18
|
+
// `billing.write` cannot act either; the session error banner tells them to
|
|
19
|
+
// ask an owner when the wallet actually blocks a run.
|
|
20
|
+
const canTopUp = ((accountState?.tier?.can_purchase_credits ?? false) ||
|
|
21
|
+
(accountState?.has_active_subscription ?? false)) &&
|
|
22
|
+
canManageBilling(accountState);
|
|
20
23
|
const handleClick = useCallback(() => openUpgradeDialog(billingDialogArgs(resolveBillingState(accountState), accountState, accountId, tI18nComplete)), [openUpgradeDialog, accountId, accountState, tI18nComplete]);
|
|
21
24
|
if (!platformConfig().billingEnabled || !accountState || !canTopUp) {
|
|
22
25
|
return { severity: null, handleClick };
|
|
@@ -48,8 +48,8 @@ export function ProjectFilesNavItem({ projectId }) {
|
|
|
48
48
|
const conflicts = target === 'drive' ? (drive.data?.openConflicts ?? 0) : 0;
|
|
49
49
|
const isActive = !!pathname &&
|
|
50
50
|
(target === 'drive'
|
|
51
|
-
? /^\/projects\/[^/]+\/drive(\/|$)/
|
|
52
|
-
: /^\/projects\/[^/]+\/files(\/|$)/).test(pathname);
|
|
51
|
+
? /^\/(?:workspaces|projects)\/[^/]+\/drive(\/|$)/
|
|
52
|
+
: /^\/(?:workspaces|projects)\/[^/]+\/files(\/|$)/).test(pathname);
|
|
53
53
|
// The Files view cannot pick a git ref (`resolveFilesRef`,
|
|
54
54
|
// `project-layout/resolve-files-ref.ts`) until it knows the project's
|
|
55
55
|
// default branch — one request, `qk.project.summary(id)` — unless a
|
|
@@ -60,7 +60,7 @@ export const MEMBER_LABEL = {
|
|
|
60
60
|
building: 'Preparing sandbox…',
|
|
61
61
|
};
|
|
62
62
|
export const MEMBER_TEXT = {
|
|
63
|
-
critical: 'New sessions can’t start right now. An owner or admin of this
|
|
63
|
+
critical: 'New sessions can’t start right now. An owner or admin of this workspace can fix it.',
|
|
64
64
|
building: 'Sessions can start once it’s ready.',
|
|
65
65
|
};
|
|
66
66
|
export const MEMBER_TONE = {
|
|
@@ -5,7 +5,7 @@ export declare function SidebarAlertRow({ tone, icon, label, trailing, onClick,
|
|
|
5
5
|
tone: SidebarAlertTone;
|
|
6
6
|
icon: ReactNode;
|
|
7
7
|
label: string;
|
|
8
|
-
/** Optional right-aligned hint naming what the click does ("
|
|
8
|
+
/** Optional right-aligned hint naming what the click does ("Add credits"). */
|
|
9
9
|
trailing?: ReactNode;
|
|
10
10
|
onClick: () => void;
|
|
11
11
|
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pending invites at the top of the Switch
|
|
3
|
-
* has a
|
|
2
|
+
* Pending invites at the top of the Switch workspace menu. A user who already
|
|
3
|
+
* has a workspace lands in it, not on the chooser, so this is where an invite
|
|
4
4
|
* that arrives later is found. Renders nothing when there are none.
|
|
5
5
|
*/
|
|
6
6
|
export declare function InvitationsMenuGroup(): import("react").JSX.Element | null;
|
|
@@ -13,12 +13,12 @@ import { qk } from '@kortix/sdk/react';
|
|
|
13
13
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
14
14
|
import { useUiRouter } from '../../providers/ui-provider.js';
|
|
15
15
|
/**
|
|
16
|
-
* Pending invites at the top of the Switch
|
|
17
|
-
* has a
|
|
16
|
+
* Pending invites at the top of the Switch workspace menu. A user who already
|
|
17
|
+
* has a workspace lands in it, not on the chooser, so this is where an invite
|
|
18
18
|
* that arrives later is found. Renders nothing when there are none.
|
|
19
19
|
*/
|
|
20
20
|
export function InvitationsMenuGroup() {
|
|
21
|
-
const t = useTranslations('
|
|
21
|
+
const t = useTranslations('workspaces.chooser');
|
|
22
22
|
const router = useUiRouter();
|
|
23
23
|
const queryClient = useQueryClient();
|
|
24
24
|
const setSelectedAccountId = useCurrentAccountStore((state) => state.setSelectedAccountId);
|
|
@@ -37,7 +37,7 @@ export function InvitationsMenuGroup() {
|
|
|
37
37
|
router.push(inviteLandingPath(landing));
|
|
38
38
|
},
|
|
39
39
|
onError: (error) => {
|
|
40
|
-
errorToast(error instanceof Error ? error.message : t('joinError'));
|
|
40
|
+
errorToast(error instanceof Error && error.message ? error.message : t('joinError'));
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
if (invites.length === 0)
|
|
@@ -27,7 +27,7 @@ function countPhrase(count, singular) {
|
|
|
27
27
|
export function sessionAccessSummary(session) {
|
|
28
28
|
const owner = sessionOwnerName(session);
|
|
29
29
|
if (session.visibility === 'project')
|
|
30
|
-
return 'Every member of this
|
|
30
|
+
return 'Every member of this workspace can open it.';
|
|
31
31
|
if (session.visibility === 'restricted') {
|
|
32
32
|
const sharing = session.sharing;
|
|
33
33
|
const memberIds = sharing && sharing.mode === 'members' ? (sharing.memberIds ?? []) : [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Button } from '../../../primitives/button.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Alert as BannerAlert, AlertDescription as BannerAlertDescription, AlertMedia as BannerAlertMedia } from '../../../primitives/alert.js';
|
|
5
5
|
import Loading from '../../../primitives/loading.js';
|
|
6
6
|
import { Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, } from '../../../primitives/modal.js';
|
|
7
7
|
import { errorToast, successToast } from '../../../primitives/toast.js';
|
|
@@ -13,7 +13,6 @@ import { sessionOversightQueryKey } from '../../../access/iam/session-oversight-
|
|
|
13
13
|
import { ShieldCheckIcon } from '@phosphor-icons/react';
|
|
14
14
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
15
15
|
import { useEffect, useState } from 'react';
|
|
16
|
-
import { SessionEmbedSection } from './session-embed-section.js';
|
|
17
16
|
import { sessionAccessSummary, sessionAccessView } from './share-session-access.js';
|
|
18
17
|
import { refreshAfterShare } from './share-session-cache.js';
|
|
19
18
|
/**
|
|
@@ -27,7 +26,7 @@ import { refreshAfterShare } from './share-session-cache.js';
|
|
|
27
26
|
*/
|
|
28
27
|
const SESSION_SHARING_COPY = {
|
|
29
28
|
heading: 'Who can open this session',
|
|
30
|
-
project: { label: 'Whole
|
|
29
|
+
project: { label: 'Whole workspace', desc: 'Every member of this workspace.' },
|
|
31
30
|
private: { label: 'Only you', desc: 'Nobody else can open this session.' },
|
|
32
31
|
members: { label: 'Specific people', desc: 'Only the members and groups you choose.' },
|
|
33
32
|
};
|
|
@@ -59,7 +58,7 @@ export function ShareSessionModal({ projectId, session, open, onOpenChange, onSa
|
|
|
59
58
|
// while the dialog is open (a user action), and silently absent on any error
|
|
60
59
|
// — the IAM read never toasts (`showErrors: false`).
|
|
61
60
|
const accountId = session?.account_id ?? null;
|
|
62
|
-
const { accountApiEnabled
|
|
61
|
+
const { accountApiEnabled } = useUiHostConfig();
|
|
63
62
|
const oversightQuery = useQuery({
|
|
64
63
|
queryKey: sessionOversightQueryKey(accountId ?? ''),
|
|
65
64
|
queryFn: () => getSessionOversight(accountId),
|
|
@@ -105,5 +104,5 @@ export function ShareSessionModal({ projectId, session, open, onOpenChange, onSa
|
|
|
105
104
|
// Read-only, not hidden: a person a session was shared with should
|
|
106
105
|
// still be able to see who else is in it. Withholding that is what
|
|
107
106
|
// sent people to the editable dialog in the first place.
|
|
108
|
-
_jsx("p", { className: "text-foreground text-sm", "data-testid": "session-access-summary", children: session ? sessionAccessSummary(session) : null })), oversightOn ? (
|
|
107
|
+
_jsx("p", { className: "text-foreground text-sm", "data-testid": "session-access-summary", children: session ? sessionAccessSummary(session) : null })), oversightOn ? (_jsxs(BannerAlert, { variant: "default", "data-testid": "session-oversight-disclosure", children: [_jsx(BannerAlertMedia, { children: _jsx(ShieldCheckIcon, {}) }), _jsx(BannerAlertDescription, { children: tOversight.raw('shareDisclosure') })] })) : null] }), _jsxs(ModalFooter, { className: "sm:justify-between", children: [_jsx(Button, { variant: "outline-ghost", size: "sm", className: "w-full sm:w-auto", onClick: () => onOpenChange(false), disabled: save.isPending, children: view.canEdit ? 'Cancel' : 'Close' }), view.canEdit && (_jsxs(Button, { size: "sm", onClick: () => save.mutate(), disabled: save.isPending || !isSharingComplete(sharing) || blockedSelection, className: "w-full sm:w-auto", children: [save.isPending && _jsx(Loading, {}), tI18nHardcoded.raw('i18nComplete.text1509f561f241')] }))] })] }) }));
|
|
109
108
|
}
|
|
@@ -5,18 +5,17 @@ import { ProjectGoalsNavItem } from './footer/project-goals-nav.js';
|
|
|
5
5
|
import { ProjectArtifactsNavItem } from './footer/project-artifacts-nav.js';
|
|
6
6
|
import { ProjectFilesNavItem } from './footer/project-files-nav.js';
|
|
7
7
|
import { CustomizeGlyph, useCapabilityAccess, } from '../../internal/layout/project-settings-nav.js';
|
|
8
|
-
import { isProjectAdminPath,
|
|
8
|
+
import { isProjectAdminPath, useOpenNewAgent } from '../../internal/layout/project-capability-nav.js';
|
|
9
9
|
import { PROJECT_ACTIONS } from '../../internal/lib/project-actions.js';
|
|
10
10
|
import { useProjectCan } from '../../internal/lib/use-project-can.js';
|
|
11
11
|
import { Button } from '../../primitives/button.js';
|
|
12
12
|
import Hint from '../../primitives/hint.js';
|
|
13
|
-
import { cn } from '../../lib/utils.js';
|
|
14
13
|
import { SidebarMenuButton, SidebarMenuItem, useSidebar } from '../../primitives/sidebar.js';
|
|
15
14
|
import { useIsMobile } from '../../internal/hooks/index.js';
|
|
16
15
|
import { useTranslations } from '../../i18n/index.js';
|
|
17
|
-
import {
|
|
18
|
-
import { useUiPathname } from '../../providers/ui-provider.js';
|
|
19
|
-
import {
|
|
16
|
+
import { PlusIcon } from '@phosphor-icons/react';
|
|
17
|
+
import { UiLink as Link, useUiPathname } from '../../providers/ui-provider.js';
|
|
18
|
+
import { adminPath } from '../../lib/routes.js';
|
|
20
19
|
/**
|
|
21
20
|
* The nav rows under New session, in one fixed order. Each row applies its
|
|
22
21
|
* own flag and permission gate and renders nothing when the project does not
|
|
@@ -28,14 +27,12 @@ export function ProjectNavItems({ projectId }) {
|
|
|
28
27
|
return (_jsx(_Fragment, { children: NAV_ROWS.map((id) => (_jsx(NavItem, { id: id, projectId: projectId }, id))) }));
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
31
|
-
* Customize, for the people who may configure the project
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* contexts. Absent when the caller may open no capability page (same gate
|
|
38
|
-
* as the tab bar).
|
|
30
|
+
* Customize, for the people who may configure the project: one link into
|
|
31
|
+
* Workspace settings, on Agents when the caller may read them (Customize is
|
|
32
|
+
* agent-centric). Since 2026-11-08 Customize IS that panel, so there is no
|
|
33
|
+
* disclosure here: the panel's rail lists Agents, Models, Skills and the
|
|
34
|
+
* rest, and Review is part of the Inbox. On hover, the row's right edge
|
|
35
|
+
* holds + (New agent). Absent when the caller may open no capability page.
|
|
39
36
|
*/
|
|
40
37
|
function CustomizeNavEntry({ projectId }) {
|
|
41
38
|
const t = useTranslations('sidebar');
|
|
@@ -46,11 +43,6 @@ function CustomizeNavEntry({ projectId }) {
|
|
|
46
43
|
const openNewAgent = useOpenNewAgent();
|
|
47
44
|
const isMobile = useIsMobile();
|
|
48
45
|
const { setOpenMobile } = useSidebar();
|
|
49
|
-
// `includes` tolerates the locale prefix the host may not strip.
|
|
50
|
-
const onCustomizePage = !!pathname && (pathname.includes('/customize') || isProjectAdminPath(pathname));
|
|
51
|
-
const [override, setOverride] = useState(null);
|
|
52
|
-
useEffect(() => setOverride(null), [onCustomizePage]);
|
|
53
|
-
const open = override ?? onCustomizePage;
|
|
54
46
|
if (!access.settled || access.tabs.length === 0)
|
|
55
47
|
return null;
|
|
56
48
|
const hasAgents = access.tabs.includes('agent');
|
|
@@ -58,13 +50,10 @@ function CustomizeNavEntry({ projectId }) {
|
|
|
58
50
|
if (isMobile)
|
|
59
51
|
setOpenMobile(false);
|
|
60
52
|
};
|
|
61
|
-
return (_jsxs(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
close();
|
|
66
|
-
openNewAgent();
|
|
67
|
-
}, children: _jsx(PlusIcon, { className: "size-4" }) }) })) : null] }), open ? _jsx(ProjectCapabilityNav, { projectId: projectId }) : null] }));
|
|
53
|
+
return (_jsxs(SidebarMenuItem, { className: "group/customize", children: [_jsx(SidebarMenuButton, { asChild: true, isActive: isProjectAdminPath(pathname), className: "text-sidebar-foreground pr-8", children: _jsxs(Link, { href: hasAgents ? adminPath(projectId, 'agents') : adminPath(projectId), prefetch: true, onClick: close, children: [_jsx("span", { className: "shrink-0", children: _jsx(CustomizeGlyph, {}) }), _jsx("span", { className: "truncate", children: t('customize') })] }) }), hasAgents && canCreate && openNewAgent ? (_jsx(Hint, { side: "top", label: tTabs('newAgent'), children: _jsx(Button, { variant: "secondary", size: "icon-xs", type: "button", "aria-label": tTabs('newAgent'), className: "absolute top-1/2 right-1 -translate-y-1/2 opacity-100 transition-opacity group-focus-within/customize:opacity-100 group-hover/customize:opacity-100 md:opacity-0", onClick: () => {
|
|
54
|
+
close();
|
|
55
|
+
openNewAgent();
|
|
56
|
+
}, children: _jsx(PlusIcon, { className: "size-4" }) }) })) : null] }));
|
|
68
57
|
}
|
|
69
58
|
function NavItem({ id, projectId }) {
|
|
70
59
|
switch (id) {
|
|
@@ -30,7 +30,9 @@ import { ProjectChromeNavItem } from './footer/project-chrome-nav.js';
|
|
|
30
30
|
import { CHROME_UI_ENABLED } from '../../internal/chrome/use-chrome-offered.js';
|
|
31
31
|
import { MagnifyingGlassIcon, NavigationArrowIcon, } from '@phosphor-icons/react';
|
|
32
32
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
33
|
-
import {
|
|
33
|
+
import { useWorkspaceSettingsRailStore } from '../../internal/stores/workspace-settings-rail-store.js';
|
|
34
|
+
import { SettingsReturnTracker, SidebarDrill } from './sidebar-drill.js';
|
|
35
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
34
36
|
import { SidebarBalanceWarning } from './footer/project-balance-warning.js';
|
|
35
37
|
import { SidebarUpgradeButton } from './footer/project-upgrade-button.js';
|
|
36
38
|
import { SidebarGlyph as PanelLeft } from '../../icons/sidebar-toggle.js';
|
|
@@ -48,6 +50,19 @@ export function ProjectSidebar({ projectId, menu, onOpenSearch, }) {
|
|
|
48
50
|
// Mounted outside <Sidebar>: the mobile sheet unmounts its content on close.
|
|
49
51
|
const [computerConnectOpen, setComputerConnectOpen] = useState(false);
|
|
50
52
|
const [connectMcpOpen, setConnectMcpOpen] = useState(false);
|
|
53
|
+
// Settings drill (`SidebarDrill`): a click there closes the mobile sheet.
|
|
54
|
+
const handleDrilledNavigate = useCallback(() => {
|
|
55
|
+
if (isMobile)
|
|
56
|
+
setOpenMobile(false);
|
|
57
|
+
}, [isMobile, setOpenMobile]);
|
|
58
|
+
// The page hides its own rail while this panel is docked open on the
|
|
59
|
+
// desktop. The value does not depend on the route, so it is already right
|
|
60
|
+
// when the settings page renders its first frame: no rail flashes in.
|
|
61
|
+
const setSidebarDocked = useWorkspaceSettingsRailStore((s) => s.setSidebarDocked);
|
|
62
|
+
useLayoutEffect(() => {
|
|
63
|
+
setSidebarDocked(isExpanded && !isMobile);
|
|
64
|
+
}, [isExpanded, isMobile, setSidebarDocked]);
|
|
65
|
+
useLayoutEffect(() => () => setSidebarDocked(false), [setSidebarDocked]);
|
|
51
66
|
const accountId = useBillingAccountId();
|
|
52
67
|
// Chat (`chat`): the spaces list replaces New session, and the session list
|
|
53
68
|
// moves below it, closed by default (fail-closed: off until the project answers).
|
|
@@ -111,5 +126,5 @@ export function ProjectSidebar({ projectId, menu, onOpenSearch, }) {
|
|
|
111
126
|
// box clears the 44px floor with the vertical-only extension —
|
|
112
127
|
// vertical-only because this titlebar row packs several
|
|
113
128
|
// controls side by side (KRTX-2004).
|
|
114
|
-
className: "shrink-0 hit-area-y-3", children: _jsx(MagnifyingGlassIcon, { className: "size-4" }) }) })), isMobile && (_jsx(Button, { type: "button", "aria-label": tCommon('close'), variant: "ghost", size: "icon", onClick: () => setOpenMobile(false), className: "shrink-0 hit-area-y-3", children: _jsx(Close, {}) })), !isMobile && !peek && (_jsx(Hint, { side: "bottom", label: _jsxs("span", { className: "flex items-center gap-1.5", children: [isExpanded ? t('collapse') : t('pin'), _jsxs(KbdGroup, { children: [_jsx(Kbd, { className: "font-mono", children: modSymbol }), _jsx(Kbd, { className: "font-mono", children: "B" })] })] }), children: _jsx(Button, { type: "button", "aria-label": isExpanded ? t('collapse') : t('pin'), variant: "ghost", size: "icon", onClick: toggleSidebar, className: "shrink-0", children: _jsx(PanelLeft, { className: "cn-rtl-flip" }) }) }))] })] }) }), _jsx(SidebarContent, { className: "relative min-h-0 flex-1 [scrollbar-width:'none'] overflow-hidden [-ms-overflow-style:'none'] [&::-webkit-scrollbar]:hidden [&_[data-sidebar=menu-button]]:pl-2", children: _jsxs(
|
|
129
|
+
className: "shrink-0 hit-area-y-3", children: _jsx(MagnifyingGlassIcon, { className: "size-4" }) }) })), isMobile && (_jsx(Button, { type: "button", "aria-label": tCommon('close'), variant: "ghost", size: "icon", onClick: () => setOpenMobile(false), className: "shrink-0 hit-area-y-3", children: _jsx(Close, {}) })), !isMobile && !peek && (_jsx(Hint, { side: "bottom", label: _jsxs("span", { className: "flex items-center gap-1.5", children: [isExpanded ? t('collapse') : t('pin'), _jsxs(KbdGroup, { children: [_jsx(Kbd, { className: "font-mono", children: modSymbol }), _jsx(Kbd, { className: "font-mono", children: "B" })] })] }), children: _jsx(Button, { type: "button", "aria-label": isExpanded ? t('collapse') : t('pin'), variant: "ghost", size: "icon", onClick: toggleSidebar, className: "shrink-0", children: _jsx(PanelLeft, { className: "cn-rtl-flip" }) }) }))] })] }) }), _jsx(SidebarContent, { className: "relative min-h-0 flex-1 [scrollbar-width:'none'] overflow-hidden [-ms-overflow-style:'none'] [&::-webkit-scrollbar]:hidden [&_[data-sidebar=menu-button]]:pl-2", children: _jsxs(SidebarDrill, { projectId: projectId, onNavigate: handleDrilledNavigate, children: [_jsx(SidebarGroup, { className: "py-0", children: _jsxs(SidebarMenu, { children: [chat ? null : (_jsx(SidebarMenuItem, { children: creatingSession ? (_jsx(SidebarMenuButton, { disabled: true, "aria-busy": true, className: "group/menu-button text-sidebar-foreground relative", children: newSessionRowBody })) : (_jsx(SidebarMenuButton, { asChild: true, className: "group/menu-button text-sidebar-foreground relative", children: _jsx(Link, { href: uiRoutes().project(projectId), prefetch: true, onClick: handleNewSessionClick, children: newSessionRowBody }) })) })), chat ? null : _jsx(ProjectNavItems, { projectId: projectId })] }) }), _jsx(SidebarGroup, { className: "min-h-0 flex-1 flex-col py-0", ref: sessionsGroupRef, children: chat ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "min-h-0 flex-1", children: _jsx(ProjectSpacesNav, { projectId: projectId }) }), _jsx(SidebarMoreGroup, { projectId: projectId, footer: _jsx(SidebarMenu, { className: "gap-1", children: connectRows }) })] })) : (_jsx(ProjectSessionList, { projectId: projectId })) }), _jsx(SidebarGroup, { className: "mt-auto", children: _jsxs(SidebarMenu, { className: "gap-1", children: [_jsx(ProjectRepositoryDisconnectedAlert, { projectId: projectId }), _jsx(ProjectSandboxAlert, { projectId: projectId }), _jsx(ProjectManifestIssuesAlert, { projectId: projectId }), _jsx(SidebarBalanceWarning, { accountId: accountId }), chat ? null : connectRows] }) })] }) }), _jsx(SidebarRail, { "aria-label": t('resize'), title: t('resizeHelp') })] }), _jsx(SettingsReturnTracker, { projectId: projectId }), _jsx(ComputerConnectModal, { projectId: projectId, open: computerConnectOpen, onOpenChange: setComputerConnectOpen }), _jsx(AppsModal, { chrome: chrome, onOpenComputer: () => setComputerConnectOpen(true), onOpenMcp: () => setConnectMcpOpen(true) }), _jsx(ConnectMcpModal, { open: connectMcpOpen, onOpenChange: setConnectMcpOpen })] }));
|
|
115
130
|
}
|