@kortix/ui 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_vendor/kortix-shared.js +233 -130
- package/dist/_vendor/shared/code-language.d.ts +2 -2
- package/dist/_vendor/shared/html.d.ts +7 -0
- package/dist/_vendor/shared/index.d.ts +1 -2
- package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
- package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
- package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
- package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
- package/dist/_vendor/shared/utils/string.d.ts +6 -0
- package/dist/artifacts/artifact-frame.d.ts +0 -1
- package/dist/artifacts/artifact-frame.js +4 -10
- package/dist/artifacts/artifact-session.js +4 -7
- package/dist/artifacts/frame-policy.d.ts +1 -1
- package/dist/artifacts/frame-policy.js +2 -2
- package/dist/customize/agents/agent-page.js +5 -5
- package/dist/customize/agents/agent-status.js +1 -1
- package/dist/customize/agents/agents-page.js +3 -3
- package/dist/customize/connectors/use-agent-access.d.ts +3 -3
- package/dist/customize/sections/connectors-view.js +50 -37
- package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
- package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
- package/dist/customize/sections/llm-provider/device-grant.js +27 -0
- package/dist/customize/sections/view/agent-editor-catalog.js +0 -5
- package/dist/customize/sections/view/agent-editor.d.ts +2 -2
- package/dist/customize/sections/view/agent-editor.js +2 -2
- package/dist/customize/sections/view/review-center-connected.js +37 -6
- package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
- package/dist/customize/sections/view/secret-delivery.js +5 -4
- package/dist/customize/triggers/schedule/trigger-list.d.ts +2 -2
- package/dist/customize/triggers/schedule/trigger-list.js +12 -18
- package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
- package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
- package/dist/files/project/api/runtime-files.d.ts +2 -2
- package/dist/files/project/api/runtime-files.js +2 -2
- package/dist/files/project/components/drive-explorer.js +1 -1
- package/dist/files/project/components/drive-grid-view.js +0 -1
- package/dist/files/project/components/drive-list-view.js +0 -1
- package/dist/files/project/components/file-explorer-page.js +1 -1
- package/dist/files/project/hooks/index.d.ts +1 -1
- package/dist/files/project/hooks/index.js +1 -1
- package/dist/files/project/hooks/use-server-health.d.ts +1 -1
- package/dist/files/project/hooks/use-server-health.js +1 -1
- package/dist/files/project/search/workspace-search-service.d.ts +1 -1
- package/dist/files/project/search/workspace-search-service.js +1 -1
- package/dist/files/runtime/hooks/index.d.ts +1 -1
- package/dist/files/runtime/hooks/index.js +1 -1
- package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
- package/dist/files/runtime/hooks/server-health-state.js +2 -2
- package/dist/files/runtime/hooks/system-dir.js +2 -2
- package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-content.js +1 -1
- package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
- package/dist/files/runtime/hooks/use-file-list.js +3 -3
- package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
- package/dist/files/runtime/hooks/use-server-health.js +3 -3
- package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
- package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
- package/dist/files/runtime/index.d.ts +2 -2
- package/dist/files/runtime/index.js +2 -2
- package/dist/files/runtime/path-utils.d.ts +1 -1
- package/dist/files/runtime/path-utils.js +1 -1
- package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
- package/dist/files/runtime/sandbox-explorer-source.js +1 -1
- package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
- package/dist/files/runtime/sandbox-file-explorer.js +2 -2
- package/dist/files/tree/components/file-tree-item.js +0 -1
- package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
- package/dist/files/tree/hooks/use-file-events.js +1 -1
- package/dist/i18n/en.d.ts +60 -175
- package/dist/i18n/en.js +71 -186
- package/dist/internal/components/agent-mark.js +6 -0
- package/dist/internal/components/clickable-path.d.ts +3 -0
- package/dist/internal/components/clickable-path.js +4 -1
- package/dist/internal/files/file-read-retry.js +1 -1
- package/dist/internal/files/types.d.ts +2 -2
- package/dist/internal/files/types.js +2 -2
- package/dist/internal/goals/goal-meta.d.ts +33 -14
- package/dist/internal/goals/goal-meta.js +55 -13
- package/dist/internal/layout/nav-hover-card.d.ts +1 -1
- package/dist/internal/layout/nav-hover-card.js +1 -1
- package/dist/internal/layout/project-capability-nav.d.ts +1 -1
- package/dist/internal/layout/project-capability-nav.js +1 -1
- package/dist/internal/lib/browser-error-noise.d.ts +1 -1
- package/dist/internal/lib/browser-error-noise.js +1 -1
- package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
- package/dist/internal/lib/browser-noise/rules/injected-scripts.js +29 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
- package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
- package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
- package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
- package/dist/internal/lib/delivered-but-disconnected.js +3 -5
- package/dist/internal/lib/error-handler.js +8 -3
- package/dist/internal/lib/pixel-mark.d.ts +4 -17
- package/dist/internal/lib/pixel-mark.js +5 -148
- package/dist/internal/lib/sounds.d.ts +4 -4
- package/dist/internal/lib/sounds.js +4 -4
- package/dist/internal/lib/trigger-clock.d.ts +5 -0
- package/dist/internal/lib/trigger-clock.js +15 -0
- package/dist/internal/lib/turn-broadcast.d.ts +0 -3
- package/dist/internal/lib/use-project-feature-flags.d.ts +2 -0
- package/dist/internal/lib/use-project-feature-flags.js +5 -5
- package/dist/internal/lib/web-notifications.d.ts +1 -8
- package/dist/internal/lib/web-notifications.js +12 -53
- package/dist/internal/notifications/notification-bell.d.ts +13 -33
- package/dist/internal/notifications/notification-bell.js +14 -117
- package/dist/internal/notifications/notification-inbox.d.ts +45 -0
- package/dist/internal/notifications/notification-inbox.js +119 -0
- package/dist/internal/notifications/notification-rows.d.ts +3 -4
- package/dist/internal/notifications/notification-rows.js +1 -4
- package/dist/internal/notifications/use-inbox-summary.d.ts +13 -0
- package/dist/internal/notifications/use-inbox-summary.js +22 -0
- package/dist/internal/notifications/web-push.d.ts +9 -10
- package/dist/internal/notifications/web-push.js +9 -10
- package/dist/internal/stores/composer-prefill-store.js +4 -1
- package/dist/internal/stores/sound-store.d.ts +4 -4
- package/dist/internal/stores/sound-store.js +10 -0
- package/dist/internal/stores/web-notification-store.d.ts +6 -9
- package/dist/internal/stores/web-notification-store.js +0 -4
- package/dist/lib/routes.d.ts +8 -0
- package/dist/lib/routes.js +4 -1
- package/dist/markdown/code/shiki-highlighter.js +14 -5
- package/dist/markdown/doc-editor/doc-menus.d.ts +1 -10
- package/dist/markdown/doc-editor/doc-menus.js +6 -69
- package/dist/markdown/file-links.js +33 -3
- package/dist/markdown/markdown-frontmatter.d.ts +6 -6
- package/dist/markdown/markdown-frontmatter.js +3 -3
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/button.js +2 -1
- package/dist/session/agents/held-messages.d.ts +1 -5
- package/dist/session/agents/held-messages.js +1 -21
- package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
- package/dist/session/composer/ComposerAboveCard.js +2 -2
- package/dist/session/composer/composer-chat-input.d.ts +1 -1
- package/dist/session/composer/composer-chat-input.js +2 -2
- package/dist/session/composer/composer.js +16 -1
- package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
- package/dist/session/composer/hooks/use-file-search.js +16 -16
- package/dist/session/composer/menus/mention-controller.js +1 -3
- package/dist/session/composer/menus/space-mentions.d.ts +14 -4
- package/dist/session/composer/menus/space-mentions.js +17 -1
- package/dist/session/composer/use-instant-session-send.js +2 -2
- package/dist/session/header/reminder-parts.d.ts +1 -1
- package/dist/session/header/session-goal-indicator.js +4 -4
- package/dist/session/header/session-site-header.js +2 -6
- package/dist/session/panel/easy/plan-card.d.ts +2 -2
- package/dist/session/panel/easy/plan-card.js +2 -2
- package/dist/session/panel/session-desktop.js +6 -0
- package/dist/session/panel/session-reminders-panel.js +4 -15
- package/dist/session/panel/use-session-panel-state.js +2 -2
- package/dist/session/status/sandbox-loading-boundary.js +2 -2
- package/dist/session/status/session-terminal-state.d.ts +47 -0
- package/dist/session/status/session-terminal-state.js +56 -0
- package/dist/session/thread/plan-surface.d.ts +1 -1
- package/dist/session/thread/plan-surface.js +1 -1
- package/dist/session/thread/session-chat.d.ts +1 -1
- package/dist/session/thread/session-chat.js +88 -99
- package/dist/session/thread/stop-sequence.d.ts +51 -0
- package/dist/session/thread/stop-sequence.js +55 -0
- package/dist/session/thread/transcript.d.ts +2 -2
- package/dist/session/thread/transcript.js +2 -2
- package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
- package/dist/session/tool/tools/apply-patch-tool.js +1 -1
- package/dist/session/tool/tools/kortix-action-tool.js +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
- package/dist/session/tool/tools/multi-agent-tools.js +1 -1
- package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-kill-tool.js +1 -1
- package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
- package/dist/session/tool/tools/pty-read-tool.js +2 -2
- package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
- package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/pty-write-tool.js +1 -1
- package/dist/session/tool/tools/session-spawn-tool.js +7 -4
- package/dist/session/tool/tools/task-tool.js +18 -4
- package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
- package/dist/session/tool/tools/todo-write-tool.js +1 -1
- package/dist/session/turn/peer-message-row.d.ts +1 -10
- package/dist/session/turn/peer-message-row.js +1 -18
- package/dist/session/turn/plan-anchor.d.ts +3 -3
- package/dist/session/turn/plan-anchor.js +3 -3
- package/dist/session/turn/plan-card.d.ts +7 -7
- package/dist/session/turn/plan-card.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/terminal/terminal-card-gate.d.ts +6 -3
- package/dist/terminal/terminal-card-gate.js +21 -4
- package/dist/workspace/home/access-requests-bell.d.ts +6 -9
- package/dist/workspace/home/access-requests-bell.js +8 -10
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/layout/project-home.js +1 -2
- package/dist/workspace/review/review-center.d.ts +8 -2
- package/dist/workspace/review/review-center.js +44 -13
- package/dist/workspace/review/review-reducer.d.ts +7 -0
- package/dist/workspace/review/review-reducer.js +11 -0
- package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
- package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
- package/dist/workspace/sidebar/project-nav-items.js +11 -12
- package/dist/workspace/sidebar/project-sidebar.js +2 -6
- package/dist/workspace/spaces/principal-card.d.ts +3 -1
- package/dist/workspace/spaces/principal-card.js +3 -3
- package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
- package/dist/workspace/spaces/space-agent-ask.js +36 -0
- package/dist/workspace/spaces/space-details-dialog.js +1 -1
- package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
- package/dist/workspace/spaces/space-details-panel.js +62 -8
- package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
- package/dist/workspace/spaces/space-mention-source.js +12 -19
- package/dist/workspace/spaces/space-view.js +3 -2
- package/package.json +11 -7
- package/skills/kortix-ui/references/custom-dashboard.md +1 -1
- package/skills/kortix-ui/references/modules.md +1 -1
- package/dist/_vendor/shared/artifact-annotations.d.ts +0 -311
- package/dist/_vendor/shared/artifact-comments.d.ts +0 -155
- package/dist/internal/hooks/use-notification-center.d.ts +0 -50
- package/dist/internal/hooks/use-notification-center.js +0 -151
- package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
- package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
|
@@ -34,7 +34,6 @@ import { useDesktopShell } from '../../internal/layout/sidebar-opener.js';
|
|
|
34
34
|
import { SidebarToggle } from '../../internal/layout/sidebar-toggle.js';
|
|
35
35
|
import { useRenameSession } from '../actions/use-rename-session.js';
|
|
36
36
|
import { SessionDeleteModal } from '../actions/session-delete-modal.js';
|
|
37
|
-
import { useNotificationCenter } from '../../internal/hooks/use-notification-center.js';
|
|
38
37
|
import { useUiComponents, useUiHostConfig, useUiPathname, useUiRouter, useUiViewerId, } from '../../providers/ui-provider.js';
|
|
39
38
|
import { getSessionDisplayTitle } from '../actions/project-session-list-helpers.js';
|
|
40
39
|
import { useReloadSessionConfig } from '../../internal/hooks/projects/use-session-config-freshness.js';
|
|
@@ -128,17 +127,14 @@ export function SessionSiteHeader({ sessionId, sessionTitle, isMobileView, leadi
|
|
|
128
127
|
});
|
|
129
128
|
// Mute: the caller's watch on this session (KRTX-1742). Anyone who can open
|
|
130
129
|
// it may mute it; unmuting a session you never watched makes you a watcher.
|
|
131
|
-
// Only with the project's `notification_center` flag on: off, the watch
|
|
132
|
-
// routes answer 403 and the item does not exist.
|
|
133
130
|
const viewerId = useUiViewerId();
|
|
134
|
-
const notificationCenter = useNotificationCenter(projectId);
|
|
135
131
|
const sessionWatch = useSessionWatch({
|
|
136
132
|
userId: viewerId,
|
|
137
133
|
projectId,
|
|
138
134
|
sessionId: projectSessionId,
|
|
139
|
-
enabled: isProjectSession && !parent
|
|
135
|
+
enabled: isProjectSession && !parent,
|
|
140
136
|
});
|
|
141
|
-
const watching =
|
|
137
|
+
const watching = sessionWatch.data?.watching;
|
|
142
138
|
const toggleWatch = () => {
|
|
143
139
|
if (watching === undefined)
|
|
144
140
|
return;
|
|
@@ -10,13 +10,13 @@ import { type TodoItem } from '../../tool/shared/todo-helpers.js';
|
|
|
10
10
|
* single row.
|
|
11
11
|
*
|
|
12
12
|
* Pure, so both branches are testable without mounting anything.
|
|
13
|
-
* @deprecated Renders an OpenCode-only tool or todo list
|
|
13
|
+
* @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
|
|
14
14
|
*/
|
|
15
15
|
export declare function planPanelRows(todos: ReadonlyArray<TodoItem>): Array<{
|
|
16
16
|
todo: TodoItem;
|
|
17
17
|
key: string;
|
|
18
18
|
}>;
|
|
19
|
-
/** @deprecated Renders an OpenCode-only tool or todo list
|
|
19
|
+
/** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
|
|
20
20
|
export declare function PlanPanelCard({ sessionId }: {
|
|
21
21
|
sessionId: string;
|
|
22
22
|
}): import("react").JSX.Element | null;
|
|
@@ -64,7 +64,7 @@ function PlanProgress({ done, total, running }) {
|
|
|
64
64
|
* single row.
|
|
65
65
|
*
|
|
66
66
|
* Pure, so both branches are testable without mounting anything.
|
|
67
|
-
* @deprecated Renders an OpenCode-only tool or todo list
|
|
67
|
+
* @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
|
|
68
68
|
*/
|
|
69
69
|
export function planPanelRows(todos) {
|
|
70
70
|
// Keyed first, filtered second — see `planListTodos`: keying first is what
|
|
@@ -73,7 +73,7 @@ export function planPanelRows(todos) {
|
|
|
73
73
|
const listed = planListTodos(keyed);
|
|
74
74
|
return listed.length > 0 ? listed : keyed;
|
|
75
75
|
}
|
|
76
|
-
/** @deprecated Renders an OpenCode-only tool or todo list
|
|
76
|
+
/** @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code. */
|
|
77
77
|
export function PlanPanelCard({ sessionId }) {
|
|
78
78
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
79
79
|
const { data } = useRuntimeSessionTodo(sessionId);
|
|
@@ -13,6 +13,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
13
13
|
* (or a click on the screen) drops the shield, rings the screen and focuses
|
|
14
14
|
* it; "Return control" puts the shield back.
|
|
15
15
|
*
|
|
16
|
+
* voxl resizes the desktop to the viewer's window (--enable-resize). With more
|
|
17
|
+
* than one viewer, one viewer sizes it: the first to connect, then whoever
|
|
18
|
+
* acts on the desktop (apps/sandbox/voxl/size-owner.patch); the others watch
|
|
19
|
+
* it scaled. Before that patch two viewers of different sizes resized it back
|
|
20
|
+
* and forth, and every resize showed a black frame.
|
|
21
|
+
*
|
|
16
22
|
* The frame unmounts while this browser tab is hidden. voxl paces every
|
|
17
23
|
* viewer to the slowest one, and a background tab stops acking frames, so a
|
|
18
24
|
* forgotten tab would slow the stream for everyone watching. It reconnects,
|
|
@@ -27,7 +27,7 @@ import { cn } from '../../internal/lib/utils.js';
|
|
|
27
27
|
import { useLocale, useTranslations } from '../../i18n/index.js';
|
|
28
28
|
import { AlarmIcon, MagnifyingGlassIcon as SearchIcon } from '@phosphor-icons/react';
|
|
29
29
|
import { useState } from 'react';
|
|
30
|
-
import { CLOCK_TONE, lastRunLabel } from '../../internal/lib/trigger-clock.js';
|
|
30
|
+
import { CLOCK_TONE, lastRunLabel, nextRunIn } from '../../internal/lib/trigger-clock.js';
|
|
31
31
|
import { ReminderActions, ReminderFacts, isFailedReminder, sortReminders, useReminderControls, } from '../header/reminder-parts.js';
|
|
32
32
|
const STATUS_LABEL_KEY = {
|
|
33
33
|
all: 'statusAll',
|
|
@@ -51,19 +51,6 @@ function ReminderTile({ reminder }) {
|
|
|
51
51
|
: CLOCK_TONE.ok;
|
|
52
52
|
return (_jsxs("span", { "aria-hidden": true, className: "relative size-5 shrink-0", children: [_jsx("span", { className: "text-muted-foreground absolute inset-0 flex items-center justify-center [&_svg]:size-5", children: _jsx(AlarmIcon, {}) }), _jsx("span", { className: cn('absolute inset-0 flex items-center justify-center [&_svg]:size-5', tone.reflection), style: { maskImage: REFLECTION_MASK, WebkitMaskImage: REFLECTION_MASK }, children: _jsx(AlarmIcon, {}) }), _jsx("span", { className: "absolute -right-0.75 -bottom-0.75 flex size-3 items-center justify-center rounded-full bg-(--row-surface)", children: _jsx("span", { className: cn('size-1.5 rounded-full', tone.dot) }) })] }));
|
|
53
53
|
}
|
|
54
|
-
/** "in 25m", "in 8h", "in 3d": the next run in the last-run label's narrow style. */
|
|
55
|
-
function nextRunIn(iso, locale, now) {
|
|
56
|
-
const at = iso ? Date.parse(iso) : Number.NaN;
|
|
57
|
-
if (!Number.isFinite(at))
|
|
58
|
-
return '—';
|
|
59
|
-
const rtf = new Intl.RelativeTimeFormat(locale, { style: 'narrow', numeric: 'auto' });
|
|
60
|
-
const min = Math.max(0, Math.round((at - now) / 60_000));
|
|
61
|
-
if (min < 60)
|
|
62
|
-
return rtf.format(min, 'minute');
|
|
63
|
-
if (min < 24 * 60)
|
|
64
|
-
return rtf.format(Math.round(min / 60), 'hour');
|
|
65
|
-
return rtf.format(Math.round(min / (24 * 60)), 'day');
|
|
66
|
-
}
|
|
67
54
|
function ReminderListRow({ reminder, schedule, now, open, onToggle, controls, manageHref, }) {
|
|
68
55
|
const t = useTranslations('reminders');
|
|
69
56
|
const tTriggers = useTranslations('hardcodedUi.i18nComplete');
|
|
@@ -76,7 +63,9 @@ function ReminderListRow({ reminder, schedule, now, open, onToggle, controls, ma
|
|
|
76
63
|
// always matches: rest = card, hover = muted at 60% over card, open = muted.
|
|
77
64
|
'bg-(--row-surface) [--row-surface:var(--card)] transition-[background-color] duration-(--duration-fast)', open
|
|
78
65
|
? '[--row-surface:var(--muted)]'
|
|
79
|
-
: 'hover:[--row-surface:color-mix(in_oklab,var(--muted)_60%,var(--card))] has-[button:focus-visible]:[--row-surface:color-mix(in_oklab,var(--muted)_60%,var(--card))]'), children: [_jsxs("button", { type: "button", onClick: onToggle, "aria-expanded": open, "data-testid": "session-reminder-panel-row", className: "flex h-14 w-full items-center gap-3 rounded-md px-3 text-left outline-none", children: [_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", children: _jsx(ReminderTile, { reminder: reminder }) }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "text-foreground truncate text-sm leading-tight font-medium", children: reminderTitle(reminder) }), _jsx("span", { className: "text-muted-foreground truncate text-xs leading-tight", children: schedule })] }), _jsxs("span", { className: "flex shrink-0 flex-col items-end text-xs tabular-nums", children: [_jsx("span", { className: cn('whitespace-nowrap', active ? 'text-foreground' : 'text-muted-foreground'), children: active
|
|
66
|
+
: 'hover:[--row-surface:color-mix(in_oklab,var(--muted)_60%,var(--card))] has-[button:focus-visible]:[--row-surface:color-mix(in_oklab,var(--muted)_60%,var(--card))]'), children: [_jsxs("button", { type: "button", onClick: onToggle, "aria-expanded": open, "data-testid": "session-reminder-panel-row", className: "flex h-14 w-full items-center gap-3 rounded-md px-3 text-left outline-none", children: [_jsx("span", { className: "flex size-5 shrink-0 items-center justify-center", children: _jsx(ReminderTile, { reminder: reminder }) }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "text-foreground truncate text-sm leading-tight font-medium", children: reminderTitle(reminder) }), _jsx("span", { className: "text-muted-foreground truncate text-xs leading-tight", children: schedule })] }), _jsxs("span", { className: "flex shrink-0 flex-col items-end text-xs tabular-nums", children: [_jsx("span", { className: cn('whitespace-nowrap', active ? 'text-foreground' : 'text-muted-foreground'), children: active
|
|
67
|
+
? nextRunIn(reminder.next_fire_at, new Intl.RelativeTimeFormat(locale, { style: 'narrow', numeric: 'auto' }), now)
|
|
68
|
+
: t('pausedLabel') }), _jsx("span", { className: "text-muted-foreground whitespace-nowrap", children: lastRunLabel(asTrigger, tTriggers, locale, now) })] })] }), open ? (
|
|
80
69
|
// Starts under the name: the row's px-3, the 20px clock slot, gap-3.
|
|
81
70
|
_jsxs("div", { className: "space-y-3 pr-3 pb-3 pl-11", children: [reminder.name ? (_jsx("p", { className: "text-muted-foreground text-xs text-pretty whitespace-pre-line", children: reminder.prompt })) : null, _jsx(ReminderFacts, { reminder: reminder, now: now }), _jsx(ReminderActions, { reminder: reminder, controls: controls, manageHref: manageHref, className: "-ml-1.5" })] })) : null] }));
|
|
82
71
|
}
|
|
@@ -25,7 +25,7 @@ export function useSessionPanelView({ sessionId, projectId, projectSessionId, tr
|
|
|
25
25
|
//
|
|
26
26
|
// A transient sub-session has no Kortix session row for `/turn` to answer
|
|
27
27
|
// about, so it keeps the stream slot — repaired on every stream (re)connect
|
|
28
|
-
// by the status-snapshot reconciler in `use-
|
|
28
|
+
// by the status-snapshot reconciler in `use-runtime-events`.
|
|
29
29
|
const sessionStatus = useSessionStateStore((s) => s.sessionStatus[sessionId]);
|
|
30
30
|
const working = useSessionWorking(projectId ?? '', projectSessionId ?? '', {
|
|
31
31
|
enabled: !!projectId && !!projectSessionId,
|
|
@@ -77,7 +77,7 @@ export function useSessionPanelSessionSync({ sessionId, projectSessionId, transi
|
|
|
77
77
|
// `continuity` names the Kortix project session behind this layout id and
|
|
78
78
|
// whether this mount is the transient boot shell. The store uses it for one
|
|
79
79
|
// thing: the boot→ready crossfade renames the layout from the Kortix session
|
|
80
|
-
// id (shell) to the
|
|
80
|
+
// id (shell) to the runtime session id (real chat) for the SAME session — that
|
|
81
81
|
// handoff must carry an open panel across instead of slamming it shut.
|
|
82
82
|
useEffect(() => {
|
|
83
83
|
if (!isVisibleLayout)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
* Safety net for the session subtree: during sandbox provisioning the
|
|
4
|
+
* Safety net for the session subtree: during sandbox provisioning the
|
|
5
5
|
* runtime URL isn't pinned yet, and any stray `getClient()` call throws
|
|
6
6
|
* "Server URL not ready — sandbox is still loading". Without this, such a throw
|
|
7
7
|
* escalates to the Next route boundary (app/error.tsx) and the user sees a hard
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
* must never be replaced by a full-page loading logo. Every other error is
|
|
14
14
|
* rethrown so it bubbles to the outer boundary exactly as before.
|
|
15
15
|
*
|
|
16
|
-
* The gate fix in `use-
|
|
16
|
+
* The gate fix in `use-runtime-sessions/keys.ts` + the guard in `session-chat`
|
|
17
17
|
* should prevent these throws in the first place; this is belt-and-suspenders so
|
|
18
18
|
* a missed caller degrades to "loading", never to a crash.
|
|
19
19
|
*/
|
|
@@ -68,3 +68,50 @@ export interface StoppedSandboxCacheState {
|
|
|
68
68
|
* returns `false`: the terminal card stays exactly as it was, byte for byte.
|
|
69
69
|
*/
|
|
70
70
|
export declare function canRenderCachedTranscriptWhileSandboxDown(state: StoppedSandboxCacheState): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Which surface the session route paints, decided in ONE place.
|
|
73
|
+
*
|
|
74
|
+
* The route used to decide this with an ordered `if` chain over a dozen
|
|
75
|
+
* booleans, and the order was the only transition table. This function is
|
|
76
|
+
* that table. Every input is a fact the route already derives; the output
|
|
77
|
+
* names a full-screen surface (`screen`), a terminal notice in the composer's
|
|
78
|
+
* slot over a readable transcript (`notice`), or neither (the chat).
|
|
79
|
+
*
|
|
80
|
+
* Precedence, first match wins:
|
|
81
|
+
* 1. switch-loading · 2. billing-gated · 3. missing (404) · 4. archived (the
|
|
82
|
+
* session was deleted and its computer removed) · 5. repository-disconnected
|
|
83
|
+
* · 6. waking (the wake ladder still has rungs) or start-failure · 7. dormant
|
|
84
|
+
* (stopped, no sandbox row) · 8. runtime-lost · 9. stopped (`fatal`): the
|
|
85
|
+
* auto-resume boot loader or the Restart card · 10. chat.
|
|
86
|
+
*
|
|
87
|
+
* A readable transcript turns 5, 6 (failure), 7 (legacy) and 8 into notices,
|
|
88
|
+
* and a notice blocks the lower terminal checks (7, 8), as before. Step 9
|
|
89
|
+
* still replaces the chat when no cached transcript may render.
|
|
90
|
+
*/
|
|
91
|
+
export type SessionRouteScreen = 'switch-loading' | 'billing-gated' | 'missing' | 'archived' | 'repository-disconnected' | 'waking' | 'start-failure' | 'legacy-dormant' | 'stopped-dormant' | 'runtime-lost' | 'auto-resuming' | 'stopped';
|
|
92
|
+
export type SessionRouteNotice = 'archived' | 'repository-disconnected' | 'start-failure' | 'legacy-dormant' | 'runtime-lost';
|
|
93
|
+
export interface SessionRouteSurfaceInput {
|
|
94
|
+
sessionSwitchLoading: boolean;
|
|
95
|
+
gated: boolean;
|
|
96
|
+
sessionMissing: boolean;
|
|
97
|
+
/** `sandbox.status === 'archived'`. */
|
|
98
|
+
sandboxArchived: boolean;
|
|
99
|
+
repositoryDisconnected: boolean;
|
|
100
|
+
wakeLadderHolding: boolean;
|
|
101
|
+
/** `recoverableFailure !== null`. */
|
|
102
|
+
hasRecoverableFailure: boolean;
|
|
103
|
+
dormantWithoutRuntime: boolean;
|
|
104
|
+
legacyMigrated: boolean;
|
|
105
|
+
runtimeIdentityUnavailable: boolean;
|
|
106
|
+
previousRepositoryHistoryAvailable: boolean;
|
|
107
|
+
/** `sandbox.status` is `stopped|error` and `shouldPaintFatalCard` says paint. */
|
|
108
|
+
fatal: boolean;
|
|
109
|
+
autoResuming: boolean;
|
|
110
|
+
hasTranscript: boolean;
|
|
111
|
+
showCachedTranscriptWhileDown: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface SessionRouteSurface {
|
|
114
|
+
screen: SessionRouteScreen | null;
|
|
115
|
+
notice: SessionRouteNotice | null;
|
|
116
|
+
}
|
|
117
|
+
export declare function resolveSessionRouteSurface(input: SessionRouteSurfaceInput): SessionRouteSurface;
|
|
@@ -60,3 +60,59 @@ export function canRenderCachedTranscriptWhileSandboxDown(state) {
|
|
|
60
60
|
const sandboxIsDown = state.sandboxStatus === 'stopped' || state.sandboxStatus === 'error';
|
|
61
61
|
return sandboxIsDown && state.hasCachedContent;
|
|
62
62
|
}
|
|
63
|
+
export function resolveSessionRouteSurface(input) {
|
|
64
|
+
const screen = (kind) => ({ screen: kind, notice: null });
|
|
65
|
+
if (input.sessionSwitchLoading)
|
|
66
|
+
return screen('switch-loading');
|
|
67
|
+
if (input.gated)
|
|
68
|
+
return screen('billing-gated');
|
|
69
|
+
if (input.sessionMissing)
|
|
70
|
+
return screen('missing');
|
|
71
|
+
let notice = null;
|
|
72
|
+
const screenOrNotice = (kind) => {
|
|
73
|
+
if (!input.hasTranscript)
|
|
74
|
+
return screen(kind);
|
|
75
|
+
notice = kind;
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
if (input.sandboxArchived) {
|
|
79
|
+
const surface = screenOrNotice('archived');
|
|
80
|
+
if (surface)
|
|
81
|
+
return surface;
|
|
82
|
+
}
|
|
83
|
+
if (!notice && input.repositoryDisconnected) {
|
|
84
|
+
const surface = screenOrNotice('repository-disconnected');
|
|
85
|
+
if (surface)
|
|
86
|
+
return surface;
|
|
87
|
+
}
|
|
88
|
+
if (input.wakeLadderHolding) {
|
|
89
|
+
if (!input.showCachedTranscriptWhileDown)
|
|
90
|
+
return screen('waking');
|
|
91
|
+
}
|
|
92
|
+
else if (input.hasRecoverableFailure && !notice) {
|
|
93
|
+
const surface = screenOrNotice('start-failure');
|
|
94
|
+
if (surface)
|
|
95
|
+
return surface;
|
|
96
|
+
}
|
|
97
|
+
if (!notice && input.dormantWithoutRuntime) {
|
|
98
|
+
if (input.legacyMigrated) {
|
|
99
|
+
const surface = screenOrNotice('legacy-dormant');
|
|
100
|
+
if (surface)
|
|
101
|
+
return surface;
|
|
102
|
+
}
|
|
103
|
+
else if (!input.hasTranscript) {
|
|
104
|
+
// A deliberate stop with a readable transcript is not a dead end: the
|
|
105
|
+
// conversation and a live composer stay (a send wakes the box).
|
|
106
|
+
return screen('stopped-dormant');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (!notice && input.runtimeIdentityUnavailable && !input.previousRepositoryHistoryAvailable) {
|
|
110
|
+
const surface = screenOrNotice('runtime-lost');
|
|
111
|
+
if (surface)
|
|
112
|
+
return surface;
|
|
113
|
+
}
|
|
114
|
+
if (input.fatal && !input.showCachedTranscriptWhileDown) {
|
|
115
|
+
return screen(input.autoResuming ? 'auto-resuming' : 'stopped');
|
|
116
|
+
}
|
|
117
|
+
return { screen: null, notice };
|
|
118
|
+
}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* `isActionPanelOpen` / `isSidePanelOpen` / `panelMode`: those made the plan
|
|
6
6
|
* hop surfaces on every panel toggle, and they also re-rendered the whole
|
|
7
7
|
* transcript each time one of them changed.
|
|
8
|
-
* @deprecated Renders an OpenCode-only tool or todo list
|
|
8
|
+
* @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
|
|
9
9
|
*/
|
|
10
10
|
export declare function usePlanInChat(): boolean;
|
|
@@ -23,7 +23,7 @@ import { planBelongsToChat } from '../turn/plan-anchor.js';
|
|
|
23
23
|
* `isActionPanelOpen` / `isSidePanelOpen` / `panelMode`: those made the plan
|
|
24
24
|
* hop surfaces on every panel toggle, and they also re-rendered the whole
|
|
25
25
|
* transcript each time one of them changed.
|
|
26
|
-
* @deprecated Renders an OpenCode-only tool or todo list
|
|
26
|
+
* @deprecated Renders an OpenCode-only tool or todo list (pi has none). Only a transcript OpenCode wrote holds one; this keeps it readable. No new code.
|
|
27
27
|
*/
|
|
28
28
|
export function usePlanInChat() {
|
|
29
29
|
return planBelongsToChat({ isMobile: useIsMobile() });
|
|
@@ -44,7 +44,7 @@ interface SessionChatProps {
|
|
|
44
44
|
* the not-found card — rather than its own "starting" loader.
|
|
45
45
|
*
|
|
46
46
|
* The project-session route crossfades the instant boot shell into this
|
|
47
|
-
* component over 300ms. It used to start that fade as soon as
|
|
47
|
+
* component over 300ms. It used to start that fade as soon as a runtime
|
|
48
48
|
* session id existed, which is earlier than this component has anything to
|
|
49
49
|
* show: the fade landed on the compact `SessionStartingLoader` below, which
|
|
50
50
|
* then swapped to the transcript. Two handovers where the user asked for one.
|