@kortix/ui 0.16.3 → 0.16.5

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 (156) hide show
  1. package/dist/_vendor/kortix-shared.js +1 -4
  2. package/dist/customize/sections/view/review-center-connected.js +64 -71
  3. package/dist/customize/sections/view/secret-delivery.d.ts +11 -20
  4. package/dist/customize/sections/view/secret-delivery.js +20 -29
  5. package/dist/customize/sections/view/secrets-view.js +9 -24
  6. package/dist/customize/settings/rail-copy-context.d.ts +2 -0
  7. package/dist/customize/settings/rail-copy-context.js +2 -0
  8. package/dist/customize/settings/tabs/chrome-connections-tab.js +1 -1
  9. package/dist/files/renderers/show-content-renderer.js +3 -1
  10. package/dist/i18n/en.d.ts +130 -22
  11. package/dist/i18n/en.js +142 -34
  12. package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +2 -0
  13. package/dist/internal/auth/auth-card-shell.d.ts +24 -3
  14. package/dist/internal/auth/auth-card-shell.js +15 -8
  15. package/dist/internal/auth/auth-primitives.d.ts +15 -2
  16. package/dist/internal/auth/auth-primitives.js +22 -5
  17. package/dist/internal/chrome/chrome-connect.d.ts +3 -5
  18. package/dist/internal/chrome/chrome-connect.js +7 -10
  19. package/dist/internal/chrome/extension.d.ts +1 -8
  20. package/dist/internal/chrome/extension.js +1 -8
  21. package/dist/internal/chrome/use-chrome-offered.d.ts +6 -12
  22. package/dist/internal/chrome/use-chrome-offered.js +13 -15
  23. package/dist/internal/components/agent-mark.d.ts +2 -1
  24. package/dist/internal/components/agent-mark.js +14 -3
  25. package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
  26. package/dist/internal/hooks/use-review-session-summary.js +1 -1
  27. package/dist/internal/layout/project-nav-row.d.ts +3 -1
  28. package/dist/internal/layout/project-nav-row.js +2 -2
  29. package/dist/internal/layout/project-page-header.js +5 -4
  30. package/dist/internal/stores/user-preferences-store.d.ts +17 -0
  31. package/dist/internal/stores/user-preferences-store.js +5 -0
  32. package/dist/markdown/setup-links/secret-intake-form.d.ts +4 -1
  33. package/dist/markdown/setup-links/secret-intake-form.js +60 -16
  34. package/dist/markdown/setup-links/setup-link-button.js +6 -1
  35. package/dist/primitives/color-picker.d.ts +19 -0
  36. package/dist/primitives/color-picker.js +27 -0
  37. package/dist/primitives/faded-scroll-area.js +4 -0
  38. package/dist/primitives/glyph-picker.d.ts +11 -0
  39. package/dist/primitives/glyph-picker.js +10 -6
  40. package/dist/primitives/gradient-wallpaper-gl.d.ts +61 -0
  41. package/dist/primitives/gradient-wallpaper-gl.js +446 -0
  42. package/dist/primitives/gradient-wallpaper.d.ts +20 -0
  43. package/dist/primitives/gradient-wallpaper.js +242 -0
  44. package/dist/primitives/resizable.d.ts +1 -1
  45. package/dist/session/agents/agent-hover-card.d.ts +26 -0
  46. package/dist/session/agents/agent-hover-card.js +70 -0
  47. package/dist/session/agents/agent-strip.js +33 -7
  48. package/dist/session/agents/agent-surface.d.ts +26 -1
  49. package/dist/session/agents/agent-surface.js +57 -6
  50. package/dist/session/agents/held-messages.js +2 -2
  51. package/dist/session/agents/subagent-dialog-content.js +2 -2
  52. package/dist/session/composer/ComposerCard.js +4 -4
  53. package/dist/session/composer/composer-toolbar.d.ts +8 -1
  54. package/dist/session/composer/composer-toolbar.js +2 -2
  55. package/dist/session/composer/dictation/dictation-control.d.ts +10 -0
  56. package/dist/session/composer/dictation/dictation-control.js +28 -0
  57. package/dist/session/composer/dictation/dictation-state.d.ts +26 -0
  58. package/dist/session/composer/dictation/dictation-state.js +71 -0
  59. package/dist/session/composer/dictation/recorder.d.ts +30 -0
  60. package/dist/session/composer/dictation/recorder.js +129 -0
  61. package/dist/session/composer/dictation/use-composer-dictation.d.ts +25 -0
  62. package/dist/session/composer/dictation/use-composer-dictation.js +218 -0
  63. package/dist/session/composer/queued-prompt-list.js +5 -1
  64. package/dist/session/panel/easy/apps-card.js +3 -10
  65. package/dist/session/panel/easy/background-tasks-card.d.ts +23 -0
  66. package/dist/session/panel/easy/background-tasks-card.js +119 -0
  67. package/dist/session/panel/easy/change-requests-card.js +1 -1
  68. package/dist/session/panel/easy/changes-card.js +4 -6
  69. package/dist/session/panel/easy/context-card.js +8 -9
  70. package/dist/session/panel/easy/context-meter.d.ts +2 -0
  71. package/dist/session/panel/easy/context-meter.js +18 -4
  72. package/dist/session/panel/easy/detail-view.js +7 -4
  73. package/dist/session/panel/easy/easy-panel-logic.d.ts +4 -15
  74. package/dist/session/panel/easy/easy-panel-logic.js +4 -17
  75. package/dist/session/panel/easy/easy-panel.js +5 -4
  76. package/dist/session/panel/easy/outputs-card.d.ts +1 -13
  77. package/dist/session/panel/easy/outputs-card.js +14 -40
  78. package/dist/session/panel/easy/panel-card.d.ts +13 -40
  79. package/dist/session/panel/easy/panel-card.js +17 -55
  80. package/dist/session/panel/easy/plan-card.js +4 -7
  81. package/dist/session/panel/model-switch-event.d.ts +2 -2
  82. package/dist/session/panel/model-switch-event.js +13 -9
  83. package/dist/session/panel/session-panel-provider.d.ts +2 -1
  84. package/dist/session/panel/session-panel-provider.js +3 -3
  85. package/dist/session/panel/shared/collect-tool-parts.js +2 -2
  86. package/dist/session/panel/shared/derive-panels.js +14 -1
  87. package/dist/session/panel/shared/use-panel-handoffs.d.ts +0 -1
  88. package/dist/session/panel/shared/use-panel-handoffs.js +26 -17
  89. package/dist/session/thread/chat-minimap.js +7 -1
  90. package/dist/session/thread/session-body.js +1 -1
  91. package/dist/session/thread/session-chat.js +59 -15
  92. package/dist/session/tool/shared/infrastructure-contexts.d.ts +7 -0
  93. package/dist/session/tool/shared/infrastructure-contexts.js +9 -0
  94. package/dist/session/tool/shared/infrastructure-row-header.js +4 -1
  95. package/dist/session/tool/shared/infrastructure-rows.js +19 -19
  96. package/dist/session/tool/show-group-renderer.d.ts +5 -5
  97. package/dist/session/tool/show-group-renderer.js +7 -4
  98. package/dist/session/tool/tool-part-renderer.js +25 -9
  99. package/dist/session/tool/tool-renderers.d.ts +1 -1
  100. package/dist/session/tool/tool-renderers.js +1 -1
  101. package/dist/session/tool/tools/bash-tool.js +3 -2
  102. package/dist/session/tool/tools/codemode-tool.d.ts +15 -0
  103. package/dist/session/tool/tools/codemode-tool.js +54 -2
  104. package/dist/session/tool/tools/kortix-action-tool.d.ts +1 -0
  105. package/dist/session/tool/tools/kortix-action-tool.js +19 -8
  106. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +8 -1
  107. package/dist/session/tool/tools/multi-agent-tool-bodies.js +76 -10
  108. package/dist/session/tool/tools/task-tool.js +17 -5
  109. package/dist/session/turn/peer-message-row.d.ts +3 -0
  110. package/dist/session/turn/peer-message-row.js +8 -2
  111. package/dist/session/turn/subagent-notice-row.js +5 -3
  112. package/dist/styles.css +1 -1
  113. package/dist/test-utils/intl.d.ts +130 -22
  114. package/dist/theme/index.d.ts +2 -1
  115. package/dist/theme/index.js +2 -1
  116. package/dist/theme/wallpaper-gradients.d.ts +106 -0
  117. package/dist/theme/wallpaper-gradients.js +347 -0
  118. package/dist/theme/wallpapers.d.ts +23 -3
  119. package/dist/theme/wallpapers.js +53 -29
  120. package/dist/workspace/admin/project-admin-dashboard.js +1 -1
  121. package/dist/workspace/layout/project-home.js +1 -1
  122. package/dist/workspace/new/use-create-workspace.d.ts +5 -3
  123. package/dist/workspace/new/use-create-workspace.js +1 -1
  124. package/dist/workspace/projects/modal/project-icon-field.d.ts +3 -1
  125. package/dist/workspace/projects/modal/project-icon-field.js +3 -3
  126. package/dist/workspace/review/review-center.d.ts +9 -1
  127. package/dist/workspace/review/review-center.js +107 -14
  128. package/dist/workspace/review/review-detail.d.ts +19 -0
  129. package/dist/workspace/review/review-detail.js +18 -3
  130. package/dist/workspace/review/review-swipe-deck.d.ts +27 -0
  131. package/dist/workspace/review/review-swipe-deck.js +304 -0
  132. package/dist/workspace/review/review-swipe.d.ts +17 -0
  133. package/dist/workspace/review/review-swipe.js +10 -0
  134. package/dist/workspace/session-spaces/space-picker.js +3 -3
  135. package/dist/workspace/setup/setup-banner-snooze.d.ts +10 -0
  136. package/dist/workspace/setup/setup-banner-snooze.js +44 -0
  137. package/dist/workspace/setup/setup-banner.js +19 -36
  138. package/dist/workspace/setup/setup-steps.d.ts +0 -5
  139. package/dist/workspace/setup/setup-steps.js +0 -7
  140. package/dist/workspace/setup/workspace-setup-modal.d.ts +39 -0
  141. package/dist/workspace/setup/workspace-setup-modal.js +202 -0
  142. package/dist/workspace/sidebar/footer/project-review-nav.d.ts +13 -0
  143. package/dist/workspace/sidebar/footer/project-review-nav.js +29 -0
  144. package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
  145. package/dist/workspace/sidebar/project-nav-items.js +24 -5
  146. package/dist/workspace/sidebar/project-session-list.js +2 -1
  147. package/dist/workspace/sidebar/project-sidebar.js +6 -5
  148. package/dist/workspace/sidebar/project-spaces-nav.js +3 -10
  149. package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
  150. package/package.json +14 -10
  151. package/skills/kortix-ui/SKILL.md +1 -1
  152. package/skills/kortix-ui/references/modules.md +3 -1
  153. package/dist/primitives/toast-clearance.d.ts +0 -36
  154. package/dist/primitives/toast-clearance.js +0 -94
  155. package/dist/workspace/setup/workspace-setup-page.d.ts +0 -10
  156. package/dist/workspace/setup/workspace-setup-page.js +0 -91
