@kortix/ui 0.15.6 → 0.15.8

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.
Files changed (226) hide show
  1. package/README.md +7 -7
  2. package/dist/_vendor/kortix-shared.js +36 -1
  3. package/dist/_vendor/shared/my-kortix-agent.d.ts +7 -0
  4. package/dist/_vendor/shared/pixel-mark.d.ts +18 -0
  5. package/dist/customize/connectors/catalog/connector-categories.d.ts +2 -2
  6. package/dist/customize/connectors/catalog/connector-categories.js +2 -2
  7. package/dist/customize/connectors/detail/connector-modal.js +1 -1
  8. package/dist/customize/providers/provider-accordion.js +3 -2
  9. package/dist/customize/providers/provider-connect.d.ts +7 -0
  10. package/dist/customize/providers/provider-connect.js +21 -2
  11. package/dist/customize/providers/provider-sheet.js +3 -2
  12. package/dist/customize/sections/gateway-view.d.ts +2 -2
  13. package/dist/customize/sections/gateway-view.js +30 -15
  14. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +3 -1
  15. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +2 -2
  16. package/dist/customize/sections/view/account-secret-resources-panel.js +8 -5
  17. package/dist/customize/sections/view/agent-editor-basics-fields.js +1 -1
  18. package/dist/customize/sections/view/gateway/gateway-logs.d.ts +1 -1
  19. package/dist/customize/sections/view/git-view.js +1 -1
  20. package/dist/customize/sections/view/permission-editor.js +1 -1
  21. package/dist/customize/sections/view/review-center-connected.js +15 -3
  22. package/dist/customize/sections/view/subscription-usage.d.ts +269 -17
  23. package/dist/customize/sections/view/subscription-usage.js +197 -54
  24. package/dist/customize/shared/entity/entity-modal.js +8 -10
  25. package/dist/files/project/components/drive-toolbar.d.ts +1 -1
  26. package/dist/files/project/components/drive-toolbar.js +1 -1
  27. package/dist/files/project/store/version-store.d.ts +1 -1
  28. package/dist/files/renderers/shared/scroll-area-compat.d.ts +6 -6
  29. package/dist/files/renderers/shared/scroll-area-compat.js +7 -9
  30. package/dist/files/renderers/shared/select-compat.js +3 -7
  31. package/dist/files/viewer/file-preview-modal.d.ts +10 -11
  32. package/dist/files/viewer/file-preview-modal.js +17 -18
  33. package/dist/i18n/en.d.ts +40 -47
  34. package/dist/i18n/en.js +47 -54
  35. package/dist/i18n/ui-catalog/app-registry-translation-keys.generated.js +5 -0
  36. package/dist/index.js +1 -1
  37. package/dist/internal/account-hub/account-hub-location.js +2 -2
  38. package/dist/internal/account-hub/use-account-members.d.ts +28 -1
  39. package/dist/internal/account-hub/use-account-members.js +27 -10
  40. package/dist/internal/auth/auth-primitives.d.ts +27 -0
  41. package/dist/internal/auth/auth-primitives.js +21 -0
  42. package/dist/internal/billing/index.d.ts +1 -0
  43. package/dist/internal/billing/index.js +2 -0
  44. package/dist/internal/billing/use-free-grant-unspent.d.ts +10 -0
  45. package/dist/internal/billing/use-free-grant-unspent.js +20 -0
  46. package/dist/internal/components/agent-mark.d.ts +1 -8
  47. package/dist/internal/components/agent-mark.js +2 -19
  48. package/dist/internal/lib/billing/billing-gate-state.d.ts +20 -0
  49. package/dist/internal/lib/billing/billing-gate-state.js +22 -0
  50. package/dist/internal/lib/error-handler.js +0 -2
  51. package/dist/internal/lib/navigation/modified-click.js +2 -2
  52. package/dist/internal/lib/pixel-mark.d.ts +3 -20
  53. package/dist/internal/lib/pixel-mark.js +3 -34
  54. package/dist/internal/notifications/notification-inbox.js +1 -1
  55. package/dist/internal/stores/active-space-store.d.ts +1 -1
  56. package/dist/internal/stores/browser-recents-store.d.ts +1 -1
  57. package/dist/internal/stores/current-account-store.d.ts +1 -1
  58. package/dist/internal/stores/first-chat-store.d.ts +1 -1
  59. package/dist/internal/stores/mobile-app-promo-store.d.ts +1 -1
  60. package/dist/internal/stores/session-browser-store.d.ts +1 -1
  61. package/dist/internal/stores/session-expanded-store.d.ts +1 -1
  62. package/dist/internal/stores/session-filter-store.d.ts +1 -1
  63. package/dist/internal/stores/session-history-view-store.d.ts +1 -1
  64. package/dist/internal/stores/session-hover-store.d.ts +1 -1
  65. package/dist/internal/stores/session-hover-store.js +1 -1
  66. package/dist/internal/stores/session-panel-memory-store.d.ts +1 -1
  67. package/dist/internal/stores/sound-store.d.ts +1 -1
  68. package/dist/internal/stores/tab-store.d.ts +1 -1
  69. package/dist/internal/stores/upgrade-dialog-store.d.ts +0 -2
  70. package/dist/internal/stores/upgrade-dialog-store.js +0 -2
  71. package/dist/internal/stores/user-preferences-store.d.ts +1 -1
  72. package/dist/internal/stores/web-notification-store.d.ts +1 -1
  73. package/dist/lib/base-ui-compat.d.ts +149 -0
  74. package/dist/lib/base-ui-compat.js +339 -0
  75. package/dist/lib/portal-container.d.ts +3 -7
  76. package/dist/lib/portal-container.js +5 -3
  77. package/dist/lib/z-stack.d.ts +4 -4
  78. package/dist/lib/z-stack.js +5 -5
  79. package/dist/markdown/setup-links/approval-decision.d.ts +1 -1
  80. package/dist/markdown/setup-links/approval-decision.js +1 -1
  81. package/dist/primitives/accordion.d.ts +36 -5
  82. package/dist/primitives/accordion.js +41 -8
  83. package/dist/primitives/alert-dialog.d.ts +33 -11
  84. package/dist/primitives/alert-dialog.js +41 -19
  85. package/dist/primitives/avatar.d.ts +5 -2
  86. package/dist/primitives/avatar.js +3 -3
  87. package/dist/primitives/badge.js +1 -1
  88. package/dist/primitives/breadcrumb.js +1 -1
  89. package/dist/primitives/button-group.js +3 -3
  90. package/dist/primitives/button.js +1 -1
  91. package/dist/primitives/checkbox.d.ts +14 -5
  92. package/dist/primitives/checkbox.js +24 -9
  93. package/dist/primitives/collapsible.d.ts +16 -4
  94. package/dist/primitives/collapsible.js +18 -7
  95. package/dist/primitives/command-core.d.ts +121 -0
  96. package/dist/primitives/command-core.js +642 -0
  97. package/dist/primitives/command.d.ts +38 -4
  98. package/dist/primitives/command.js +22 -13
  99. package/dist/primitives/context-menu.d.ts +61 -31
  100. package/dist/primitives/context-menu.js +40 -53
  101. package/dist/primitives/dialog.d.ts +48 -10
  102. package/dist/primitives/dialog.js +48 -19
  103. package/dist/primitives/disclosure.d.ts +1 -1
  104. package/dist/primitives/disclosure.js +2 -2
  105. package/dist/primitives/drawer.d.ts +28 -9
  106. package/dist/primitives/drawer.js +42 -18
  107. package/dist/primitives/dropdown-menu.d.ts +55 -33
  108. package/dist/primitives/dropdown-menu.js +46 -82
  109. package/dist/primitives/faded-scroll-area.js +2 -1
  110. package/dist/primitives/hint.js +3 -3
  111. package/dist/primitives/hover-card.d.ts +17 -5
  112. package/dist/primitives/hover-card.js +45 -8
  113. package/dist/primitives/item.js +2 -2
  114. package/dist/primitives/label.d.ts +5 -2
  115. package/dist/primitives/label.js +10 -3
  116. package/dist/primitives/menu-base.d.ts +150 -0
  117. package/dist/primitives/menu-base.js +171 -0
  118. package/dist/primitives/menu-recipe.d.ts +1 -1
  119. package/dist/primitives/menu-recipe.js +2 -7
  120. package/dist/primitives/modal.d.ts +19 -52
  121. package/dist/primitives/modal.js +24 -28
  122. package/dist/primitives/navigation-menu.d.ts +36 -11
  123. package/dist/primitives/navigation-menu.js +31 -12
  124. package/dist/primitives/popover.d.ts +31 -6
  125. package/dist/primitives/popover.js +79 -12
  126. package/dist/primitives/preview-image.d.ts +18 -7
  127. package/dist/primitives/preview-image.js +14 -11
  128. package/dist/primitives/progress.d.ts +4 -2
  129. package/dist/primitives/progress.js +4 -3
  130. package/dist/primitives/project-icon-picker.js +2 -2
  131. package/dist/primitives/radio-group.d.ts +28 -5
  132. package/dist/primitives/radio-group.js +18 -10
  133. package/dist/primitives/scroll-area.d.ts +2 -2
  134. package/dist/primitives/scroll-area.js +8 -3
  135. package/dist/primitives/select.d.ts +55 -12
  136. package/dist/primitives/select.js +93 -36
  137. package/dist/primitives/separator.d.ts +6 -2
  138. package/dist/primitives/separator.js +10 -2
  139. package/dist/primitives/sheet.d.ts +17 -10
  140. package/dist/primitives/sheet.js +19 -22
  141. package/dist/primitives/sidebar-menu-primitives.js +8 -8
  142. package/dist/primitives/slider-native.d.ts +2 -2
  143. package/dist/primitives/slider-native.js +11 -9
  144. package/dist/primitives/slider.d.ts +24 -6
  145. package/dist/primitives/slider.js +26 -24
  146. package/dist/primitives/slot.d.ts +6 -0
  147. package/dist/primitives/slot.js +7 -0
  148. package/dist/primitives/split-sheet.js +1 -1
  149. package/dist/primitives/stepper.js +1 -1
  150. package/dist/primitives/switch.d.ts +16 -3
  151. package/dist/primitives/switch.js +7 -6
  152. package/dist/primitives/tabs.d.ts +36 -20
  153. package/dist/primitives/tabs.js +131 -102
  154. package/dist/primitives/toggle.d.ts +16 -3
  155. package/dist/primitives/toggle.js +8 -3
  156. package/dist/primitives/tooltip.d.ts +24 -5
  157. package/dist/primitives/tooltip.js +32 -10
  158. package/dist/primitives/type-to-confirm-dialog.d.ts +1 -1
  159. package/dist/primitives/type-to-confirm-dialog.js +1 -1
  160. package/dist/session/composer/animated-placeholder.js +1 -1
  161. package/dist/session/composer/chat-input/chat-input-control.js +3 -3
  162. package/dist/session/composer/editor/composer-editor.js +1 -1
  163. package/dist/session/composer/menus/menu-shell.d.ts +1 -1
  164. package/dist/session/composer/menus/menu-shell.js +1 -1
  165. package/dist/session/composer/menus/mount.js +1 -1
  166. package/dist/session/composer/reasoning-effort-selector.js +1 -1
  167. package/dist/session/header/session-site-header.js +2 -2
  168. package/dist/session/header/subagent-hover-card.js +2 -2
  169. package/dist/session/media/image-preview.js +1 -1
  170. package/dist/session/models/model-selector.d.ts +1 -1
  171. package/dist/session/models/model-selector.js +18 -12
  172. package/dist/session/models/subscription-switcher.d.ts +37 -0
  173. package/dist/session/models/subscription-switcher.js +97 -0
  174. package/dist/session/models/subscription-windows.d.ts +40 -0
  175. package/dist/session/models/subscription-windows.js +86 -0
  176. package/dist/session/overrides/session-overrides-control.js +3 -3
  177. package/dist/session/panel/diff-dialog.js +1 -1
  178. package/dist/session/panel/easy/detail-view.js +3 -3
  179. package/dist/session/panel/mobile-tool-drawer.js +2 -2
  180. package/dist/session/panel/panel-fallback.js +1 -1
  181. package/dist/session/panel/session-files-explorer.d.ts +1 -1
  182. package/dist/session/panel/session-files-explorer.js +1 -1
  183. package/dist/session/prompts/ask-deck.d.ts +14 -2
  184. package/dist/session/prompts/ask-deck.js +6 -2
  185. package/dist/session/thread/session-chat.js +2 -2
  186. package/dist/session/thread/session-context-message-explorer.js +1 -1
  187. package/dist/session/thread/turn-share.js +3 -4
  188. package/dist/session/tool/shared/show-helpers.js +1 -1
  189. package/dist/session/turn/message-time-label.js +1 -1
  190. package/dist/styles.css +1 -1
  191. package/dist/test-utils/intl.d.ts +40 -47
  192. package/dist/workspace/admin/settings-search.js +4 -12
  193. package/dist/workspace/inbox/workspace-inbox.js +11 -2
  194. package/dist/workspace/layout/new-session-create.d.ts +4 -2
  195. package/dist/workspace/layout/new-session-create.js +11 -0
  196. package/dist/workspace/projects/modal/project-icon-field.js +9 -23
  197. package/dist/workspace/review/approval-modal.d.ts +6 -6
  198. package/dist/workspace/review/approval-modal.js +10 -14
  199. package/dist/workspace/review/review-center.d.ts +9 -2
  200. package/dist/workspace/review/review-center.js +258 -126
  201. package/dist/workspace/review/review-detail.d.ts +20 -10
  202. package/dist/workspace/review/review-detail.js +39 -44
  203. package/dist/workspace/review/review-meta.d.ts +27 -6
  204. package/dist/workspace/review/review-meta.js +46 -34
  205. package/dist/workspace/sessions/session-row.js +1 -1
  206. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +10 -0
  207. package/dist/workspace/sidebar/footer/project-download-app-nav.js +53 -0
  208. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +2 -1
  209. package/dist/workspace/sidebar/footer/promo-nav-row.js +1 -1
  210. package/dist/workspace/sidebar/project-session-list.js +2 -2
  211. package/dist/workspace/sidebar/project-sidebar.d.ts +6 -1
  212. package/dist/workspace/sidebar/project-sidebar.js +3 -2
  213. package/dist/workspace/sidebar/session-brief-hover-card.d.ts +1 -1
  214. package/dist/workspace/sidebar/session-brief-hover-card.js +3 -3
  215. package/dist/workspace/sidebar/session-title.d.ts +2 -2
  216. package/dist/workspace/sidebar/session-title.js +2 -2
  217. package/dist/workspace/sidebar/workspace-menu-model.d.ts +19 -13
  218. package/dist/workspace/sidebar/workspace-menu-model.js +7 -8
  219. package/dist/workspace/sidebar/workspace-menu-section.js +1 -1
  220. package/dist/workspace/spaces/space-links.js +1 -1
  221. package/dist/workspace/spaces/space-threads-tab.js +1 -1
  222. package/package.json +16 -35
  223. package/skills/kortix-ui/SKILL.md +1 -1
  224. package/skills/kortix-ui/references/custom-dashboard.md +1 -1
  225. package/dist/customize/sections/view/subscription-usage-tab.d.ts +0 -25
  226. package/dist/customize/sections/view/subscription-usage-tab.js +0 -121
