@leitwerk-dev/ui 0.1.0
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/LICENSE +13 -0
- package/dist/assets/ChronicleMarkdown-BLgtHeEE.js +16 -0
- package/dist/assets/ChronicleMarkdown-D6hFzERy.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-KrXSGzHM.js +1 -0
- package/dist/assets/FutureLaunchDetailPage-VPMBtpYc.css +1 -0
- package/dist/assets/GenericLauncher-Cv38FByt.js +1 -0
- package/dist/assets/GenericLauncher-D_GMtsQ5.css +1 -0
- package/dist/assets/HomePage-Cd3lEtwZ.js +1 -0
- package/dist/assets/HomePage-DYh_QHXv.css +1 -0
- package/dist/assets/PageHeader-6PdvYODN.css +1 -0
- package/dist/assets/PageHeader-D6pP4hIh.js +1 -0
- package/dist/assets/ProcessActionsMenu-1QySGNy9.js +1 -0
- package/dist/assets/ProcessActionsMenu-BT2r9vO8.css +1 -0
- package/dist/assets/ProcessDetailPage-BLuc7sjV.js +12 -0
- package/dist/assets/ProcessDetailPage-CSrjzajF.css +1 -0
- package/dist/assets/ProcessFlowDiagram-BAh_M_rb.js +2 -0
- package/dist/assets/ProcessFlowDiagram-Cz8wNicU.css +1 -0
- package/dist/assets/ProcessesPage-BcM38HMs.css +1 -0
- package/dist/assets/ProcessesPage-DtPweRU-.js +1 -0
- package/dist/assets/ScheduleDateTimePicker-CQGvY-Rc.js +1 -0
- package/dist/assets/ScheduleDateTimePicker-CadXN9z7.css +1 -0
- package/dist/assets/SkillsPage-B30FAFia.css +1 -0
- package/dist/assets/SkillsPage-bXuv0kEE.js +2 -0
- package/dist/assets/WatchersPage-DNyUsU1y.js +1 -0
- package/dist/assets/WatchersPage-Dnfi1zUK.css +1 -0
- package/dist/assets/api-CqECFdii.js +1 -0
- package/dist/assets/browser-storage-LbKCyf_w.js +1 -0
- package/dist/assets/dist-B7WNbObw.js +2 -0
- package/dist/assets/index-66T4Gmbl.css +1 -0
- package/dist/assets/index-C8qCggeq.js +7 -0
- package/dist/assets/index-client-BqF3_t3P.js +2 -0
- package/dist/assets/mermaid-render.worker-DAVgiVRG.js +6393 -0
- package/dist/assets/retry-config.svelte-DFKCJtCe.js +1 -0
- package/dist/assets/router.svelte-COr45o9R.js +1 -0
- package/dist/fonts/OFL-Public-Sans.txt +115 -0
- package/dist/fonts/OFL-Spectral.txt +93 -0
- package/dist/fonts/README.md +38 -0
- package/dist/fonts/fonts.css +85 -0
- package/dist/fonts/public-sans-latin-cd00287f.woff2 +0 -0
- package/dist/fonts/public-sans-latin-ext-d025d4ba.woff2 +0 -0
- package/dist/fonts/spectral-latin-89d48951.woff2 +0 -0
- package/dist/fonts/spectral-latin-b7578f14.woff2 +0 -0
- package/dist/fonts/spectral-latin-c4e0a00d.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-260738f4.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-ab18ac17.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-f58c1db3.woff2 +0 -0
- package/dist/index.html +32 -0
- package/package.json +47 -0
- package/src/App.svelte +257 -0
- package/src/chronicle/components/ChronicleActionSection.svelte +1035 -0
- package/src/chronicle/components/ChronicleExpandButton.svelte +70 -0
- package/src/chronicle/components/ChronicleFlow.svelte +289 -0
- package/src/chronicle/components/ChronicleLeafOutcomePlaceholder.svelte +44 -0
- package/src/chronicle/components/ChronicleLeafOutcomeRendererHost.svelte +408 -0
- package/src/chronicle/components/ChronicleLeafOutcomeSection.svelte +253 -0
- package/src/chronicle/components/ChronicleLiveChip.svelte +96 -0
- package/src/chronicle/components/ChronicleLiveTail.svelte +376 -0
- package/src/chronicle/components/ChronicleMarkdown.svelte +168 -0
- package/src/chronicle/components/ChronicleOperatorInputSection.svelte +41 -0
- package/src/chronicle/components/ChronicleProcessErrorSection.svelte +131 -0
- package/src/chronicle/components/ChroniclePromptSection.svelte +54 -0
- package/src/chronicle/components/ChronicleQuestionRequest.svelte +167 -0
- package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +893 -0
- package/src/chronicle/components/ChronicleRecoverySection.svelte +338 -0
- package/src/chronicle/components/ChronicleScheduledActionSection.svelte +192 -0
- package/src/chronicle/components/ChronicleSectionHeader.svelte +135 -0
- package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +138 -0
- package/src/chronicle/components/ChronicleTerminalSummary.svelte +127 -0
- package/src/chronicle/components/ChronicleThinkingSection.svelte +191 -0
- package/src/chronicle/components/ChronicleThinkingText.svelte +46 -0
- package/src/chronicle/components/ChronicleToolCallItem.svelte +477 -0
- package/src/chronicle/components/ChronicleTurnCluster.svelte +325 -0
- package/src/chronicle/components/ChronicleTurnRail.svelte +584 -0
- package/src/chronicle/components/ChronicleUsageStats.svelte +107 -0
- package/src/chronicle/components/CompactActionComposer.svelte +417 -0
- package/src/chronicle/components/ModelProfileOptions.svelte +20 -0
- package/src/chronicle/components/ProviderOptionsEditor.svelte +171 -0
- package/src/chronicle/components/RecoveryModelControl.svelte +95 -0
- package/src/chronicle/lib/action-bindings.ts +90 -0
- package/src/chronicle/lib/action-model-display.ts +133 -0
- package/src/chronicle/lib/action-preview.ts +16 -0
- package/src/chronicle/lib/chronicle-projection.ts +1342 -0
- package/src/chronicle/lib/chronicle-selectable-items.ts +352 -0
- package/src/chronicle/lib/chronicle-view-model.ts +121 -0
- package/src/chronicle/lib/formatting.ts +18 -0
- package/src/chronicle/lib/leaf-outcome-loader.ts +214 -0
- package/src/chronicle/lib/leaf-outcome-runtime.ts +37 -0
- package/src/chronicle/lib/prompt-highlighting.ts +78 -0
- package/src/chronicle/lib/scroll-sync.ts +88 -0
- package/src/chronicle/lib/tool-call-summary.ts +64 -0
- package/src/components/BrowserUiExtensionIndicatorHost.svelte +34 -0
- package/src/components/ConversationTreeDiagram.svelte +393 -0
- package/src/components/FormFieldRenderer.svelte +359 -0
- package/src/components/GenericLauncher.svelte +1970 -0
- package/src/components/KeyboardShortcutsModal.svelte +52 -0
- package/src/components/ModalShell.svelte +105 -0
- package/src/components/PageHeader.svelte +146 -0
- package/src/components/ProcessActionsMenu.svelte +514 -0
- package/src/components/ProcessInfoOverlay.svelte +1229 -0
- package/src/components/ScheduleDateTimePicker.svelte +155 -0
- package/src/components/SkillSelector.svelte +45 -0
- package/src/components/ToastContainer.svelte +192 -0
- package/src/components/launcher-form-copy.ts +172 -0
- package/src/components/launcher-model-config.ts +263 -0
- package/src/components/launcher-schedule.ts +127 -0
- package/src/extension-ui-dev-server.ts +98 -0
- package/src/lib/api.ts +970 -0
- package/src/lib/beautiful-mermaid-elk-instance.ts +54 -0
- package/src/lib/browser-storage.ts +11 -0
- package/src/lib/cost-estimates.ts +41 -0
- package/src/lib/elk-bundled-worker.ts +41 -0
- package/src/lib/flow-layout.ts +326 -0
- package/src/lib/format.ts +96 -0
- package/src/lib/future-executions-logic.ts +12 -0
- package/src/lib/future-launch-detail.ts +145 -0
- package/src/lib/instance-tree-layout.ts +158 -0
- package/src/lib/keyboard-shortcuts-help.ts +20 -0
- package/src/lib/keyboard.ts +40 -0
- package/src/lib/launcher-recent-values.ts +68 -0
- package/src/lib/markdown.ts +94 -0
- package/src/lib/mermaid-render.worker.ts +36 -0
- package/src/lib/pi-stream.ts +3 -0
- package/src/lib/primary-path-detail.ts +337 -0
- package/src/lib/primary-path-replay.ts +27 -0
- package/src/lib/process-browser.ts +179 -0
- package/src/lib/process-initial-prompt.ts +7 -0
- package/src/lib/process-launch-notices.svelte.ts +25 -0
- package/src/lib/process-row-view.ts +60 -0
- package/src/lib/process-terminal-display.ts +17 -0
- package/src/lib/process-toast-focus.svelte.ts +18 -0
- package/src/lib/processes-logic.ts +2 -0
- package/src/lib/processes.svelte.ts +334 -0
- package/src/lib/request-guard.ts +20 -0
- package/src/lib/retry-config.svelte.ts +19 -0
- package/src/lib/rich-markdown-elements.ts +173 -0
- package/src/lib/router-logic.ts +190 -0
- package/src/lib/router.svelte.ts +56 -0
- package/src/lib/runtime-config.ts +96 -0
- package/src/lib/test-fixtures.ts +13 -0
- package/src/lib/toasts.svelte.ts +104 -0
- package/src/lib/tool-call-rendering.ts +66 -0
- package/src/lib/ui-extensions.svelte.ts +381 -0
- package/src/lib/usage-snapshot.ts +9 -0
- package/src/lib/ws-classifier.ts +80 -0
- package/src/lib/ws.svelte.ts +281 -0
- package/src/main.ts +8 -0
- package/src/pages/FutureLaunchDetailPage.svelte +479 -0
- package/src/pages/HomePage.svelte +306 -0
- package/src/pages/ProcessCard.svelte +99 -0
- package/src/pages/ProcessDetailPage.svelte +599 -0
- package/src/pages/ProcessFlowDiagram.svelte +696 -0
- package/src/pages/ProcessGallery.svelte +252 -0
- package/src/pages/ProcessesPage.svelte +994 -0
- package/src/pages/SkillsPage.svelte +665 -0
- package/src/pages/WatchersPage.svelte +330 -0
- package/src/pages/process-detail/OverlayFrame.svelte +58 -0
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +460 -0
- package/src/pages/process-detail/ProcessDetailHeader.svelte +167 -0
- package/src/pages/process-detail/process-detail-action-drafts.svelte.ts +211 -0
- package/src/pages/process-detail/process-detail-actions.svelte.ts +548 -0
- package/src/pages/process-detail/process-detail-chronicle-dom.ts +102 -0
- package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +711 -0
- package/src/pages/process-detail/process-detail-mutations.svelte.ts +91 -0
- package/src/pages/process-detail/process-detail-view-model.ts +149 -0
- package/src/shell/AppShell.svelte +249 -0
- package/src/shell/RouteLoadBoundary.svelte +43 -0
- package/src/shell/Sidebar.svelte +1358 -0
- package/src/shell/test-fixtures/RouteLoadTestComponent.svelte +5 -0
- package/src/vite-env.d.ts +2 -0
- package/src/vite-server-config.ts +27 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import GenericLauncher from "../components/GenericLauncher.svelte";
|
|
3
|
+
import PageHeader from "../components/PageHeader.svelte";
|
|
4
|
+
import {
|
|
5
|
+
ApiResponseError,
|
|
6
|
+
deleteFutureExecution,
|
|
7
|
+
type FutureLaunchSummary,
|
|
8
|
+
fetchFutureExecution,
|
|
9
|
+
fetchLaunchers,
|
|
10
|
+
type UiLauncherSummary,
|
|
11
|
+
} from "../lib/api.js";
|
|
12
|
+
import { formatLocalDateTime24Hour, formatUtcDateTime24Hour } from "../lib/format.js";
|
|
13
|
+
import { buildFutureLaunchDetailSections } from "../lib/future-launch-detail.js";
|
|
14
|
+
import { loadProcessesList, upsertFutureExecution } from "../lib/processes.svelte";
|
|
15
|
+
import {
|
|
16
|
+
buildFutureLaunchPath,
|
|
17
|
+
buildHomePath,
|
|
18
|
+
buildProcessesPath,
|
|
19
|
+
buildProcessPath,
|
|
20
|
+
navigate,
|
|
21
|
+
} from "../lib/router.svelte";
|
|
22
|
+
|
|
23
|
+
interface Props {
|
|
24
|
+
futureExecutionId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let { futureExecutionId }: Props = $props();
|
|
28
|
+
|
|
29
|
+
let launchers = $state<UiLauncherSummary[]>([]);
|
|
30
|
+
let launchersLoading = $state(false);
|
|
31
|
+
let launchersError = $state<string | null>(null);
|
|
32
|
+
let editMode = $state(false);
|
|
33
|
+
let cancelConfirmOpen = $state(false);
|
|
34
|
+
let cancelBusy = $state(false);
|
|
35
|
+
let cancelError = $state<string | null>(null);
|
|
36
|
+
let loadedFutureLaunch = $state<FutureLaunchSummary | null>(null);
|
|
37
|
+
let futureLaunchDetailLoading = $state(false);
|
|
38
|
+
let futureLaunchDetailError = $state<string | null>(null);
|
|
39
|
+
let futureLaunchNotFound = $state(false);
|
|
40
|
+
let observedFutureExecutionId = $state<string | null>(null);
|
|
41
|
+
let launchersLoadToken = 0;
|
|
42
|
+
let futureLaunchDetailLoadToken = 0;
|
|
43
|
+
|
|
44
|
+
const homePath = buildHomePath();
|
|
45
|
+
const processesPath = buildProcessesPath();
|
|
46
|
+
const futureLaunch = $derived(
|
|
47
|
+
loadedFutureLaunch?.id === futureExecutionId ? loadedFutureLaunch : null,
|
|
48
|
+
);
|
|
49
|
+
const launcher = $derived(
|
|
50
|
+
futureLaunch ? (launchers.find((item) => item.id === futureLaunch.launcherId) ?? null) : null,
|
|
51
|
+
);
|
|
52
|
+
const detailSections = $derived(
|
|
53
|
+
futureLaunch ? buildFutureLaunchDetailSections(futureLaunch, launcher) : [],
|
|
54
|
+
);
|
|
55
|
+
const initialSchedule = $derived(
|
|
56
|
+
futureLaunch
|
|
57
|
+
? {
|
|
58
|
+
mode: futureLaunch.scheduleKind === "cron" ? "cron" : "once",
|
|
59
|
+
...(futureLaunch.scheduleKind === "once" ? { runAt: futureLaunch.nextRunAt } : {}),
|
|
60
|
+
...(futureLaunch.scheduleKind === "cron" && futureLaunch.cronExpression
|
|
61
|
+
? { cronExpression: futureLaunch.cronExpression }
|
|
62
|
+
: {}),
|
|
63
|
+
}
|
|
64
|
+
: null,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
$effect(() => {
|
|
68
|
+
if (observedFutureExecutionId === futureExecutionId) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
observedFutureExecutionId = futureExecutionId;
|
|
72
|
+
editMode = false;
|
|
73
|
+
cancelConfirmOpen = false;
|
|
74
|
+
cancelError = null;
|
|
75
|
+
loadedFutureLaunch = null;
|
|
76
|
+
futureLaunchDetailLoading = false;
|
|
77
|
+
futureLaunchDetailError = null;
|
|
78
|
+
futureLaunchNotFound = false;
|
|
79
|
+
futureLaunchDetailLoadToken += 1;
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
$effect(() => {
|
|
83
|
+
void loadLaunchers();
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
$effect(() => {
|
|
87
|
+
futureExecutionId;
|
|
88
|
+
void loadFutureLaunchDetail();
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
async function loadFutureLaunchDetail() {
|
|
92
|
+
const requestedId = futureExecutionId;
|
|
93
|
+
const token = ++futureLaunchDetailLoadToken;
|
|
94
|
+
futureLaunchDetailLoading = true;
|
|
95
|
+
futureLaunchDetailError = null;
|
|
96
|
+
futureLaunchNotFound = false;
|
|
97
|
+
try {
|
|
98
|
+
const result = await fetchFutureExecution(requestedId);
|
|
99
|
+
if (token !== futureLaunchDetailLoadToken || futureExecutionId !== requestedId) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (result.kind !== "launch" || result.id !== requestedId) {
|
|
103
|
+
futureLaunchDetailError = "The scheduled launch response did not match this page.";
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
loadedFutureLaunch = result;
|
|
107
|
+
} catch (error) {
|
|
108
|
+
if (token !== futureLaunchDetailLoadToken || futureExecutionId !== requestedId) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (error instanceof ApiResponseError && error.status === 404) {
|
|
112
|
+
futureLaunchNotFound = true;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
futureLaunchDetailError =
|
|
116
|
+
error instanceof Error ? error.message : "Couldn't load scheduled launch details";
|
|
117
|
+
} finally {
|
|
118
|
+
if (token === futureLaunchDetailLoadToken) {
|
|
119
|
+
futureLaunchDetailLoading = false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function retryFutureLaunchDetail() {
|
|
125
|
+
void loadFutureLaunchDetail();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async function loadLaunchers() {
|
|
129
|
+
const token = ++launchersLoadToken;
|
|
130
|
+
launchersLoading = true;
|
|
131
|
+
launchersError = null;
|
|
132
|
+
try {
|
|
133
|
+
const result = await fetchLaunchers();
|
|
134
|
+
if (token !== launchersLoadToken) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
launchers = result;
|
|
138
|
+
} catch (error) {
|
|
139
|
+
if (token !== launchersLoadToken) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
launchersError = error instanceof Error ? error.message : "Couldn't load process type details";
|
|
143
|
+
} finally {
|
|
144
|
+
if (token === launchersLoadToken) {
|
|
145
|
+
launchersLoading = false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function handleScheduled(updated: FutureLaunchSummary) {
|
|
151
|
+
upsertFutureExecution(updated);
|
|
152
|
+
loadedFutureLaunch = updated;
|
|
153
|
+
editMode = false;
|
|
154
|
+
cancelConfirmOpen = false;
|
|
155
|
+
void loadProcessesList();
|
|
156
|
+
navigate(buildFutureLaunchPath(updated.id), { replace: true });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function handleLaunched(instanceId: string) {
|
|
160
|
+
void loadProcessesList();
|
|
161
|
+
navigate(buildProcessPath(instanceId));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
async function confirmCancel() {
|
|
165
|
+
if (!futureLaunch) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
cancelBusy = true;
|
|
169
|
+
cancelError = null;
|
|
170
|
+
try {
|
|
171
|
+
await deleteFutureExecution(futureLaunch.id);
|
|
172
|
+
await loadProcessesList();
|
|
173
|
+
navigate(homePath);
|
|
174
|
+
} catch (error) {
|
|
175
|
+
cancelError = error instanceof Error ? error.message : "Couldn't cancel this scheduled launch";
|
|
176
|
+
} finally {
|
|
177
|
+
cancelBusy = false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<div class="future-launch-page" data-page="future-launch-detail">
|
|
183
|
+
{#if futureLaunch && editMode && launcher && initialSchedule}
|
|
184
|
+
<section class="future-launch-editor" data-section="future-launch-edit">
|
|
185
|
+
<PageHeader
|
|
186
|
+
title={futureLaunch.title}
|
|
187
|
+
subtitle="Update the saved launch details, then save to return to the schedule summary."
|
|
188
|
+
/>
|
|
189
|
+
<GenericLauncher
|
|
190
|
+
{launcher}
|
|
191
|
+
initialTitle={futureLaunch.launchTitle}
|
|
192
|
+
initialValues={futureLaunch.launcherInput}
|
|
193
|
+
initialSkillIds={futureLaunch.skillIds}
|
|
194
|
+
initialModelConfig={futureLaunch.modelConfig}
|
|
195
|
+
initialSchedule={initialSchedule}
|
|
196
|
+
editingFutureLaunch={futureLaunch}
|
|
197
|
+
onLaunched={handleLaunched}
|
|
198
|
+
onScheduled={handleScheduled}
|
|
199
|
+
/>
|
|
200
|
+
</section>
|
|
201
|
+
{:else if futureLaunch}
|
|
202
|
+
<section class="future-launch-detail" data-section="future-launch-detail">
|
|
203
|
+
<PageHeader
|
|
204
|
+
title={futureLaunch.title}
|
|
205
|
+
subtitle={`Launches ${formatLocalDateTime24Hour(futureLaunch.nextRunAt)} · ${formatUtcDateTime24Hour(futureLaunch.nextRunAt)}`}
|
|
206
|
+
>
|
|
207
|
+
{#snippet actions()}
|
|
208
|
+
<button
|
|
209
|
+
type="button"
|
|
210
|
+
class="secondary-button"
|
|
211
|
+
data-pressable="true"
|
|
212
|
+
disabled={!launcher}
|
|
213
|
+
title={launcher ? undefined : "Editing requires this process type to be available"}
|
|
214
|
+
onclick={() => (editMode = true)}
|
|
215
|
+
>
|
|
216
|
+
Edit
|
|
217
|
+
</button>
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
class="danger-button"
|
|
221
|
+
data-pressable="true"
|
|
222
|
+
disabled={cancelBusy}
|
|
223
|
+
onclick={() => (cancelConfirmOpen = true)}
|
|
224
|
+
>
|
|
225
|
+
Cancel scheduled launch
|
|
226
|
+
</button>
|
|
227
|
+
{/snippet}
|
|
228
|
+
</PageHeader>
|
|
229
|
+
|
|
230
|
+
{#if futureLaunch.status === "blocked" && futureLaunch.blockedReason}
|
|
231
|
+
<div class="detail-warning" role="alert" data-section="model-policy-block">
|
|
232
|
+
<strong>Blocked</strong> — {futureLaunch.blockedReason.summary}
|
|
233
|
+
<p>Edit the model selection or restore model availability.</p>
|
|
234
|
+
</div>
|
|
235
|
+
{/if}
|
|
236
|
+
|
|
237
|
+
{#if launchersError}
|
|
238
|
+
<p class="detail-warning" role="status">Showing stored values. {launchersError}</p>
|
|
239
|
+
{:else if launchersLoading && !launcher}
|
|
240
|
+
<p class="detail-warning" role="status">Loading field labels…</p>
|
|
241
|
+
{/if}
|
|
242
|
+
|
|
243
|
+
{#if cancelConfirmOpen}
|
|
244
|
+
<div class="cancel-confirm" data-section="cancel-confirmation" role="alertdialog" aria-modal="false" aria-labelledby="cancel-title">
|
|
245
|
+
<div>
|
|
246
|
+
<h2 id="cancel-title">Cancel this scheduled launch?</h2>
|
|
247
|
+
<p>This launch will be removed and will not run at the scheduled time.</p>
|
|
248
|
+
{#if cancelError}
|
|
249
|
+
<p class="cancel-error" role="alert">{cancelError}</p>
|
|
250
|
+
{/if}
|
|
251
|
+
</div>
|
|
252
|
+
<div class="confirm-actions">
|
|
253
|
+
<button type="button" class="secondary-button" data-pressable="true" disabled={cancelBusy} onclick={() => (cancelConfirmOpen = false)}>
|
|
254
|
+
Keep scheduled
|
|
255
|
+
</button>
|
|
256
|
+
<button type="button" class="danger-button" data-pressable="true" disabled={cancelBusy} onclick={() => void confirmCancel()}>
|
|
257
|
+
{cancelBusy ? "Canceling…" : "Cancel launch"}
|
|
258
|
+
</button>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
{/if}
|
|
262
|
+
|
|
263
|
+
<div class="detail-sections">
|
|
264
|
+
{#each detailSections as section (section.id)}
|
|
265
|
+
<section class="detail-section" data-detail-section={section.id}>
|
|
266
|
+
<h2>{section.title}</h2>
|
|
267
|
+
<div class="detail-list">
|
|
268
|
+
{#each section.items as item (`${section.id}:${item.label}`)}
|
|
269
|
+
<div class="detail-item">
|
|
270
|
+
<dt>{item.label}</dt>
|
|
271
|
+
<dd>{section.id === "schedule" && item.label === "Launches" ? formatLocalDateTime24Hour(item.value) : item.value}</dd>
|
|
272
|
+
</div>
|
|
273
|
+
{/each}
|
|
274
|
+
</div>
|
|
275
|
+
</section>
|
|
276
|
+
{/each}
|
|
277
|
+
</div>
|
|
278
|
+
</section>
|
|
279
|
+
{:else if futureLaunchNotFound}
|
|
280
|
+
<section class="future-launch-detail" data-section="future-launch-not-found">
|
|
281
|
+
<PageHeader
|
|
282
|
+
title="Scheduled launch no longer available"
|
|
283
|
+
subtitle="It may have already run or been canceled."
|
|
284
|
+
/>
|
|
285
|
+
<div class="missing-state" role="status">
|
|
286
|
+
<p>Check All processes for any process this schedule may have started.</p>
|
|
287
|
+
<button type="button" class="secondary-button" onclick={() => navigate(processesPath)}>
|
|
288
|
+
View all processes
|
|
289
|
+
</button>
|
|
290
|
+
</div>
|
|
291
|
+
</section>
|
|
292
|
+
{:else}
|
|
293
|
+
<section class="future-launch-detail loading" data-section="future-launch-missing">
|
|
294
|
+
<PageHeader title={futureLaunchDetailError ? "Couldn't load scheduled launch" : "Loading scheduled launch…"} />
|
|
295
|
+
{#if futureLaunchDetailError}
|
|
296
|
+
<div class="detail-load-error" role="status">
|
|
297
|
+
<p class="detail-warning">{futureLaunchDetailError}</p>
|
|
298
|
+
<button type="button" class="secondary-button" onclick={retryFutureLaunchDetail}>
|
|
299
|
+
Retry
|
|
300
|
+
</button>
|
|
301
|
+
</div>
|
|
302
|
+
{/if}
|
|
303
|
+
</section>
|
|
304
|
+
{/if}
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<style>
|
|
308
|
+
.future-launch-page {
|
|
309
|
+
width: 100%;
|
|
310
|
+
height: 100%;
|
|
311
|
+
min-height: 0;
|
|
312
|
+
overflow-y: auto;
|
|
313
|
+
padding: var(--space-2xs) 0 var(--space-xl);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.future-launch-detail,
|
|
317
|
+
.future-launch-editor {
|
|
318
|
+
display: grid;
|
|
319
|
+
gap: var(--space-lg);
|
|
320
|
+
max-width: 980px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.detail-warning,
|
|
324
|
+
.cancel-confirm p {
|
|
325
|
+
margin: 0;
|
|
326
|
+
font-size: var(--type-body);
|
|
327
|
+
line-height: 1.6;
|
|
328
|
+
color: var(--chronicle-text-muted);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.detail-load-error,
|
|
332
|
+
.missing-state {
|
|
333
|
+
display: flex;
|
|
334
|
+
gap: var(--space-sm);
|
|
335
|
+
align-items: center;
|
|
336
|
+
flex-wrap: wrap;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.missing-state p {
|
|
340
|
+
margin: 0;
|
|
341
|
+
max-width: 70ch;
|
|
342
|
+
font-size: var(--type-body);
|
|
343
|
+
line-height: 1.6;
|
|
344
|
+
color: var(--chronicle-text-muted);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.confirm-actions {
|
|
348
|
+
display: flex;
|
|
349
|
+
gap: var(--space-sm);
|
|
350
|
+
align-items: center;
|
|
351
|
+
flex-wrap: wrap;
|
|
352
|
+
justify-content: flex-end;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.secondary-button,
|
|
356
|
+
.danger-button {
|
|
357
|
+
min-height: 40px;
|
|
358
|
+
padding: 0 var(--space-md);
|
|
359
|
+
border-radius: 999px;
|
|
360
|
+
font-weight: 650;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.secondary-button {
|
|
365
|
+
border: 1px solid var(--chronicle-border-strong);
|
|
366
|
+
background: color-mix(in srgb, var(--chronicle-card-surface) 94%, white 6%);
|
|
367
|
+
color: var(--chronicle-text);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.danger-button {
|
|
371
|
+
border: 1px solid var(--chronicle-danger-border);
|
|
372
|
+
background: var(--chronicle-danger-surface-soft);
|
|
373
|
+
color: var(--chronicle-danger-text-strong);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.secondary-button:disabled,
|
|
377
|
+
.danger-button:disabled {
|
|
378
|
+
opacity: 0.62;
|
|
379
|
+
cursor: wait;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.detail-warning {
|
|
383
|
+
padding: var(--space-sm) var(--space-md);
|
|
384
|
+
border: 1px solid var(--chronicle-border);
|
|
385
|
+
border-radius: var(--radius-md);
|
|
386
|
+
background: var(--chronicle-panel-muted);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.cancel-confirm {
|
|
390
|
+
display: flex;
|
|
391
|
+
justify-content: space-between;
|
|
392
|
+
gap: var(--space-lg);
|
|
393
|
+
align-items: center;
|
|
394
|
+
padding: var(--space-md);
|
|
395
|
+
border: 1px solid var(--chronicle-danger-border);
|
|
396
|
+
border-radius: var(--radius-lg);
|
|
397
|
+
background: var(--chronicle-danger-surface);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.cancel-confirm h2 {
|
|
401
|
+
margin: 0 0 var(--space-2xs);
|
|
402
|
+
font-size: var(--type-body-lg);
|
|
403
|
+
line-height: 1.3;
|
|
404
|
+
color: var(--chronicle-danger-text-strong);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.cancel-error {
|
|
408
|
+
margin-top: var(--space-xs) !important;
|
|
409
|
+
color: var(--chronicle-danger-text-strong) !important;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.detail-sections {
|
|
413
|
+
display: grid;
|
|
414
|
+
gap: var(--space-md);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.detail-section {
|
|
418
|
+
display: grid;
|
|
419
|
+
gap: var(--space-sm);
|
|
420
|
+
padding: var(--space-lg);
|
|
421
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-border) 86%, white 14%);
|
|
422
|
+
border-radius: var(--radius-lg);
|
|
423
|
+
background: var(--chronicle-panel-surface);
|
|
424
|
+
box-shadow: var(--chronicle-shadow-soft);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.detail-section h2 {
|
|
428
|
+
margin: 0;
|
|
429
|
+
font-size: var(--type-title-sm);
|
|
430
|
+
line-height: 1.25;
|
|
431
|
+
color: var(--chronicle-text);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.detail-list {
|
|
435
|
+
display: grid;
|
|
436
|
+
gap: var(--space-xs);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.detail-item {
|
|
440
|
+
display: grid;
|
|
441
|
+
grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
|
|
442
|
+
gap: var(--space-md);
|
|
443
|
+
padding-top: var(--space-xs);
|
|
444
|
+
border-top: 1px solid color-mix(in srgb, var(--chronicle-border) 70%, transparent 30%);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.detail-item dt,
|
|
448
|
+
.detail-item dd {
|
|
449
|
+
margin: 0;
|
|
450
|
+
font-size: var(--type-body);
|
|
451
|
+
line-height: 1.55;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.detail-item dt {
|
|
455
|
+
font-weight: 650;
|
|
456
|
+
color: var(--chronicle-text-muted);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.detail-item dd {
|
|
460
|
+
white-space: pre-wrap;
|
|
461
|
+
word-break: break-word;
|
|
462
|
+
color: var(--chronicle-text);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
@media (max-width: 760px) {
|
|
466
|
+
.cancel-confirm {
|
|
467
|
+
display: grid;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.confirm-actions {
|
|
471
|
+
justify-content: flex-start;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.detail-item {
|
|
475
|
+
grid-template-columns: 1fr;
|
|
476
|
+
gap: var(--space-2xs);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
</style>
|