@@ -36,7 +36,7 @@ import { cn } from '../../internal/lib/utils.js';
36
36
  import { hasOpenFloatingLayer } from '../../lib/z-stack.js';
37
37
  import { SelectionBar } from '../../internal/selection/selection-bar.js';
38
38
  import { selectRange, toggleId } from '../../internal/selection/selection.js';
39
- import { ChatsIcon as Chats, CheckCircleIcon as CheckCircleSolid, CheckSquareIcon, ClockCountdownIcon as ClockCountdown, DotsThreeIcon as DotsThree, FunnelSimpleIcon as FunnelSimple, MagnifyingGlassIcon as Search, ShapesIcon as Shapes, ShieldCheckIcon as ShieldCheck, TrayIcon as Tray, WarningIcon, XIcon as X, } from '@phosphor-icons/react';
39
+ import { CardsIcon as Cards, ChatsIcon as Chats, CheckCircleIcon as CheckCircleSolid, CheckSquareIcon, ClockCountdownIcon as ClockCountdown, DotsThreeIcon as DotsThree, FunnelSimpleIcon as FunnelSimple, MagnifyingGlassIcon as Search, ShapesIcon as Shapes, ShieldCheckIcon as ShieldCheck, TrayIcon as Tray, RowsIcon as Rows, WarningIcon, XIcon as X, } from '@phosphor-icons/react';
40
40
  import { useUiPathname, useUiRouter, useUiSearchParams } from '../../providers/ui-provider.js';