@@ -23,18 +23,28 @@ export interface ReviewActions {
23
23
  * it refuses does not render. */
24
24
  allows: (item: ReviewItem, verdict: ReviewVerdict) => boolean;
25
25
  }
26
- export declare function ReviewDetail({ item, actions, onBack, }: {
27
- item: ReviewItem;
28
- actions: ReviewActions;
29
- onBack: () => void;
26
+ /**
27
+ * Leaves the open item. On a narrow inbox it is Back to the list; with both
28
+ * panes it is Close, which brings the empty pane (and the asks deck) back.
29
+ * `part` renders one of the two where a toolbar places them apart.
30
+ */
31
+ export declare function ClosePaneButton({ onClick, part, }: {
32
+ onClick: () => void;
33
+ part?: 'back' | 'close' | 'both';
30
34
  }): import("react").JSX.Element;
31
35
  /**
32
- * Every review item but a change request opens here, over the inbox, the way a
33
- * connector approval does (`ApprovalDecisionModal`). A change keeps its page:
34
- * its diff needs the width. Null closes the modal.
36
+ * One review item in the inbox's detail pane. A sticky toolbar names the kind
37
+ * and state and holds the verdicts; below it the title, the facts, the body
38
+ * and (for a change) the file diffs. Every kind but a connector call renders
39
+ * here; a connector call renders `ApprovalDecisionPane`.
40
+ *
41
+ * `onBack` returns to the list on a narrow inbox (the Back button shows only
42
+ * below the two-pane width). `onResolved` runs after a verdict: the inbox
43
+ * moves on to the next row.
35
44
  */
36
- export declare function ReviewItemModal({ item, actions, onClose, }: {
37
- item: ReviewItem | null;
45
+ export declare function ReviewDetail({ item, actions, onBack, onResolved, }: {
46
+ item: ReviewItem;
38
47
  actions: ReviewActions;
39
- onClose: () => void;
48
+ onBack: () => void;
49
+ onResolved: () => void;
40
50
  }): import("react").JSX.Element;
@@ -2,10 +2,9 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useTranslations } from '../../i18n/index.js';
4
4
  /**
5
- * Review Center — one item. A change request opens as a page that replaces the
6
- * inbox in place: a status + title header, the branch/diff facts, and the live
7
- * file diffs. Every other kind opens in `ReviewItemModal`, over the inbox, the
8
- * way a connector approval does.
5
+ * Review Center — one item, in the inbox's detail pane (`ReviewDetail`): a
6
+ * toolbar with the kind, state and verdicts, then the title, the facts, the
7
+ * kind's body and, for a change, the live file diffs.
9
8
  *
10
9
  * Actions mutate parent state optimistically via the passed handlers.
11
10
  */
@@ -14,7 +13,6 @@ import { Button } from '../../primitives/button.js';
14
13
  import { Item, ItemActions, ItemContent, ItemDescription, ItemTitle } from '../../primitives/item.js';
15
14
  import { Kbd } from '../../primitives/kbd.js';
16
15
  import Loading from '../../primitives/loading.js';
17
- import { Modal, ModalBody, ModalContent, ModalDescription, ModalHeader, ModalTitle, } from '../../primitives/modal.js';
18
16
  import { DiffStat } from '../../primitives/status.js';
19
17
  import { infoToast, successToast } from '../../primitives/toast.js';
20
18
  import { useProjectContext } from '../../files/project/context.js';
@@ -25,11 +23,11 @@ import { getShowFileCategory } from '../../files/renderers/show-type-utils.js';
25
23
  import { SessionDriveFilesScope, sessionDriveMountPath, } from '../../internal/files/session-drive-files.js';
26
24
  import { useFilePreviewStore } from '../../internal/stores/file-preview-store.js';
27
25
  import { cn } from '../../internal/lib/utils.js';
28
- import { ArrowLeftIcon as ArrowLeft, ArrowUpRightIcon as ArrowUpRight, CheckIcon as Check, CheckCircleIcon as CheckCircleSolid, EyeIcon as Eye, SparkleIcon as SparklesSolid, } from '@phosphor-icons/react';
26
+ import { ArrowLeftIcon as ArrowLeft, ArrowUpRightIcon as ArrowUpRight, CheckIcon as Check, CheckCircleIcon as CheckCircleSolid, EyeIcon as Eye, SparkleIcon as SparklesSolid, XIcon as X, } from '@phosphor-icons/react';
29
27
  import { useEffect, useRef, useState } from 'react';
30
28
  import { ChangeFiles } from './change-files.js';
31
29
  import { formatItemAgeLong } from './review-actions.js';
32
- import { APPROVAL_ACTION_ICON, KIND_META, STATUS_META, VERIFICATION_BADGE, reviewKindLabel, reviewStatusLabel, } from './review-meta.js';
30
+ import { APPROVAL_ACTION_ICON, ROW_TILE, ROW_TILE_NEUTRAL, STATUS_META, VERIFICATION_BADGE, reviewKindLabel, reviewStatusLabel, } from './review-meta.js';
33
31
  import { isSafeRisk } from './types.js';
34
32
  /** A muted bordered panel — the friendly content surface. */
35
33
  function Panel({ children, className }) {
@@ -61,7 +59,7 @@ function ChangeBody({ item, actions, onClose, conflicts, }) {
61
59
  }
62
60
  // ── approval ──────────────────────────────────────────────────────────────
63
61
  // Connector calls never reach this page: the inbox opens them in
64
- // `ApprovalDecisionModal`. What is left here is the native multi-action approval.
62
+ // `ApprovalDecisionPane`. What is left here is the native multi-action approval.
65
63
  function ApprovalActionRow({ action, connected, pending, readOnly, onApprove, onDeny, onOpenSession, }) {
66
64
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
67
65
  const Icon = APPROVAL_ACTION_ICON[action.icon];
@@ -70,7 +68,7 @@ function ApprovalActionRow({ action, connected, pending, readOnly, onApprove, on
70
68
  const busy = !!pending;
71
69
  return (_jsx("div", { className: "bg-popover rounded-md border px-4 py-3", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("span", { className: cn('flex size-9 shrink-0 items-center justify-center rounded-sm', safe ? 'bg-kortix-green/15' : 'bg-kortix-orange/15'), children: _jsx(Icon, { className: cn('size-5', safe ? 'text-kortix-green' : 'text-kortix-orange') }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx("span", { className: "text-foreground text-sm font-medium", children: action.title }) }), _jsx("div", { className: "text-muted-foreground mt-0.5 text-sm text-pretty", children: action.consequence }), args.length > 0 && (_jsx("dl", { className: "border-border/60 mt-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 border-t pt-2 text-xs", children: args.map((a) => (_jsxs("div", { className: "col-span-2 grid grid-cols-subgrid", children: [_jsx("dt", { className: "text-muted-foreground font-mono", children: a.key }), _jsx("dd", { className: "text-foreground truncate font-mono", title: a.value, children: a.value })] }, a.key))) })), _jsxs("div", { className: "text-muted-foreground mt-1.5 flex flex-wrap items-center gap-1.5 text-xs", children: [_jsxs("span", { className: "font-mono", children: [action.connector, " \u00B7 ", action.action] }), _jsx("span", { children: tI18nComplete.raw('text3b9453dad42b') }), _jsx("span", { children: action.policySource })] })] }), _jsx("div", { className: "shrink-0", children: action.decided ? (_jsx(Badge, { variant: action.decided === 'approved' ? 'success' : 'destructive', size: "sm", children: action.decided === 'approved' ? 'Approved' : 'Denied' })) : readOnly ? null : (_jsxs("div", { className: "flex flex-col items-end gap-1.5", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsxs(Button, { variant: "ghost", size: "sm", disabled: busy, onClick: onDeny, children: [pending === 'deny' ? _jsx(Loading, { className: "size-3.5 shrink-0" }) : null, tI18nComplete.raw('text05a2d7332eb9')] }), _jsxs(Button, { size: "sm", disabled: busy, onClick: onApprove, children: [pending === 'approve' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(Check, { className: "size-3.5" })), tI18nComplete.raw('text6007acbe30b2')] })] }), connected && onOpenSession ? (_jsxs("button", { type: "button", onClick: onOpenSession, className: "text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs underline-offset-2 hover:underline", children: [tI18nComplete.raw('textf42e280577fb'), _jsx(ArrowUpRight, { className: "size-3" })] })) : null] })) })] }) }));
