@kortix/ui 0.15.6 → 0.15.7

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 (56) hide show
  1. package/dist/customize/providers/provider-accordion.js +3 -2
  2. package/dist/customize/providers/provider-connect.d.ts +7 -0
  3. package/dist/customize/providers/provider-connect.js +21 -2
  4. package/dist/customize/providers/provider-sheet.js +3 -2
  5. package/dist/customize/sections/gateway-view.d.ts +1 -1
  6. package/dist/customize/sections/gateway-view.js +29 -14
  7. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.d.ts +3 -1
  8. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +2 -2
  9. package/dist/customize/sections/view/account-secret-resources-panel.js +4 -3
  10. package/dist/customize/sections/view/review-center-connected.js +15 -3
  11. package/dist/customize/sections/view/subscription-usage.d.ts +288 -7
  12. package/dist/customize/sections/view/subscription-usage.js +257 -30
  13. package/dist/i18n/en.d.ts +37 -47
  14. package/dist/i18n/en.js +40 -50
  15. package/dist/i18n/ui-catalog/app-registry-translation-keys.generated.js +5 -0
  16. package/dist/internal/auth/auth-primitives.d.ts +27 -0
  17. package/dist/internal/auth/auth-primitives.js +21 -0
  18. package/dist/internal/billing/index.d.ts +1 -0
  19. package/dist/internal/billing/index.js +2 -0
  20. package/dist/internal/billing/use-free-grant-unspent.d.ts +10 -0
  21. package/dist/internal/billing/use-free-grant-unspent.js +20 -0
  22. package/dist/internal/lib/billing/billing-gate-state.d.ts +20 -0
  23. package/dist/internal/lib/billing/billing-gate-state.js +22 -0
  24. package/dist/internal/lib/error-handler.js +0 -2
  25. package/dist/internal/notifications/notification-inbox.js +1 -1
  26. package/dist/internal/stores/upgrade-dialog-store.d.ts +0 -2
  27. package/dist/internal/stores/upgrade-dialog-store.js +0 -2
  28. package/dist/markdown/setup-links/approval-decision.d.ts +1 -1
  29. package/dist/markdown/setup-links/approval-decision.js +1 -1
  30. package/dist/session/prompts/ask-deck.d.ts +14 -2
  31. package/dist/session/prompts/ask-deck.js +6 -2
  32. package/dist/styles.css +1 -1
  33. package/dist/test-utils/intl.d.ts +37 -47
  34. package/dist/workspace/admin/settings-search.js +4 -12
  35. package/dist/workspace/inbox/workspace-inbox.js +11 -2
  36. package/dist/workspace/layout/new-session-create.d.ts +4 -2
  37. package/dist/workspace/layout/new-session-create.js +11 -0
  38. package/dist/workspace/review/approval-modal.d.ts +6 -6
  39. package/dist/workspace/review/approval-modal.js +10 -14
  40. package/dist/workspace/review/review-center.d.ts +9 -2
  41. package/dist/workspace/review/review-center.js +257 -125
  42. package/dist/workspace/review/review-detail.d.ts +20 -10
  43. package/dist/workspace/review/review-detail.js +39 -44
  44. package/dist/workspace/review/review-meta.d.ts +27 -6
  45. package/dist/workspace/review/review-meta.js +46 -34
  46. package/dist/workspace/sidebar/footer/project-download-app-nav.d.ts +10 -0
  47. package/dist/workspace/sidebar/footer/project-download-app-nav.js +53 -0
  48. package/dist/workspace/sidebar/footer/promo-nav-row.d.ts +2 -1
  49. package/dist/workspace/sidebar/footer/promo-nav-row.js +1 -1
  50. package/dist/workspace/sidebar/project-sidebar.d.ts +6 -1
  51. package/dist/workspace/sidebar/project-sidebar.js +3 -2
  52. package/dist/workspace/sidebar/workspace-menu-model.d.ts +19 -13
  53. package/dist/workspace/sidebar/workspace-menu-model.js +7 -8
  54. package/package.json +3 -3
  55. package/dist/customize/sections/view/subscription-usage-tab.d.ts +0 -25
  56. 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',
@@ -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
  }
@@ -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",
@@ -2,20 +2,26 @@
2
2
  * The rows of the workspace menu (the sidebar's workspace name, Slack's
3
3
  * "Acme ▾"), in order, by group:
4
4
  *