41
41
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
42
42
  import { statusToVerdict } from './map.js';
@@ -47,6 +47,7 @@ import { approvalIdentity } from '../../markdown/setup-links/approval-decision.j
47
47
  import { ConnectorAppMark } from '../../markdown/setup-links/connector-handshake.js';
48
48
  import { ApprovalDecisionPane, reviewApprovalAsker, reviewApprovalDenyOnly, reviewApprovalDetails, } from './approval-modal.js';
49
49
  import { ClosePaneButton, ReviewDetail } from './review-detail.js';
50
+ import { ReviewSwipeDeck } from './review-swipe-deck.js';
50
51
  import { ROW_MERGED_GLYPH, ROW_STATUS_GLYPH, ROW_TILE, ROW_TILE_NEUTRAL, reviewKindLabel, reviewStatusLabel, } from './review-meta.js';
51
52
  import { bulkSetStatus, decideApprovalAction, filterItems, groupBySession, isPromiseLike, REVIEW_VERDICT_ANNOUNCED, sessionOptions, setStatus, } from './review-reducer.js';
52
53
  import { segmentForStatus, } from './types.js';
@@ -228,10 +229,39 @@ function useContainerWide(ref, min) {
228
229
  }, [ref, min]);
229
230
  return wide;
230
231
  }
231
- export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChange, loadMore, onAct, onBulkAct, onOpenSession, onRecoverChange, recoveringCrId, onRefresh, isLoading, isFetching, isFetched, isError, sessionLabels, verdictAllowed = EVERY_VERDICT, needsYouDeck, sessionAsks = [], onSelectAsk, selectedAskId, } = {}) {
232
+ const REVIEW_VIEW_KEY = 'kortix.review.view';
233
+ /** The Needs you view, kept per browser. Storage may be absent or throw. */
234
+ function useReviewView(fallback) {
235
+ // The viewer's own choice, else the default (which can change once the
236
+ // project's flags load).
237
+ const [choice, setChoice] = useState(null);
238
+ useEffect(() => {
239
+ try {
240
+ const saved = window.localStorage.getItem(REVIEW_VIEW_KEY);
241
+ if (saved === 'list' || saved === 'cards')
242
+ setChoice(saved);
243
+ }
244
+ catch {
245
+ // No storage: the fallback stands.
246
+ }
247
+ }, []);
248
+ const view = choice ?? fallback;
249
+ const choose = useCallback((next) => {
250
+ setChoice(next);
251
+ try {
252
+ window.localStorage.setItem(REVIEW_VIEW_KEY, next);
253
+ }
254
+ catch {
255
+ // No storage: the choice lasts this visit.
256
+ }
257
+ }, []);
258
+ return [view, choose];
259
+ }
260
+ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChange, loadMore, onAct, onBulkAct, onOpenSession, onRecoverChange, recoveringCrId, onRefresh, isLoading, isFetching, isFetched, isError, sessionLabels, verdictAllowed = EVERY_VERDICT, needsYouDeck, sessionAsks = [], onSelectAsk, selectedAskId, defaultView = 'list', deckEnabled = false, } = {}) {
232
261
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
233
262
  const tBulk = useTranslations('hardcodedUi.reviewBulk');
234
263
  const tSidebar = useTranslations('sidebar');
264
+ const tDeck = useTranslations('hardcodedUi.reviewDeck');
235
265
  const segments = useMemo(() => localizeUiCatalog(SEGMENTS, tI18nComplete, PRODUCT_CATALOG_TRANSLATION_KEYS), [tI18nComplete]);
236
266
  const kindFilters = useMemo(() => localizeUiCatalog(KIND_FILTERS, tI18nComplete, PRODUCT_CATALOG_TRANSLATION_KEYS), [tI18nComplete]);
237
267
  const localizedMockItems = useMemo(() => getLocalizedMockItems(tI18nComplete), [tI18nComplete]);
@@ -252,6 +282,10 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
252
282
  // a session's reviews + approvals sit together. Both operate on `sessionId`.
253
283
  const [sessionFilter, setSessionFilter] = useState('all');
254
284
  const [grouped, setGrouped] = useState(false);
285
+ const [view, setView] = useReviewView(defaultView);
286
+ // The deck shows Needs you only: Waiting and Done hold nothing to decide.
287
+ const cards = deckEnabled && view === 'cards' && segment === 'needs_you';
288
+ const [deckTabChoice, setDeckTab] = useState(null);
255
289
  // The open review lives in the URL (`?id=<review item id>`), not in state,
256
290
  // so a refresh or a shared link lands on the same page.
257
291
  const search = useUiSearchParams();
@@ -280,6 +314,10 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
280
314
  // not clear the spinner, so the row cannot flicker back to "needs you" and a
281
315
  // second verdict cannot go out.
282
316
  const [inFlight, setInFlight] = useState(null);
317
+ // Every verdict still waiting for the server, by item: the swipe deck sends
318
+ // one per Undo window, so several can overlap. A refetch keeps each one's
319
+ // optimistic status until its own request settles.
320
+ const pendingStatusesRef = useRef(new Map());
283
321
  const undoRef = useRef(null);
284
322
  // Query root for scroll-into-view — a container of the [data-idx] rows. It wraps
285
323
  // either the flat <ul> or the grouped <div>, so it's typed to the common base.
@@ -311,6 +349,17 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
311
349
  }, [idParam, pathname, router, search]);
312
350
  const labelFor = useMemo(() => (id) => sessionLabels?.[id], [sessionLabels]);
313
351
  const visible = useMemo(() => filterItems(items, segment, kindFilter, query, sessionFilter), [items, segment, kindFilter, query, sessionFilter]);