72
70
  }
73
- function ApprovalBody({ item, actions, }) {
71
+ function ApprovalBody({ item, actions, onResolved, }) {
74
72
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
75
73
  const list = item.detail.actions ?? [];
76
74
  const openSession = actions.openSession && item.sessionId
@@ -84,6 +82,7 @@ function ApprovalBody({ item, actions, }) {
84
82
  return (_jsxs(_Fragment, { children: [_jsx("div", { className: "space-y-2", children: list.map((a) => (_jsx(ApprovalActionRow, { action: a, connected: actions.connected, readOnly: wholeItem || !decides, pending: busy && !wholeItem ? (actions.pendingDecision ?? 'approve') : null, onOpenSession: openSession, onApprove: () => {
85
83
  if (actions.connected) {
86
84
  actions.resolve(item.id, 'approved', `Approved · ${a.title}`);
85
+ onResolved();
87
86
  return;
88
87
  }
89
88
  actions.decideAction(item.id, a.id, 'approved');
@@ -91,11 +90,18 @@ function ApprovalBody({ item, actions, }) {
91
90
  }, onDeny: () => {
92
91
  if (actions.connected) {
93
92
  actions.resolve(item.id, 'rejected', `Denied · ${a.title}`);
93
+ onResolved();
94
94
  return;
95
95
  }
96
96
  actions.decideAction(item.id, a.id, 'denied');
97
97
  infoToast(tI18nComplete('text6ef671b81187', { value0: a.title }));
98
- } }, a.id))) }), wholeItem && decides && (_jsxs("div", { className: "bg-popover flex items-center justify-between gap-3 rounded-md border px-4 py-3", children: [_jsxs("p", { className: "text-muted-foreground min-w-0 text-sm text-pretty", children: [tI18nComplete.raw('text91273d498d36'), " ", list.length, ' ', tI18nComplete.raw('text9a24d7803caa')] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [_jsxs(Button, { variant: "ghost", size: "sm", disabled: busy, onClick: () => actions.resolve(item.id, 'rejected', `Denied all ${list.length} actions`), children: [busy && actions.pendingDecision === 'deny' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : null, tI18nComplete.raw('text5a41803b2dd1')] }), _jsxs(Button, { size: "sm", disabled: busy, onClick: () => actions.resolve(item.id, 'approved', `Approved all ${list.length} actions`), children: [busy && actions.pendingDecision === 'approve' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(Check, { className: "size-3.5" })), tI18nComplete.raw('textae067b687107')] })] })] }))] }));
98
+ } }, a.id))) }), wholeItem && decides && (_jsxs("div", { className: "bg-popover flex items-center justify-between gap-3 rounded-md border px-4 py-3", children: [_jsxs("p", { className: "text-muted-foreground min-w-0 text-sm text-pretty", children: [tI18nComplete.raw('text91273d498d36'), " ", list.length, ' ', tI18nComplete.raw('text9a24d7803caa')] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [_jsxs(Button, { variant: "ghost", size: "sm", disabled: busy, onClick: () => {
99
+ actions.resolve(item.id, 'rejected', `Denied all ${list.length} actions`);
100
+ onResolved();
101
+ }, children: [busy && actions.pendingDecision === 'deny' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : null, tI18nComplete.raw('text5a41803b2dd1')] }), _jsxs(Button, { size: "sm", disabled: busy, onClick: () => {
102
+ actions.resolve(item.id, 'approved', `Approved all ${list.length} actions`);
103
+ onResolved();
104
+ }, children: [busy && actions.pendingDecision === 'approve' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(Check, { className: "size-3.5" })), tI18nComplete.raw('textae067b687107')] })] })] }))] }));
99
105
  })() }));