5
- * 1. the workspace header (icon and name);
6
- * 2. the workspace: Invite people · Workspace settings · Switch workspace
7
- * (the list, with the pending-invitation count; Create workspace sits at
8
- * the bottom of that list, beside the workspaces it adds to);
9
- * 3. the person: Inbox (notifications from every workspace, KRTX-1742) ·
10
- * Preferences (Mod+,) · More (Apps and extensions, Appearance, Help,
11
- * Download app: rows a person opens rarely, one level down);
12
- * 4. Leave {name} · Log out.
5
+ * 1. the workspace: Switch workspace (the list, with the pending-invitation
6
+ * count; Create workspace sits at the bottom of that list) · Workspace
7
+ * settings · Invite people · Leave (only for a person who cannot open
8
+ * Workspace settings);
9
+ * 2. the person: Inbox (notifications from every workspace, KRTX-1742) ·
10
+ * Preferences (Mod+,) · Apps and extensions (Chrome, the desktop app,
11
+ * your computer, MCP);
12
+ * 3. Help (docs, support, legal) · Log out.
13
13
  *
14
- * Seven rows at most at the top level: the rows used daily stay in reach,
15
- * and the rest wait one hover away. Each gated row follows the gate its
16
- * target applies, so a row never opens a page that refuses the caller.
14
+ * Flat: one hover deep at most (Switch workspace, Help), never two. No
15
+ * header: the trigger directly above already shows the workspace. Rows that
16
+ * have a better home are not here — Appearance is in Preferences, and
17
+ * Download app is a dismissible row at the foot of the sidebar (and inside
18
+ * Apps and extensions). Leave lives in Workspace settings › Danger zone, which
19
+ * needs `project.settings.write`; a person without that gets Leave here, or
20
+ * they could not leave at all. Each gated row
21
+ * follows the gate its target applies, so a row never opens a page that
22
+ * refuses the caller.
17
23
  */
18
- export type WorkspaceMenuRow = 'header' | 'invite' | 'settings' | 'switch' | 'inbox' | 'preferences' | 'more' | 'leave' | 'logout';
24
+ export type WorkspaceMenuRow = 'switch' | 'settings' | 'invite' | 'leave' | 'inbox' | 'preferences' | 'apps' | 'help' | 'logout';
19
25
  export interface WorkspaceMenuGates {
20
26
  /** `project.members.manage`: the Members section's invite. */
21
27
  canInvite: boolean;
@@ -26,5 +32,5 @@ export interface WorkspaceMenuGates {
26
32
  /** The host serves an Inbox page (`useInboxSummary(...).href` is set). */
27
33
  hasInbox: boolean;
28
34
  }
29
- /** The menu's groups, top to bottom; a separator sits between two non-empty groups. */
35
+ /** The menu's groups, top to bottom; a separator sits between two groups. */
30
36
  export declare function workspaceMenuGroups(gates: WorkspaceMenuGates): WorkspaceMenuRow[][];
@@ -1,14 +1,13 @@
1
- /** The menu's groups, top to bottom; a separator sits between two non-empty groups. */
1
+ /** The menu's groups, top to bottom; a separator sits between two groups. */
2
2
  export function workspaceMenuGroups(gates) {
3
- const groups = [
4
- ['header'],
3
+ return [
5
4
  [
6
- ...(gates.canInvite ? ['invite'] : []),
7
- ...(gates.canOpenSettings ? ['settings'] : []),
8
5
  'switch',
6
+ ...(gates.canOpenSettings ? ['settings'] : []),
7
+ ...(gates.canInvite ? ['invite'] : []),
8
+ ...(gates.canLeave && !gates.canOpenSettings ? ['leave'] : []),
9
9
  ],
10
- [...(gates.hasInbox ? ['inbox'] : []), 'preferences', 'more'],
11
- [...(gates.canLeave ? ['leave'] : []), 'logout'],
10
+ [...(gates.hasInbox ? ['inbox'] : []), 'preferences', 'apps'],
11
+ ['help', 'logout'],
12
12
  ];
13
- return groups.filter((group) => group.length > 0);
14
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/ui",
3
- "version": "0.15.6",
3
+ "version": "0.15.7",
4
4
  "description": "Kortix UI: the shared React component library for apps/web, Kortix Apps and SDK hosts. Tailwind v4 classes, themed by CSS variables.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",
@@ -2197,7 +2197,7 @@
2197
2197
  "@extend-ai/react-docx": "^0.7.5",
2198
2198
  "@extend-ai/react-xlsx": "0.13.4",
2199
2199
  "@glideapps/glide-data-grid": "6.0.4-alpha24",
2200
- "@kortix/llm-catalog": "0.15.6",
2200
+ "@kortix/llm-catalog": "0.15.7",
2201
2201
  "@lezer/highlight": "1.2.3",
2202
2202
  "@paper-design/shaders-react": "^0.0.76",
2203
2203
  "@phosphor-icons/react": "2.1.10",
@@ -2296,7 +2296,7 @@
2296
2296
  "yaml": "^2.8.2"
2297
2297
  },
2298
2298
  "peerDependencies": {
2299
- "@kortix/sdk": "^0.15.6",
2299
+ "@kortix/sdk": "^0.15.7",
2300
2300
  "@tanstack/react-query": "^5.75.2",
2301
2301
  "@types/react": ">=18",
2302
2302
  "react": ">=19",