352
+ // Reviews first; questions when no review waits, until the viewer picks.
353
+ // With no questions there is no switch: the deck is the reviews.
354
+ const deckTab = sessionAsks.length === 0
355
+ ? 'reviews'
356
+ : (deckTabChoice ?? (visible.length === 0 ? 'questions' : 'reviews'));
357
+ // The deck shows one card at a time: as it runs low, read the next page.
358
+ const loadNext = loadMore && !loadMore.isLoading && !loadMore.isError ? loadMore.onLoadMore : null;
359
+ useEffect(() => {
360
+ if (cards && loadNext && visible.length < 3)
361
+ loadNext();
362
+ }, [cards, loadNext, visible.length]);
314
363
  /** After a verdict the item leaves its list: open the row that took its
315
364
  * place (the next one, else the one above).
316
365
  * Reads the list as it was before the verdict. */
@@ -445,7 +494,10 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
445
494
  if (initialItems !== initialItemsSeen) {
446
495
  setInitialItemsSeen(initialItems);
447
496
  if (initialItems) {
448
- setItems(inFlight ? setStatus(initialItems, inFlight.id, inFlight.status) : initialItems);
497
+ let next = inFlight ? setStatus(initialItems, inFlight.id, inFlight.status) : initialItems;
498
+ for (const [id, status] of pendingStatusesRef.current)
499
+ next = setStatus(next, id, status);
500
+ setItems(next);
449
501
  }
450
502
  if (!inFlight) {
451
503
  setPendingId(null);
@@ -505,7 +557,12 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
505
557
  return;
506
558
  }
507
559
  const before = items;
508
- setItems(next);
560
+ // Functional when it is one item's status: verdicts flushed in the same
561
+ // tick (the deck's unmount) must not overwrite each other's update.
562
+ if (optimistic)
563
+ setItems((current) => setStatus(current, optimistic.id, optimistic.status));
564
+ else
565
+ setItems(next);
509
566
  const result = server?.();
510
567
  const announce = () => (tone === 'info' ? infoToast : successToast)(message);
511
568
  if (!isPromiseLike(result)) {
@@ -514,16 +571,27 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
514
571
  }
515
572
  // Wait for the server: no "done" toast before it answers, and a refused
516
573
  // verdict puts the item back where it was.
517
- if (optimistic)
574
+ if (optimistic) {
518
575
  setInFlight(optimistic);
576
+ pendingStatusesRef.current.set(optimistic.id, optimistic.status);
577
+ }
519
578
  void Promise.resolve(result)
520
579
  .then((value) => {
521
580
  if (value !== REVIEW_VERDICT_ANNOUNCED)
522
581
  announce();
523
- }, () => setItems(before))
582
+ },
583
+ // A refused verdict puts back only its own item: other verdicts
584
+ // in flight (the deck sends one per Undo window) keep theirs.
585
+ () => setItems((current) => {
586
+ if (!optimistic)
587
+ return before;
588
+ const prior = before.find((i) => i.id === optimistic.id);
589
+ return prior ? current.map((i) => (i.id === prior.id ? prior : i)) : current;
590
+ }))
524
591
  .finally(() => {
525
592
  if (!optimistic)
526
593
  return;
594
+ pendingStatusesRef.current.delete(optimistic.id);
527
595
  setInFlight(null);
528
596
  setPendingId(null);
529
597
  setPendingDecision(null);
@@ -724,6 +792,10 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
724
792
  dismissIds([openItem.id]);
725
793
  return;
726
794
  }
795
+ // The deck owns its keys; the hidden list's cursor must not decide
796
+ // an item the deck does not show.
797
+ if (cards)
798
+ return;
727
799
  if (visible.length === 0)
728
800
  return;
729
801
  // j/k/x move from the open item's row when one is open, else from the
@@ -920,6 +992,16 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
920
992
  : segment === 'waiting'
921
993
  ? tI18nComplete.raw('text2c192433a710')
922
994
  : tI18nComplete.raw('text6a00736dae3c') })) : grouped ? (_jsx("div", { ...listProps, className: "space-y-4", children: groups.map((g) => (_jsxs("section", { className: "space-y-1", children: [_jsxs("div", { className: "flex h-7 items-center gap-2 px-2.5", children: [_jsx("h2", { className: "text-muted-foreground truncate text-xs font-medium", children: g.label }), _jsx(CountBadge, { count: g.items.length }), g.sessionId && onOpenSession && (_jsx("button", { type: "button", className: "text-muted-foreground hover:text-foreground duration-fast ml-auto shrink-0 text-xs transition-colors", onClick: () => onOpenSession(g.sessionId), children: tI18nComplete.raw('textb205bb47f81a') }))] }), _jsx("ul", { ...listboxProps, className: LIST_CLASS, children: g.items.map((item) => renderRow(item, visibleIndexById.get(item.id) ?? 0, true)) })] }, g.sessionId ?? '__none__'))) })) : (_jsx("ul", { ...listProps, ...listboxProps, className: LIST_CLASS, children: visible.map((item, idx) => renderRow(item, idx, false)) }));
995
+ const deckBody = (isError || isLoading) && items.length === 0 ? (listBody) : visible.length === 0 && loadMore ? (
996
+ // Nothing on the pages read so far, and more pages exist: never
997
+ // "caught up" (KRTX-1727).
998
+ _jsx("div", { className: "pt-6", children: loadMoreButton })) : (_jsx(ReviewSwipeDeck, { items: visible, allows: verdictAllowed, paused: !!selected || deckTab !== 'reviews', onOpen: (item) => setSelectedId(item.id), onDecide: (item, verdict, feedback) => actions.resolve(item.id, verdict === 'approve'
999
+ ? 'approved'
1000
+ : verdict === 'reject'
1001
+ ? 'rejected'
1002
+ : verdict === 'changes'
1003
+ ? 'changes_requested'
1004
+ : 'dismissed', undefined, feedback) }));
923
1005
  /** Nothing open: a quiet prompt to pick a row. */
924
1006
  const paneEmpty = (_jsx("div", { className: "flex min-h-full flex-1 items-center justify-center px-6 py-8", children: _jsx(EmptyState, { media: _jsx(EmptyArt, { icon: Tray }), size: "sm", title: tPane('emptyTitle'), description: tPane('emptyDescription') }) }));
925
1007
  // The detail pane: the open item, else (Needs you, wide) what the agents