100
106
  }
101
107
  // ── output ────────────────────────────────────────────────────────────────
@@ -225,7 +231,7 @@ function KindBody({ item, actions, onClose, conflicts, }) {
225
231
  case 'change':
226
232
  return _jsx(ChangeBody, { item: item, actions: actions, onClose: onClose, conflicts: conflicts });
227
233
  case 'approval':
228
- return _jsx(ApprovalBody, { item: item, actions: actions });
234
+ return _jsx(ApprovalBody, { item: item, actions: actions, onResolved: onClose });
229
235
  case 'output':
230
236
  return _jsx(OutputBody, { item: item });
231
237
  case 'decision':
@@ -241,7 +247,26 @@ function ChangesComposer({ item, actions, onCancel, onSent, }) {
241
247
  onSent();
242
248
  } }));
243
249
  }
244
- export function ReviewDetail({ item, actions, onBack, }) {
250
+ /**
251
+ * Leaves the open item. On a narrow inbox it is Back to the list; with both
252
+ * panes it is Close, which brings the empty pane (and the asks deck) back.
253
+ * `part` renders one of the two where a toolbar places them apart.
254
+ */
255
+ export function ClosePaneButton({ onClick, part = 'both', }) {
256
+ const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
257
+ return (_jsxs(_Fragment, { children: [part !== 'close' ? (_jsx(Button, { variant: "ghost", size: "icon-sm", onClick: onClick, "aria-label": tI18nComplete.raw('text76900f1bfd16'), className: "text-muted-foreground -ml-1.5 @3xl/inbox:hidden", children: _jsx(ArrowLeft, { className: "size-4" }) })) : null, part !== 'back' ? (_jsx(Button, { variant: "ghost", size: "icon-sm", onClick: onClick, "aria-label": tI18nComplete.raw('text7d9eb7acb13e'), className: "text-muted-foreground -mr-1.5 hidden @3xl/inbox:inline-flex", children: _jsx(X, { className: "size-4" }) })) : null] }));
258
+ }
259
+ /**
260
+ * One review item in the inbox's detail pane. A sticky toolbar names the kind
261
+ * and state and holds the verdicts; below it the title, the facts, the body
262
+ * and (for a change) the file diffs. Every kind but a connector call renders
263
+ * here; a connector call renders `ApprovalDecisionPane`.
264
+ *
265
+ * `onBack` returns to the list on a narrow inbox (the Back button shows only
266
+ * below the two-pane width). `onResolved` runs after a verdict: the inbox
267
+ * moves on to the next row.
268
+ */
269
+ export function ReviewDetail({ item, actions, onBack, onResolved, }) {
245
270
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
246
271
  const crId = item.kind === 'change' ? (item.detail.crId ?? null) : null;
247
272
  const mergePreview = useChangeRequestMergePreview(crId, Boolean(crId));
@@ -254,7 +279,7 @@ export function ReviewDetail({ item, actions, onBack, }) {
254
279
  : []
255
280
  : (item.detail.conflicts ?? [])
256
281
  : [];
257
- const kind = KIND_META[item.kind];
282
+ const tile = ROW_TILE[item.kind];
258
283
  const number = item.kind === 'change' ? item.detail.number : undefined;
259
284
  // A change waiting on you is "Open", the way a pull request is; every other
260
285
  // state keeps the inbox's own label.
@@ -264,35 +289,5 @@ export function ReviewDetail({ item, actions, onBack, }) {
264
289
  : reviewStatusLabel(item.status, tI18nComplete);
265
290
  const statusBadge = open ? 'success' : STATUS_META[item.status].badge;
266
291
  const secondaryLabel = item.secondaryAction;
267
- return (_jsxs("div", { className: "w-full p-4", children: [_jsxs("header", { className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between", children: [_jsxs("div", { className: "min-w-0 space-y-3", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [_jsxs(Button, { variant: "ghost", size: "sm", onClick: onBack, className: "text-muted-foreground hover:text-foreground -ml-2.5", children: [_jsx(ArrowLeft, { className: "size-3.5 shrink-0" }), tI18nComplete.raw('text76900f1bfd16')] }), _jsx(Badge, { variant: statusBadge, size: "sm", children: statusLabel }), item.kind !== 'change' && (_jsx(Badge, { variant: "outline", size: "sm", children: reviewKindLabel(item.kind, tI18nComplete) }))] }), _jsxs("div", { className: "mt-10 space-y-2", children: [_jsxs("p", { className: "text-muted-foreground text-xs", children: [item.project, number != null && _jsxs("span", { className: "tabular-nums", children: [" #", number] })] }), _jsx("h1", { className: "text-foreground line-clamp-2 truncate text-2xl font-semibold tracking-tight text-pretty", children: item.title })] }), _jsxs("div", { className: "text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1.5 text-sm", children: [_jsx("span", { children: item.agent }), item.kind === 'change' && _jsx(ChangeFacts, { item: item }), _jsx("span", { children: formatItemAgeLong(item.createdAt) })] })] }), _jsx("div", { className: "shrink-0", children: _jsx(ActionBar, { item: item, actions: actions, onBack: onBack, conflicts: conflicts, checkingConflicts: Boolean(crId) && mergePreview.isLoading, composing: composing, setComposing: setComposing }) })] }), _jsxs("div", { className: "mt-8 space-y-8", children: [composing && secondaryLabel && item.kind !== 'approval' && (_jsx(ChangesComposer, { item: item, actions: actions, onCancel: () => setComposing(false), onSent: onBack })), _jsxs("section", { className: "space-y-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: tI18nComplete.raw('text526e0087cc3f') }), _jsx("div", { className: "space-y-4", children: _jsx(KindBody, { item: item, actions: actions, onClose: onBack, conflicts: conflicts }) })] }), crId && _jsx(ChangeFiles, { crId: crId })] })] }));
268
- }
269
- /** The open item in its modal: who made it, its title, its body, its verdict. */
270
- function ReviewItemDialog({ item, actions, onClose, }) {
271
- const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
272
- const [composing, setComposing] = useState(false);
273
- const kind = KIND_META[item.kind];
274
- // A question and a native approval decide inside their body.
275
- const decidesInBody = (item.kind === 'decision' || item.kind === 'approval') && item.status === 'needs_you';
276
- return (_jsxs(_Fragment, { children: [_jsxs(ModalHeader, { className: "shrink-0 gap-3 pr-12 pb-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx("span", { className: cn('flex size-8 shrink-0 items-center justify-center rounded-sm', kind.tile), children: _jsx(kind.icon, { className: cn('size-4', kind.iconColor) }) }), _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("p", { className: "text-foreground truncate text-sm leading-5 font-medium", children: reviewKindLabel(item.kind, tI18nComplete) }), _jsxs(ModalDescription, { className: "truncate text-xs leading-4", children: [item.agent, " \u00B7 ", formatItemAgeLong(item.createdAt)] })] })] }), _jsx(ModalTitle, { className: "text-xl leading-snug wrap-anywhere", children: item.title })] }), _jsx(ModalBody, { className: "min-h-0 space-y-5 overflow-y-auto pb-5", children: _jsx(KindBody, { item: item, actions: actions, onClose: onClose, conflicts: [] }) }), decidesInBody ? null : (_jsx("div", { className: "border-border flex shrink-0 justify-end border-t px-5 pt-4 pb-5", children: composing && item.secondaryAction ? (_jsx("div", { className: "w-full", children: _jsx(ChangesComposer, { item: item, actions: actions, onCancel: () => setComposing(false), onSent: onClose }) })) : (_jsx(ActionBar, { item: item, actions: actions, onBack: onClose, conflicts: [], checkingConflicts: false, composing: composing, setComposing: setComposing })) }))] }));
277
- }
278
- /**
279
- * Every review item but a change request opens here, over the inbox, the way a
280
- * connector approval does (`ApprovalDecisionModal`). A change keeps its page:
281
- * its diff needs the width. Null closes the modal.
282
- */
283
- export function ReviewItemModal({ item, actions, onClose, }) {
284
- // The last item stays drawn while the modal fades out.
285
- const [shown, setShown] = useState(item);
286
- if (item && item !== shown)
287
- setShown(item);
288
- return (_jsx(Modal, { open: item !== null, onOpenChange: (open) => !open && onClose(), children: _jsx(ModalContent
289
- // Focus the dialog, not its first control: a file row or the video
290
- // would open with a focus ring nobody asked for.
291
- , {
292
- // Focus the dialog, not its first control: a file row or the video
293
- // would open with a focus ring nobody asked for.
294
- onOpenAutoFocus: (event) => {
295
- event.preventDefault();
296
- event.currentTarget?.focus();
297
- }, className: "flex flex-col space-y-0 overflow-hidden lg:h-auto lg:max-h-[85svh] lg:max-w-2xl", children: shown ? (_jsx(ReviewItemDialog, { item: shown, actions: actions, onClose: onClose }, shown.id)) : null }) }));
292
+ return (_jsxs("article", { className: "flex min-h-full w-full flex-col", children: [_jsxs("header", { className: "border-border bg-background sticky top-0 z-10 flex min-h-11 shrink-0 flex-wrap items-center gap-2 border-b px-4 py-1.5", children: [_jsx(ClosePaneButton, { onClick: onBack, part: "back" }), _jsx("span", { className: cn('flex size-6 shrink-0 items-center justify-center rounded-sm', item.status === 'needs_you' ? tile.tint : ROW_TILE_NEUTRAL), children: _jsx(tile.icon, { className: "size-3.5" }) }), _jsxs("span", { className: "text-muted-foreground truncate text-sm", children: [item.kind === 'change' ? item.project : reviewKindLabel(item.kind, tI18nComplete), number != null && _jsxs("span", { className: "tabular-nums", children: [" #", number] })] }), _jsx(Badge, { variant: statusBadge, size: "sm", className: "shrink-0", children: statusLabel }), _jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [_jsx(ActionBar, { item: item, actions: actions, onBack: onResolved, conflicts: conflicts, checkingConflicts: Boolean(crId) && mergePreview.isLoading, composing: composing, setComposing: setComposing }), _jsx(ClosePaneButton, { onClick: onBack, part: "close" })] })] }), _jsxs("div", { className: "mx-auto w-full max-w-4xl px-6 pt-6 pb-10", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("h1", { className: "text-foreground text-xl font-semibold tracking-tight text-pretty wrap-anywhere", children: item.title }), _jsxs("div", { className: "text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1.5 text-sm", children: [_jsx("span", { children: item.agent }), item.kind === 'change' && _jsx(ChangeFacts, { item: item }), _jsx("span", { children: formatItemAgeLong(item.createdAt) })] })] }), _jsxs("div", { className: "mt-8 space-y-8", children: [composing && secondaryLabel && item.kind !== 'approval' && (_jsx(ChangesComposer, { item: item, actions: actions, onCancel: () => setComposing(false), onSent: onResolved })), _jsxs("section", { className: "space-y-3", children: [_jsx("h2", { className: "text-foreground text-sm font-medium", children: tI18nComplete.raw('text526e0087cc3f') }), _jsx("div", { className: "space-y-4", children: _jsx(KindBody, { item: item, actions: actions, onClose: onResolved, conflicts: conflicts }) })] }), crId && _jsx(ChangeFiles, { crId: crId })] })] })] }));
298
293
  }
@@ -11,11 +11,9 @@ type IconCmp = ComponentType<{
11
11
  className?: string;
12
12
  }>;
13
13
  type BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'muted' | 'kortix' | 'outline' | 'info';
14
+ /** Each kind's name. Its glyph and tint live in `ROW_TILE`. */
14
15
  export declare const KIND_META: Record<ReviewKind, {
15
16
  label: string;
16
- icon: IconCmp;
17
- tile: string;
18
- iconColor: string;
19
17
  }>;
20
18
  /** A change's verification entries carry a tone; map it onto the Badge variant. */
21
19
  export declare const VERIFICATION_BADGE: Record<'success' | 'warning' | 'neutral' | 'info', BadgeVariant>;
@@ -28,6 +26,32 @@ export declare const SOURCE_META: Record<ReviewSource, {
28
26
  icon: IconCmp;
29
27
  }>;
30
28
  export declare const APPROVAL_ACTION_ICON: Record<ApprovalActionIcon, IconCmp>;
29
+ /**
30
+ * The inbox row's leading tile: a filled glyph names the kind, the
31
+ * tint says it waits on you. A decided or waiting row goes neutral, so the
32
+ * colored tiles in the list are exactly the rows that need you. Purple stays
33
+ * reserved for the owner role (kortix-brand color law), so no kind uses it.
34
+ */
35
+ export declare const ROW_TILE: Record<ReviewKind, {
36
+ icon: IconCmp;
37
+ tint: string;
38
+ }>;
39
+ /** The neutral tile of a row that no longer needs you. */
40
+ export declare const ROW_TILE_NEUTRAL = "bg-muted text-muted-foreground";
41
+ /**
42
+ * The status glyph in the row's right column:
43
+ * open ring = yours to do, half = the agent is on it, then where it landed.
44
+ * A person's "no" is orange, never red: red reports a failure.
45
+ */
46
+ export declare const ROW_STATUS_GLYPH: Record<ReviewStatus, {
47
+ icon: IconCmp;
48
+ className: string;
49
+ }>;
50
+ /** A merged change reads as a merge, not a generic check. */
51
+ export declare const ROW_MERGED_GLYPH: {
52
+ readonly icon: import("@phosphor-icons/react").Icon;
53
+ readonly className: "text-kortix-green";
54
+ };
31
55
  export declare const SEGMENT_LABEL: {
32
56
  readonly needs_you: "Needs you";
33
57
  readonly waiting: "Waiting";
@@ -36,9 +60,6 @@ export declare const SEGMENT_LABEL: {
36
60
  export declare function getLocalizedReviewMeta(tI18nComplete: UiTranslator): {
37
61
  KIND_META: Record<import("@kortix/sdk").ReviewItemKind, {
38
62
  label: string;
39
- icon: IconCmp;
40
- tile: string;
41
- iconColor: string;
42
63
  }>;
43
64
  STATUS_META: Record<import("@kortix/sdk").ReviewItemStatus, {
44
65
  label: string;
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { localizeUiCatalog } from '../../i18n/ui-catalog/localize-ui-catalog.js';
8
8
  import { REVIEW_META_TRANSLATION_KEYS } from '../../i18n/ui-catalog/review-meta-translation-keys.generated.js';
9
- import { ChatsIcon as ChatMessages, CheckCircleIcon as CheckCircleSolid, CommandIcon as Command, CreditCardIcon as CreditCardSolid, DatabaseIcon as Database, GitPullRequestIcon as GitPullRequest, MonitorIcon as Monitor, QuestionIcon as QuestionCircleSolid, PaperPlaneTiltIcon as Send, ShieldCheckIcon as ShieldCheckSolid, SparkleIcon as SparklesSolid, TerminalWindowIcon as Terminal, } from '@phosphor-icons/react';
9
+ import { ArrowUUpLeftIcon as ArrowUUpLeft, ChatCircleDotsIcon as ChatCircleDots, ChatsIcon as ChatMessages, CheckCircleIcon as CheckCircleSolid, CircleHalfIcon as CircleHalf, CircleIcon, CommandIcon as Command, CreditCardIcon as CreditCardSolid, DatabaseIcon as Database, FileTextIcon as FileText, GitMergeIcon as GitMerge, GitPullRequestIcon as GitPullRequest, HourglassIcon as Hourglass, ListChecksIcon as ListChecks, ProhibitIcon as Prohibit, XCircleIcon as XCircle, MonitorIcon as Monitor, PaperPlaneTiltIcon as Send, ShieldCheckIcon as ShieldCheckSolid, SparkleIcon as SparklesSolid, TerminalWindowIcon as Terminal, } from '@phosphor-icons/react';
10
10
  import { createElement } from 'react';
11
11
  /** Wraps a fill-intent icon so the tinted-icon-tile pattern (see file header)
12
12
  * always renders it solid, without forcing `weight="fill"` on every icon
@@ -18,40 +18,20 @@ function filled(IconComponent) {
18
18
  return createElement(Fillable, { className, weight: 'fill' });
19
19
  };
20
20
  }
21
+ /** Same as `filled`, at `bold`: an open ring that holds its weight at 16 px. */
22
+ function bold(IconComponent) {
23
+ const Weighted = IconComponent;
24
+ return function BoldIcon({ className }) {
25
+ return createElement(Weighted, { className, weight: 'bold' });
26
+ };
27
+ }
28
+ /** Each kind's name. Its glyph and tint live in `ROW_TILE`. */
21
29
  export const KIND_META = {
22
- change: {
23
- label: 'Change',
24
- icon: GitPullRequest,
25
- tile: 'bg-kortix-blue/15',
26
- iconColor: 'text-kortix-blue',
27
- },
28
- approval: {
29
- label: 'Approval',
30
- icon: filled(ShieldCheckSolid),
31
- tile: 'bg-kortix-orange/15',
32
- iconColor: 'text-kortix-orange',
33
- },
34
- output: {
35
- label: 'Output',
36
- icon: filled(SparklesSolid),
37
- tile: 'bg-kortix-purple/15',
38
- iconColor: 'text-kortix-purple',
39
- },
40
- decision: {
41
- label: 'Question',
42
- icon: filled(QuestionCircleSolid),
43
- tile: 'bg-kortix-yellow/15',
44
- // kortix-yellow is the palette's lowest-contrast glyph on a light tint. The
45
- // kind is always named in text beside the tile, so the glyph is redundant
46
- // and the token stays pure (no raw palette, no `dark:`).
47
- iconColor: 'text-kortix-yellow',
48
- },
49
- batch: {
50
- label: 'Finished',
51
- icon: filled(CheckCircleSolid),
52
- tile: 'bg-kortix-green/15',
53
- iconColor: 'text-kortix-green',
54
- },
30
+ change: { label: 'Change' },
31
+ approval: { label: 'Approval' },
32
+ output: { label: 'Output' },
33
+ decision: { label: 'Question' },
34
+ batch: { label: 'Finished' },
55
35
  };
56
36
  // Every chip in the Review Center is the one `Badge` component — no second
57
37
  // pill family (Jay, 2026-09-03: "use the badge component only").
@@ -84,6 +64,38 @@ export const APPROVAL_ACTION_ICON = {
84
64
  data: Database,
85
65
  generic: Command,
86
66
  };
67
+ /**
68
+ * The inbox row's leading tile: a filled glyph names the kind, the
69
+ * tint says it waits on you. A decided or waiting row goes neutral, so the
70
+ * colored tiles in the list are exactly the rows that need you. Purple stays
71
+ * reserved for the owner role (kortix-brand color law), so no kind uses it.
72
+ */
73
+ export const ROW_TILE = {
74
+ change: { icon: filled(GitPullRequest), tint: 'bg-kortix-blue/15 text-kortix-blue' },
75
+ approval: { icon: filled(ShieldCheckSolid), tint: 'bg-kortix-orange/15 text-kortix-orange' },
76
+ output: { icon: filled(FileText), tint: 'bg-kortix-blue/15 text-kortix-blue' },
77
+ decision: { icon: filled(ChatCircleDots), tint: 'bg-kortix-yellow/15 text-kortix-yellow' },
78
+ batch: { icon: filled(ListChecks), tint: 'bg-kortix-green/15 text-kortix-green' },
79
+ };
80
+ /** The neutral tile of a row that no longer needs you. */
81
+ export const ROW_TILE_NEUTRAL = 'bg-muted text-muted-foreground';
82
+ /**
83
+ * The status glyph in the row's right column:
84
+ * open ring = yours to do, half = the agent is on it, then where it landed.
85
+ * A person's "no" is orange, never red: red reports a failure.
86
+ */
87
+ export const ROW_STATUS_GLYPH = {
88
+ needs_you: { icon: bold(CircleIcon), className: 'text-kortix-blue' },
89
+ waiting: { icon: filled(CircleHalf), className: 'text-kortix-yellow' },
90
+ approved: { icon: filled(CheckCircleSolid), className: 'text-kortix-green' },
91
+ done: { icon: filled(CheckCircleSolid), className: 'text-kortix-green' },
92
+ changes_requested: { icon: ArrowUUpLeft, className: 'text-kortix-orange' },
93
+ rejected: { icon: Prohibit, className: 'text-kortix-orange' },
94
+ dismissed: { icon: filled(XCircle), className: 'text-muted-foreground' },
95
+ expired: { icon: Hourglass, className: 'text-muted-foreground' },
96
+ };
97
+ /** A merged change reads as a merge, not a generic check. */
98
+ export const ROW_MERGED_GLYPH = { icon: GitMerge, className: 'text-kortix-green' };
87
99
  export const SEGMENT_LABEL = {
88
100
  needs_you: 'Needs you',
89
101
  waiting: 'Waiting',
@@ -122,7 +122,7 @@ function SessionRowImpl({ session, time, open, onToggleOpen, selectMode, selecte
122
122
  if (selectMode) {
123
123
  return (
124
124
  // A label, not a button: the row wraps a real Checkbox, and nesting a
125
- // button (Radix renders one) inside a button is invalid.
125
+ // button (the Checkbox renders one) inside a button is invalid.
126
126
  _jsxs("label", { className: cn('hover:bg-muted/40 flex h-11 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left', 'transition-none', 'has-disabled:pointer-events-none has-disabled:opacity-50', selected && 'bg-primary/[0.06]'), children: [_jsx(Checkbox, { checked: selected, disabled: isDeleted, onCheckedChange: () => onToggleSelect(session.session_id), "aria-label": title,
127
127
  // This redesign removes the blue accent: the black variant.
128
128
  variant: "black" }), identity, relativeLabel ? (_jsx("time", { className: SESSION_RELATIVE_TIME_CLASS, dateTime: time.exact, title: tI18nComplete('texta680491a9229', { value0: time.exact }), children: relativeLabel })) : null] }));
@@ -0,0 +1,10 @@
1
+ export declare const DOWNLOAD_APP_PROMO_DISMISSED_KEY = "kortix.download-app-promo.dismissed";
2
+ /**
3
+ * "Download app": the same promo row as "Connect MCP", shown until dismissed
4
+ * and never inside the desktop app. It moved here from the workspace menu,
5
+ * where it sat two levels deep. After a dismiss, Apps and extensions in the
6
+ * workspace menu still offers the download.
7
+ */
8
+ export declare function ProjectDownloadAppNavItem({ onOpenDownload }: {
9
+ onOpenDownload: () => void;
10
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,53 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { DownloadSimpleIcon } from '@phosphor-icons/react';
4
+ import { useCallback, useState, useSyncExternalStore } from 'react';
5
+ import { useSidebar } from '../../../primitives/sidebar.js';
6
+ import { useIsMobile } from '../../../internal/hooks/index.js';
7
+ import { isDesktop } from '../../../internal/lib/desktop.js';
8
+ import { useTranslations } from '../../../i18n/index.js';
9
+ import { PromoNavRow } from './promo-nav-row.js';
10
+ export const DOWNLOAD_APP_PROMO_DISMISSED_KEY = 'kortix.download-app-promo.dismissed';
11
+ const subscribeNoop = () => () => { };
12
+ function readHidden() {
13
+ // The desktop app is already the download.
14
+ if (isDesktop())
15
+ return true;
16
+ try {
17
+ return window.localStorage.getItem(DOWNLOAD_APP_PROMO_DISMISSED_KEY) === '1';
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ }
23
+ /**
24
+ * "Download app": the same promo row as "Connect MCP", shown until dismissed
25
+ * and never inside the desktop app. It moved here from the workspace menu,
26
+ * where it sat two levels deep. After a dismiss, Apps and extensions in the
27
+ * workspace menu still offers the download.
28
+ */
29
+ export function ProjectDownloadAppNavItem({ onOpenDownload }) {
30
+ const t = useTranslations('sidebar');
31
+ const tComputers = useTranslations('computers');
32
+ const isMobile = useIsMobile();
33
+ const { setOpenMobile } = useSidebar();
34
+ // The server and the hydrating render read "hidden"; the stored flag applies after.
35
+ const stored = useSyncExternalStore(subscribeNoop, readHidden, () => true);
36
+ const [dismissedNow, setDismissed] = useState(false);
37
+ const dismiss = useCallback(() => {
38
+ setDismissed(true);
39
+ try {
40
+ window.localStorage.setItem(DOWNLOAD_APP_PROMO_DISMISSED_KEY, '1');
41
+ }
42
+ catch {
43
+ // Private mode or blocked storage: dismissed for this page view only.
44
+ }
45
+ }, []);
46
+ if (stored || dismissedNow)
47
+ return null;
48
+ return (_jsx(PromoNavRow, { icon: _jsx(DownloadSimpleIcon, { className: "text-muted-foreground size-4 shrink-0" }), label: t('workspace.downloadApp'), dismissLabel: tComputers('dismissPromo'), onDismiss: dismiss, onClick: () => {
49
+ onOpenDownload();
50
+ if (isMobile)
51
+ setOpenMobile(false);
52
+ } }));
53
+ }
@@ -2,7 +2,8 @@ import type { ReactNode } from 'react';
2
2
  export declare function PromoNavRow({ icon, label, badge, dismissLabel, onDismiss, onClick, pending, }: {
3
3
  icon: ReactNode;
4
4
  label: string;
5
- badge: string;
5
+ /** A short tag ("New"); omitted, the row shows only the dismiss on hover. */
6
+ badge?: string;
6
7
  dismissLabel: string;
7
8
  onDismiss: () => void;
8
9
  onClick: () => void;
@@ -3,5 +3,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, } from '../../../primitives/sidebar.js';
4
4
  import { XIcon } from '@phosphor-icons/react';
5
5
  export function PromoNavRow({ icon, label, badge, dismissLabel, onDismiss, onClick, pending = false, }) {
6
- return (_jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { className: "text-sidebar-foreground bg-hover group-has-data-[sidebar=menu-action]/menu-item:pr-12", disabled: pending, "aria-busy": pending || undefined, onClick: onClick, children: [icon, _jsx("span", { className: "min-w-0 flex-1 truncate", children: label })] }), _jsx(SidebarMenuBadge, { className: "bg-kortix-blue/15 text-foreground mr-1 rounded-sm px-1.5 group-focus-within/menu-item:opacity-0 group-hover/menu-item:opacity-0 max-md:hidden", children: badge }), _jsx(SidebarMenuAction, { onClick: onDismiss, "aria-label": dismissLabel, showOnHover: true, className: "mr-1", children: _jsx(XIcon, {}) })] }));
6
+ return (_jsxs(SidebarMenuItem, { children: [_jsxs(SidebarMenuButton, { className: "text-sidebar-foreground bg-hover group-has-data-[sidebar=menu-action]/menu-item:pr-12", disabled: pending, "aria-busy": pending || undefined, onClick: onClick, children: [icon, _jsx("span", { className: "min-w-0 flex-1 truncate", children: label })] }), badge ? (_jsx(SidebarMenuBadge, { className: "bg-kortix-blue/15 text-foreground mr-1 rounded-sm px-1.5 group-focus-within/menu-item:opacity-0 group-hover/menu-item:opacity-0 max-md:hidden", children: badge })) : null, _jsx(SidebarMenuAction, { onClick: onDismiss, "aria-label": dismissLabel, showOnHover: true, className: "mr-1", children: _jsx(XIcon, {}) })] }));
7
7
  }
@@ -469,10 +469,10 @@ function SessionListSection({ section, projectId, sessions, reviewCountBySession
469
469
  * Hover-revealed via `group/section-header` on the header row only (not the
470
470
  * whole `group/section` disclosure), so hovering a row inside the section
471
471
  * doesn't also fade in the header's `⋯`; stays visible while its own menu is
472
- * open via `data-[state=open]`, which Radix stamps on this trigger directly
472
+ * open via `data-[state=open]`, which the menu stamps on this trigger directly
473
473
  * (not the group). Both the click AND keydown (Enter/Space) handlers stop
474
474
  * propagation so opening the menu — by pointer or keyboard — never also
475
- * toggles the disclosure, which Radix's `pointerdown` open would otherwise
475
+ * toggles the disclosure, which the menu's press-to-open would otherwise
476
476
  * race against the header's `onKeyDown`-driven `toggle()` — same pattern as
477
477
  * the row-level `⋯` in `ProjectSessionRow`. The hit area extends past the
478
478
  * visible button with `before:absolute before:-inset-1` instead of growing
@@ -1,6 +1,11 @@
1
1
  import { type ReactNode } from 'react';
2
- export declare function ProjectSidebar({ projectId, menu, onOpenSearch, }: {
2
+ export declare function ProjectSidebar({ projectId, menu, onOpenSearch, onOpenDownloadApp, }: {
3
3
  projectId: string;
4
+ /**
5
+ * Opens the host's Download app dialog. Without it, the footer has no
6
+ * Download app row.
7
+ */
8
+ onOpenDownloadApp?: () => void;
4
9
  /**
5
10
  * Opens the host's search (apps/web: its command palette). Without it, the
6
11
  * header has no Search button.
@@ -9,6 +9,7 @@ import { ComputerConnectModal } from '../../internal/tunnel/computer-connect.js'
9
9
  import { ConnectMcpModal } from '../../internal/layout/connect-mcp-modal.js';
10
10
  import { ProjectMcpNavItem } from './footer/project-mcp-nav.js';
11
11
  import { ProjectComputerNavItem } from './footer/project-computer-nav.js';
12
+ import { ProjectDownloadAppNavItem } from './footer/project-download-app-nav.js';
12
13
  import { ProjectManifestIssuesAlert } from './footer/project-manifest-issues-alert.js';
13
14
  import { ProjectSandboxAlert } from './footer/project-sandbox-alert.js';
14
15
  import { ProjectRepositoryDisconnectedAlert } from '../repository-disconnected.js';
@@ -39,7 +40,7 @@ import { SidebarGlyph as PanelLeft } from '../../icons/sidebar-toggle.js';
39
40
  import { Close } from '../../icons/close.js';
40
41
  const isMac = typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
41
42
  const modSymbol = isMac ? '⌘' : 'Ctrl';
42
- export function ProjectSidebar({ projectId, menu, onOpenSearch, }) {
43
+ export function ProjectSidebar({ projectId, menu, onOpenSearch, onOpenDownloadApp, }) {
43
44
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
44
45
  const t = useTranslations('sidebar');
45
46
  const tCommon = useTranslations('common');
@@ -113,7 +114,7 @@ export function ProjectSidebar({ projectId, menu, onOpenSearch, }) {
113
114
  }, [handleNewSession]);
114
115
  // The connect rows and the upgrade call to action. Spaces on (`chat`), they
115
116
  // live inside "More": the bottom of the sidebar is More and the status alerts.
116
- const connectRows = (_jsxs(_Fragment, { children: [_jsx("li", { className: "not-has-[li]:hidden", children: _jsxs(SidebarMenu, { className: "gap-px [&>li:not(:first-child)>[data-sidebar=menu-button]]:rounded-t-sm [&>li:not(:last-child)>[data-sidebar=menu-button]]:rounded-b-sm", children: [_jsx(ProjectMcpNavItem, { onOpenConnect: () => setConnectMcpOpen(true) }), _jsx(ProjectComputerNavItem, { projectId: projectId, onOpenConnect: () => setComputerConnectOpen(true) }), chrome ? (_jsx(ProjectChromeNavItem, { onOpenConnect: () => useAppsModalStore.getState().setOpen(true) })) : null] }) }), _jsx(SidebarUpgradeButton, { accountId: accountId })] }));
117
+ const connectRows = (_jsxs(_Fragment, { children: [_jsx("li", { className: "not-has-[li]:hidden", children: _jsxs(SidebarMenu, { className: "gap-px [&>li:not(:first-child)>[data-sidebar=menu-button]]:rounded-t-sm [&>li:not(:last-child)>[data-sidebar=menu-button]]:rounded-b-sm", children: [_jsx(ProjectMcpNavItem, { onOpenConnect: () => setConnectMcpOpen(true) }), _jsx(ProjectComputerNavItem, { projectId: projectId, onOpenConnect: () => setComputerConnectOpen(true) }), chrome ? (_jsx(ProjectChromeNavItem, { onOpenConnect: () => useAppsModalStore.getState().setOpen(true) })) : null, onOpenDownloadApp ? _jsx(ProjectDownloadAppNavItem, { onOpenDownload: onOpenDownloadApp }) : null] }) }), _jsx(SidebarUpgradeButton, { accountId: accountId })] }));
117
118
  return (
118
119
  // The New agent modal mounts beside <Sidebar>, outside the mobile sheet.
119
120
  _jsxs(NewAgentModalProvider, { projectId: projectId, children: [_jsxs(Sidebar, { collapsible: "offcanvas", variant: "inset",
@@ -26,7 +26,7 @@ interface SessionBriefInteractionProps {
26
26
  * row renders its brief into this host's slot (`SessionBriefCard`), and the
27
27
  * host lines up with that row. Moving to the next row therefore moves the same
28
28
  * card, with a 150ms glide, instead of unmounting one card and mounting another
29
- * at a new place. Radix HoverCard cannot do this: it exports no `Anchor`, so a
29
+ * at a new place. `HoverCard` cannot do this: it has no anchor part, so a
30
30
  * single instance cannot follow the pointer between triggers.
31
31
  *
32
32
  * The first open fades in over 100ms and does not move: the card opens to the
@@ -3,7 +3,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
3
3
  import { useFeatureFlag, useSessionGoal } from '@kortix/sdk/react';
4
4
  import { ArrowsSplitIcon, GitDiffIcon, RobotIcon, TargetIcon } from '@phosphor-icons/react';
5
5
  import { formatDistanceToNowStrict } from 'date-fns';
6
- import { Slot } from 'radix-ui';
6
+ import { Slot } from '../../lib/base-ui-compat.js';
7
7
  import { useEffect, useLayoutEffect, useRef } from 'react';
8
8
  import { createPortal } from 'react-dom';
9
9
  import { useTranslations } from '../../i18n/index.js';
@@ -114,7 +114,7 @@ const CARD_EDGE_PX = 8;
114
114
  * row renders its brief into this host's slot (`SessionBriefCard`), and the
115
115
  * host lines up with that row. Moving to the next row therefore moves the same
116
116
  * card, with a 150ms glide, instead of unmounting one card and mounting another
117
- * at a new place. Radix HoverCard cannot do this: it exports no `Anchor`, so a
117
+ * at a new place. `HoverCard` cannot do this: it has no anchor part, so a
118
118
  * single instance cannot follow the pointer between triggers.
119
119
  *
120
120
  * The first open fades in over 100ms and does not move: the card opens to the
@@ -231,7 +231,7 @@ function SessionBriefCard({ id, children, content, }) {
231
231
  store.dismiss();
232
232
  store.release(id);
233
233
  }, [id]);
234
- return (_jsxs(_Fragment, { children: [_jsx(Slot.Root, { "data-state": open ? 'open' : 'closed', ...sessionRowHoverHandlers(id), children: children }), open && slot ? createPortal(content, slot) : null] }));
234
+ return (_jsxs(_Fragment, { children: [_jsx(Slot, { "data-state": open ? 'open' : 'closed', ...sessionRowHoverHandlers(id), children: children }), open && slot ? createPortal(content, slot) : null] }));
235
235
  }
236
236
  export function SessionBriefHoverCard({ sessionId, children, ...brief }) {
237
237
  const dismiss = useSessionHoverStore((state) => state.dismiss);
@@ -14,8 +14,8 @@
14
14
  * says "something is happening here" a second time, in a place that cannot
15
15
  * say WHAT — so the two indicators competed and neither read cleanly.
16
16
  *
17
- * No `title` attribute either. The native tooltip it produced fought the Radix
18
- * tooltips the row already uses: different delay, different placement, different
17
+ * No `title` attribute either. The native tooltip it produced fought the
18
+ * `Tooltip`s the row already uses: different delay, different placement, different
19
19
  * paint, and it fired over the whole row instead of over one control.
20
20
  */
21
21
  export declare function SessionTitle({ title, className }: {
@@ -17,8 +17,8 @@ import { cn } from '../../internal/lib/utils.js';
17
17
  * says "something is happening here" a second time, in a place that cannot
18
18
  * say WHAT — so the two indicators competed and neither read cleanly.
19
19
  *
20
- * No `title` attribute either. The native tooltip it produced fought the Radix
21
- * tooltips the row already uses: different delay, different placement, different
20
+ * No `title` attribute either. The native tooltip it produced fought the
21
+ * `Tooltip`s the row already uses: different delay, different placement, different
22
22
  * paint, and it fired over the whole row instead of over one control.
23
23
  */
24
24
  export function SessionTitle({ title, className }) {