@@ -940,15 +1022,19 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
940
1022
  // fetched once, so a refresh never flashes the empty pane on the way.
941
1023
  _jsxs("div", { className: "space-y-4 px-6 py-6", children: [_jsx(Skeleton, { className: "h-6 w-2/3" }), _jsx(Skeleton, { className: "h-4 w-1/3" }), _jsx(Skeleton, { className: "h-40 w-full" })] })) : (paneEmpty);
942
1024
  // Wide inbox, Needs you: the asks deck holds the empty pane.
943
- const deckInPane = wide && segment === 'needs_you' && !!needsYouDeck;
1025
+ const deckInPane = wide && segment === 'needs_you' && !!needsYouDeck && !cards;
944
1026
  return (
945
1027
  // Two panes in a named container: the inbox's own width picks the layout,
946
1028
  // not the viewport, since this view also mounts in the narrow settings
947
1029
  // panel. Below `@3xl` one pane shows at a time: the list, or the open item.
948
- _jsxs("div", { ref: rootRef, className: "@container/inbox relative flex h-full min-h-0", children: [_jsxs("div", { className: cn('border-border min-h-0 w-full min-w-0 flex-col @3xl/inbox:flex @3xl/inbox:w-sm @3xl/inbox:shrink-0 @6xl/inbox:w-md @3xl/inbox:border-r', selected ? 'hidden' : 'flex'), children: [_jsxs("div", { className: "border-border flex h-11 shrink-0 items-center gap-1 border-b px-2.5", children: [_jsx(Tabs, { value: segment, onValueChange: (v) => {
1030
+ _jsxs("div", { ref: rootRef, className: "@container/inbox relative flex h-full min-h-0", children: [_jsxs("div", { className: cn('border-border min-h-0 w-full min-w-0 flex-col',
1031
+ // The deck takes the whole inbox: one card, centred, no pane beside it.
1032
+ cards
1033
+ ? selected ? 'hidden' : 'flex'
1034
+ : cn('@3xl/inbox:flex @3xl/inbox:w-sm @3xl/inbox:shrink-0 @6xl/inbox:w-md @3xl/inbox:border-r', selected ? 'hidden' : 'flex')), children: [_jsxs("div", { className: "border-border flex h-11 shrink-0 items-center gap-1 border-b px-2.5", children: [_jsx(Tabs, { value: segment, onValueChange: (v) => {
949
1035
  setSegment(v);
950
1036
  markSeen();
951
- }, className: "min-w-0", children: _jsx(TabsList, { variant: "secondary", size: "sm", children: segments.map((s) => (_jsx(TabsTrigger, { value: s.value, className: "w-fit flex-none px-2.5", children: s.label }, s.value))) }) }), _jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-0.5", children: [_jsx(Hint, { label: _jsxs("span", { className: "flex items-center gap-1.5", children: [tI18nComplete.raw('text49c266baaaa7'), _jsx(Kbd, { children: "/" })] }), children: _jsx(Button, { type: "button", variant: showSearch ? 'secondary' : 'ghost', size: "icon-sm", "aria-label": tI18nComplete.raw('text49c266baaaa7'), "aria-expanded": showSearch, className: cn(!showSearch && 'text-muted-foreground'), onClick: () => {
1037
+ }, className: "min-w-0", children: _jsx(TabsList, { variant: "secondary", size: "sm", children: segments.map((s) => (_jsx(TabsTrigger, { value: s.value, className: "w-fit flex-none px-2.5", children: s.label }, s.value))) }) }), _jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-0.5", children: [deckEnabled && segment === 'needs_you' ? (_jsx(Hint, { label: cards ? tDeck('showList') : tDeck('showCards'), children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": cards ? tDeck('showList') : tDeck('showCards'), "data-testid": "review-view-toggle", className: "text-muted-foreground", onClick: () => setView(cards ? 'list' : 'cards'), children: cards ? _jsx(Rows, { className: "size-4" }) : _jsx(Cards, { className: "size-4" }) }) })) : null, _jsx(Hint, { label: _jsxs("span", { className: "flex items-center gap-1.5", children: [tI18nComplete.raw('text49c266baaaa7'), _jsx(Kbd, { children: "/" })] }), children: _jsx(Button, { type: "button", variant: showSearch ? 'secondary' : 'ghost', size: "icon-sm", "aria-label": tI18nComplete.raw('text49c266baaaa7'), "aria-expanded": showSearch, className: cn(!showSearch && 'text-muted-foreground'), onClick: () => {
952
1038
  if (showSearch && !query) {
953
1039
  setSearchOpen(false);
954
1040
  return;
@@ -964,20 +1050,27 @@ export function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChan
964
1050
  }, onBlur: () => {
965
1051
  if (!query)
966
1052
  setSearchOpen(false);
967
- }, placeholder: tI18nComplete.raw('text49c266baaaa7'), variant: "popover", size: "sm" })] })) : null, filtered ? (_jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [activeKind ? (_jsx(FilterChip, { label: activeKind.label, onRemove: () => setKindFilter('all') })) : null, activeSession ? (_jsx(FilterChip, { label: activeSession.label, onRemove: () => setSessionFilter('all') })) : null, grouped ? (_jsx(FilterChip, { label: tI18nComplete.raw('text137f98df3b9b'), onRemove: () => setGrouped(false) })) : null] })) : null] })) : null, _jsxs("div", { className: cn('min-h-0 flex-1 overflow-y-auto p-1.5', selectMode && segment === 'needs_you' && 'pb-20'), children: [segment === 'needs_you' && needsYouDeck && !wide ? (
1053
+ }, placeholder: tI18nComplete.raw('text49c266baaaa7'), variant: "popover", size: "sm" })] })) : null, filtered ? (_jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [activeKind ? (_jsx(FilterChip, { label: activeKind.label, onRemove: () => setKindFilter('all') })) : null, activeSession ? (_jsx(FilterChip, { label: activeSession.label, onRemove: () => setSessionFilter('all') })) : null, grouped ? (_jsx(FilterChip, { label: tI18nComplete.raw('text137f98df3b9b'), onRemove: () => setGrouped(false) })) : null] })) : null] })) : null, _jsxs("div", { className: cn('min-h-0 flex-1 overflow-y-auto p-1.5',
1054
+ // The deck fills what the asks above it leave.
1055
+ cards && 'flex flex-col', selectMode && segment === 'needs_you' && 'pb-20'), children: [cards && needsYouDeck && sessionAsks.length > 0 ? (
1056
+ // One stack at a time: the review cards, or the questions agents
1057
+ // ask. Two decks stacked on one screen read as clutter.
1058
+ _jsx("div", { className: "flex shrink-0 justify-center pt-1", children: _jsx(Tabs, { value: deckTab, onValueChange: (v) => setDeckTab(v), children: _jsxs(TabsList, { variant: "secondary", size: "sm", children: [_jsxs(TabsTrigger, { value: "reviews", className: "w-fit flex-none gap-1.5 px-2.5", children: [tDeck('reviews'), _jsx(CountBadge, { count: visible.length })] }), _jsxs(TabsTrigger, { value: "questions", className: "w-fit flex-none gap-1.5 px-2.5", children: [tDeck('questions'), _jsx(CountBadge, { count: sessionAsks.length })] })] }) }) })) : null, segment === 'needs_you' && needsYouDeck && (cards || !wide) ? (
968
1059
  // `peer`: when the deck draws nothing (its Undo window after the
969
- // last card), the list's empty state below shows instead.
970
- _jsx("div", { className: "peer px-1 pt-1 pb-3 empty:hidden", children: needsYouDeck({ paused: !!selected }) })) : null, wide ? visibleAsks.map((ask) => (_jsxs(Button, { "data-testid": "review-ask-row", variant: "ghost", "aria-pressed": !selected && selectedAskId === ask.id, className: cn('h-auto w-full justify-start gap-2 px-2.5 py-3 text-left whitespace-normal', !selected && selectedAskId === ask.id && 'bg-active'), onClick: () => {
1060
+ // last card), the list's empty state below shows instead. In
1061
+ // cards mode the stack not shown stays mounted, paused: switching
1062
+ // must not send what waits in its Undo window.
1063
+ _jsx("div", { className: cn('peer px-1 pt-1 pb-3 empty:hidden', cards && deckTab !== 'questions' && 'hidden'), children: needsYouDeck({ paused: !!selected || (cards && deckTab !== 'questions') }) })) : null, cards ? (_jsx("div", { className: cn('flex min-h-0 flex-1 flex-col', deckTab !== 'reviews' && 'hidden'), children: deckBody })) : null, cards && deckTab === 'reviews' && visible.length > 0 && loadMore?.isError ? (_jsx("div", { className: "flex shrink-0 justify-center pb-2", children: loadMoreButton })) : null, wide && !cards ? visibleAsks.map((ask) => (_jsxs(Button, { "data-testid": "review-ask-row", variant: "ghost", "aria-pressed": !selected && selectedAskId === ask.id, className: cn('h-auto w-full justify-start gap-2 px-2.5 py-3 text-left whitespace-normal', !selected && selectedAskId === ask.id && 'bg-active'), onClick: () => {
971
1064
  setSelectedId(null);
972
1065
  onSelectAsk?.(ask.id);
973
- }, children: [_jsx("span", { className: "flex size-8 shrink-0 items-center justify-center", children: _jsx(Chats, { className: "text-muted-foreground size-4" }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "line-clamp-2 text-sm font-medium", children: ask.title }), ask.session_title ? _jsx("span", { className: "text-muted-foreground block truncate text-xs", children: ask.session_title }) : null] })] }, ask.id))) : null, listBody, visible.length > 0 && loadMore ? _jsx("div", { className: "pt-2", children: loadMoreButton }) : null] }), selectMode && segment === 'needs_you' ? (
1066
+ }, children: [_jsx("span", { className: "flex size-8 shrink-0 items-center justify-center", children: _jsx(Chats, { className: "text-muted-foreground size-4" }) }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "line-clamp-2 text-sm font-medium", children: ask.title }), ask.session_title ? _jsx("span", { className: "text-muted-foreground block truncate text-xs", children: ask.session_title }) : null] })] }, ask.id))) : null, cards ? null : listBody, visible.length > 0 && loadMore && !cards ? _jsx("div", { className: "pt-2", children: loadMoreButton }) : null] }), selectMode && segment === 'needs_you' ? (
974
1067
  // Pinned to the bottom of the inbox, not to the end of the list
975
1068
  // (`sticky` stops where a short list ends, schedule-view.tsx), and
976
1069
  // across the whole inbox: the list column is too narrow for its verbs.
977
1070
  _jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-4 z-10 flex justify-center px-4", children: _jsx("div", { className: "pointer-events-auto w-full max-w-xl", children: _jsx(SelectionBar, { selectedCount: selectedItems.length, allSelected: selectableIds.length > 0 &&
978
1071
  selectedItems.length >= Math.min(BULK_MAX, selectableIds.length), canSelectAll: selectableIds.length > 0, onSelectAll: () => setSelectedIds(new Set(selectableIds.slice(0, BULK_MAX))), onClear: () => setSelectedIds(new Set()), onExit: exitSelectMode, actions: bulkActions, progress: bulkProgress, animateIn: selectMode !== 'key', note: selectedItems.length >= BULK_MAX && selectableIds.length > BULK_MAX
979
1072
  ? tBulk('limitNote', { count: BULK_MAX })
980
- : undefined }) }) })) : null] }), _jsxs("div", { className: cn('min-h-0 min-w-0 flex-1 flex-col @3xl/inbox:flex', selected ? 'flex' : 'hidden'), children: [deckInPane && needsYouDeck ? (
1073
+ : undefined }) }) })) : null] }), _jsxs("div", { className: cn('min-h-0 min-w-0 flex-1 flex-col', !cards && '@3xl/inbox:flex', selected ? 'flex' : 'hidden'), children: [deckInPane && needsYouDeck ? (
981
1074
  // Not keyed by the open item and kept mounted while one is open
982
1075
  // (`paused`, hidden): a staged answer keeps its Undo window.
983
1076
  _jsxs("div", { className: cn('min-h-0 flex-1 flex-col overflow-y-auto', selected ? 'hidden' : 'flex'), children: [_jsx("div", { className: "peer mx-auto flex min-h-full w-full max-w-2xl flex-col justify-center px-6 py-8 empty:hidden", children: needsYouDeck({ paused: !!selected }) }), _jsx("div", { className: "hidden min-h-full flex-1 peer-empty:flex", children: paneEmpty })] })) : null, selected || !deckInPane ? (
@@ -23,6 +23,25 @@ export interface ReviewActions {
23
23
  * it refuses does not render. */
24
24
  allows: (item: ReviewItem, verdict: ReviewVerdict) => boolean;
25
25
  }
26
+ /**
27
+ * An agent-supplied link, only when it is http(s). A `javascript:` or `data:`
28
+ * URL in a review item's detail must never become a clickable href.
29
+ */
30
+ export declare function httpUrl(url: string | undefined): string | undefined;
31
+ /**
32
+ * The agent's note, then what it made: the first image, video or sound drawn
33
+ * inline, its text, and every other file as a row. Nothing it made, no section.
34
+ *
35
+ * A `/drives/…` path reads through the item's session: its mounts name the
36
+ * drive behind each path (`SessionDriveFilesScope`), exactly as in the
37
+ * session. A workspace path needs a running box, which the inbox does not
38
+ * have, so it is listed and not opened.
39
+ */
40
+ export declare function OutputBody({ item }: {
41
+ item: Extract<ReviewItem, {
42
+ kind: 'output';
43
+ }>;
44
+ }): import("react").JSX.Element;
26
45
  /**
27
46
  * Leaves the open item. On a narrow inbox it is Back to the list; with both
28
47
  * panes it is Close, which brings the empty pane (and the asks deck) back.
@@ -47,7 +47,7 @@ function ChangeBody({ item, actions, onClose, conflicts, }) {
47
47
  return (_jsxs(_Fragment, { children: [requested.length > 0 && (_jsxs(Item, { variant: "outline", size: "sm", children: [_jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: tI18nComplete.raw('textb0eabce39690') }), _jsx("ul", { className: "text-foreground list-disc space-y-1 pl-5 text-sm", children: requested.map((r) => (_jsx("li", { className: "text-pretty", children: r.text }, r.at ?? r.text))) }), _jsx(ItemDescription, { children: tI18nComplete.raw('texte648ea58ae80') })] }), item.sessionId && actions.openSession ? (_jsx(ItemActions, { children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => {
48
48
  actions.openSession?.(item.sessionId);
49
49
  onClose();
50
- }, children: tI18nComplete.raw('textd1636c646e66') }) })) : null] })), (whatChanged.length > 0 || d.impact) && (_jsxs("div", { className: "space-y-2", children: [whatChanged.length > 0 && (_jsx("ul", { className: "text-muted-foreground list-disc space-y-1 pl-5 text-sm", children: whatChanged.map((line) => (_jsx("li", { className: "text-pretty", children: line }, line))) })), d.impact && _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: d.impact })] })), (verification.length > 0 || d.previewUrl) && (_jsxs(Item, { variant: "outline", size: "sm", children: [_jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: tI18nComplete.raw('text7140f4f19dec') }), verification.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: verification.map((v) => (_jsx(Badge, { variant: VERIFICATION_BADGE[v.tone], size: "sm", children: v.label }, v.label))) }))] }), d.previewUrl && (_jsx(ItemActions, { children: _jsx(Button, { variant: "outline", size: "sm", asChild: true, children: _jsx("a", { href: d.previewUrl, target: "_blank", rel: "noopener noreferrer", children: tI18nComplete.raw('textf7afe3dde18c') }) }) }))] })), conflicts.length > 0 && (_jsxs(Item, { variant: "warning", size: "sm", children: [_jsxs(ItemContent, { children: [_jsxs(ItemTitle, { children: [tI18nComplete.raw('text62e2514edc8d'), " ", conflicts.length, ' ', conflicts.length === 1 ? 'file' : 'files'] }), _jsx(ItemDescription, { children: tI18nComplete.raw('text0ffc4db692f7') })] }), actions.allows(item, 'approve') ? (_jsx(ItemActions, { children: _jsxs(Button, { size: "sm", disabled: recovering, onClick: () => {
50
+ }, children: tI18nComplete.raw('textd1636c646e66') }) })) : null] })), (whatChanged.length > 0 || d.impact) && (_jsxs("div", { className: "space-y-2", children: [whatChanged.length > 0 && (_jsx("ul", { className: "text-muted-foreground list-disc space-y-1 pl-5 text-sm", children: whatChanged.map((line) => (_jsx("li", { className: "text-pretty", children: line }, line))) })), d.impact && _jsx("p", { className: "text-muted-foreground text-sm text-pretty", children: d.impact })] })), (verification.length > 0 || httpUrl(d.previewUrl)) && (_jsxs(Item, { variant: "outline", size: "sm", children: [_jsxs(ItemContent, { children: [_jsx(ItemTitle, { children: tI18nComplete.raw('text7140f4f19dec') }), verification.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: verification.map((v) => (_jsx(Badge, { variant: VERIFICATION_BADGE[v.tone], size: "sm", children: v.label }, v.label))) }))] }), httpUrl(d.previewUrl) && (_jsx(ItemActions, { children: _jsx(Button, { variant: "outline", size: "sm", asChild: true, children: _jsx("a", { href: httpUrl(d.previewUrl), target: "_blank", rel: "noopener noreferrer", children: tI18nComplete.raw('textf7afe3dde18c') }) }) }))] })), conflicts.length > 0 && (_jsxs(Item, { variant: "warning", size: "sm", children: [_jsxs(ItemContent, { children: [_jsxs(ItemTitle, { children: [tI18nComplete.raw('text62e2514edc8d'), " ", conflicts.length, ' ', conflicts.length === 1 ? 'file' : 'files'] }), _jsx(ItemDescription, { children: tI18nComplete.raw('text0ffc4db692f7') })] }), actions.allows(item, 'approve') ? (_jsx(ItemActions, { children: _jsxs(Button, { size: "sm", disabled: recovering, onClick: () => {
51
51
  if (actions.recoverChange) {
52
52
  actions.recoverChange(item, conflicts);
53
53
  }
@@ -104,6 +104,21 @@ function ApprovalBody({ item, actions, onResolved, }) {
104
104
  }, children: [busy && actions.pendingDecision === 'approve' ? (_jsx(Loading, { className: "size-3.5 shrink-0" })) : (_jsx(Check, { className: "size-3.5" })), tI18nComplete.raw('textae067b687107')] })] })] }))] }));
105
105
  })() }));
106
106
  }
107
+ /**
108
+ * An agent-supplied link, only when it is http(s). A `javascript:` or `data:`
109
+ * URL in a review item's detail must never become a clickable href.
110
+ */
111
+ export function httpUrl(url) {
112
+ if (!url)
113
+ return undefined;
114
+ try {
115
+ const parsed = new URL(url);
116
+ return parsed.protocol === 'http:' || parsed.protocol === 'https:' ? parsed.href : undefined;
117
+ }
118
+ catch {
119
+ return undefined;
120
+ }
121
+ }
107
122
  // ── output ────────────────────────────────────────────────────────────────
108
123
  /** File kinds an output draws inline. Everything else is a row that opens it. */
109
124
  const INLINE_MEDIA = new Set(['image', 'video', 'audio']);
@@ -123,7 +138,7 @@ function OutputFileRow({ file, readable, }) {
123
138
  * session. A workspace path needs a running box, which the inbox does not
124
139
  * have, so it is listed and not opened.
125
140
  */
126
- function OutputBody({ item }) {
141
+ export function OutputBody({ item }) {
127
142
  const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
128
143
  const projectId = useProjectContext()?.projectId;
129
144
  const sessionId = item.sessionId;
@@ -136,7 +151,7 @@ function OutputBody({ item }) {
136
151
  return (_jsxs(_Fragment, { children: [projectId && sessionId ? (_jsx(SessionDriveFilesScope, { projectId: projectId, sessionId: sessionId })) : null, d.note ? (_jsx("p", { className: "text-foreground text-sm whitespace-pre-wrap text-pretty", children: d.note })) : null, media ? (
137
152
  // A video takes a 16:9 box: the inline card's fixed height bars a
138
153
  // landscape cut top and bottom, worst on a phone.
139
- _jsx("div", { className: cn('overflow-hidden rounded-md border', video && 'aspect-video'), children: _jsx(ShowContentRenderer, { type: "file", path: media.path, fill: video }) })) : null, d.preview ? (_jsxs("section", { children: [_jsx(SectionLabel, { children: tI18nComplete.raw('text526e0087cc3f') }), _jsx("p", { className: "text-foreground text-sm whitespace-pre-wrap text-pretty", children: d.preview })] })) : null, rest.length > 0 ? (_jsxs("section", { children: [_jsx(SectionLabel, { children: tI18nComplete.raw('textabc7e9892806') }), _jsx("ul", { className: "-mx-2 space-y-0.5", children: rest.map((f) => (_jsx(OutputFileRow, { file: f, readable: readable(f.path) }, f.path))) })] })) : null, d.previewUrl ? (_jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5", asChild: true, children: _jsxs("a", { href: d.previewUrl, target: "_blank", rel: "noopener noreferrer", children: [tI18nComplete.raw('textf7afe3dde18c'), _jsx(ArrowUpRight, { className: "size-3.5 shrink-0" })] }) })) : null] }));
154
+ _jsx("div", { className: cn('overflow-hidden rounded-md border', video && 'aspect-video'), children: _jsx(ShowContentRenderer, { type: "file", path: media.path, fill: video }) })) : null, d.preview ? (_jsxs("section", { children: [_jsx(SectionLabel, { children: tI18nComplete.raw('text526e0087cc3f') }), _jsx("p", { className: "text-foreground text-sm whitespace-pre-wrap text-pretty", children: d.preview })] })) : null, rest.length > 0 ? (_jsxs("section", { children: [_jsx(SectionLabel, { children: tI18nComplete.raw('textabc7e9892806') }), _jsx("ul", { className: "-mx-2 space-y-0.5", children: rest.map((f) => (_jsx(OutputFileRow, { file: f, readable: readable(f.path) }, f.path))) })] })) : null, httpUrl(d.previewUrl) ? (_jsx(Button, { variant: "outline", size: "sm", className: "gap-1.5", asChild: true, children: _jsxs("a", { href: httpUrl(d.previewUrl), target: "_blank", rel: "noopener noreferrer", children: [tI18nComplete.raw('textf7afe3dde18c'), _jsx(ArrowUpRight, { className: "size-3.5 shrink-0" })] }) })) : null] }));
140
155
  }
141
156
  // ── decision ──────────────────────────────────────────────────────────────
142
157
  function DecisionBody({ item, actions, onClose, }) {
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Review page's card deck: the Needs you items, one card at a time.
3
+ *
4
+ * Drag a card right for its yes (Merge, Approve), left for its no (Close,
5
+ * Deny, Dismiss), or use the buttons under the stack. Skip moves the card to
6
+ * the back. A click on the card opens the item's detail. A decision has no
7
+ * swipe: it needs a chosen option, so its card offers Open only.
8
+ *
9
+ * Keyboard, while focus is in the deck: → yes, ← no, S skip, Enter open.
10
+ * A verdict waits `UNDO_MS` behind an Undo toast before `onDecide` sends it.
11
+ * Unmounting the deck sends what waits.
12
+ */
13
+ import type { ReviewVerdict } from '@kortix/sdk';
14
+ import type { ReviewItem } from './types.js';
15
+ export interface ReviewSwipeDeckProps {
16
+ /** The Needs you items, in list order. */
17
+ items: ReviewItem[];
18
+ /** Whether this viewer may give `verdict` on `item` (KRTX-1720). */
19
+ allows: (item: ReviewItem, verdict: ReviewVerdict) => boolean;
20
+ /** Sends a verdict. Runs after the Undo window. `feedback`: what should change. */
21
+ onDecide: (item: ReviewItem, verdict: ReviewVerdict, feedback?: string) => void;
22
+ /** Opens one item's detail. */
23
+ onOpen: (item: ReviewItem) => void;
24
+ /** True while an item's detail covers the deck: its keys are off. */
25
+ paused?: boolean;
26
+ }
27
+ export declare function ReviewSwipeDeck({ items, allows, onDecide, onOpen, paused }: ReviewSwipeDeckProps): import("react").JSX.Element;