@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.
Files changed (170) hide show
  1. package/dist/LICENSE +13 -0
  2. package/dist/assets/ChronicleMarkdown-BLgtHeEE.js +16 -0
  3. package/dist/assets/ChronicleMarkdown-D6hFzERy.css +1 -0
  4. package/dist/assets/FutureLaunchDetailPage-KrXSGzHM.js +1 -0
  5. package/dist/assets/FutureLaunchDetailPage-VPMBtpYc.css +1 -0
  6. package/dist/assets/GenericLauncher-Cv38FByt.js +1 -0
  7. package/dist/assets/GenericLauncher-D_GMtsQ5.css +1 -0
  8. package/dist/assets/HomePage-Cd3lEtwZ.js +1 -0
  9. package/dist/assets/HomePage-DYh_QHXv.css +1 -0
  10. package/dist/assets/PageHeader-6PdvYODN.css +1 -0
  11. package/dist/assets/PageHeader-D6pP4hIh.js +1 -0
  12. package/dist/assets/ProcessActionsMenu-1QySGNy9.js +1 -0
  13. package/dist/assets/ProcessActionsMenu-BT2r9vO8.css +1 -0
  14. package/dist/assets/ProcessDetailPage-BLuc7sjV.js +12 -0
  15. package/dist/assets/ProcessDetailPage-CSrjzajF.css +1 -0
  16. package/dist/assets/ProcessFlowDiagram-BAh_M_rb.js +2 -0
  17. package/dist/assets/ProcessFlowDiagram-Cz8wNicU.css +1 -0
  18. package/dist/assets/ProcessesPage-BcM38HMs.css +1 -0
  19. package/dist/assets/ProcessesPage-DtPweRU-.js +1 -0
  20. package/dist/assets/ScheduleDateTimePicker-CQGvY-Rc.js +1 -0
  21. package/dist/assets/ScheduleDateTimePicker-CadXN9z7.css +1 -0
  22. package/dist/assets/SkillsPage-B30FAFia.css +1 -0
  23. package/dist/assets/SkillsPage-bXuv0kEE.js +2 -0
  24. package/dist/assets/WatchersPage-DNyUsU1y.js +1 -0
  25. package/dist/assets/WatchersPage-Dnfi1zUK.css +1 -0
  26. package/dist/assets/api-CqECFdii.js +1 -0
  27. package/dist/assets/browser-storage-LbKCyf_w.js +1 -0
  28. package/dist/assets/dist-B7WNbObw.js +2 -0
  29. package/dist/assets/index-66T4Gmbl.css +1 -0
  30. package/dist/assets/index-C8qCggeq.js +7 -0
  31. package/dist/assets/index-client-BqF3_t3P.js +2 -0
  32. package/dist/assets/mermaid-render.worker-DAVgiVRG.js +6393 -0
  33. package/dist/assets/retry-config.svelte-DFKCJtCe.js +1 -0
  34. package/dist/assets/router.svelte-COr45o9R.js +1 -0
  35. package/dist/fonts/OFL-Public-Sans.txt +115 -0
  36. package/dist/fonts/OFL-Spectral.txt +93 -0
  37. package/dist/fonts/README.md +38 -0
  38. package/dist/fonts/fonts.css +85 -0
  39. package/dist/fonts/public-sans-latin-cd00287f.woff2 +0 -0
  40. package/dist/fonts/public-sans-latin-ext-d025d4ba.woff2 +0 -0
  41. package/dist/fonts/spectral-latin-89d48951.woff2 +0 -0
  42. package/dist/fonts/spectral-latin-b7578f14.woff2 +0 -0
  43. package/dist/fonts/spectral-latin-c4e0a00d.woff2 +0 -0
  44. package/dist/fonts/spectral-latin-ext-260738f4.woff2 +0 -0
  45. package/dist/fonts/spectral-latin-ext-ab18ac17.woff2 +0 -0
  46. package/dist/fonts/spectral-latin-ext-f58c1db3.woff2 +0 -0
  47. package/dist/index.html +32 -0
  48. package/package.json +47 -0
  49. package/src/App.svelte +257 -0
  50. package/src/chronicle/components/ChronicleActionSection.svelte +1035 -0
  51. package/src/chronicle/components/ChronicleExpandButton.svelte +70 -0
  52. package/src/chronicle/components/ChronicleFlow.svelte +289 -0
  53. package/src/chronicle/components/ChronicleLeafOutcomePlaceholder.svelte +44 -0
  54. package/src/chronicle/components/ChronicleLeafOutcomeRendererHost.svelte +408 -0
  55. package/src/chronicle/components/ChronicleLeafOutcomeSection.svelte +253 -0
  56. package/src/chronicle/components/ChronicleLiveChip.svelte +96 -0
  57. package/src/chronicle/components/ChronicleLiveTail.svelte +376 -0
  58. package/src/chronicle/components/ChronicleMarkdown.svelte +168 -0
  59. package/src/chronicle/components/ChronicleOperatorInputSection.svelte +41 -0
  60. package/src/chronicle/components/ChronicleProcessErrorSection.svelte +131 -0
  61. package/src/chronicle/components/ChroniclePromptSection.svelte +54 -0
  62. package/src/chronicle/components/ChronicleQuestionRequest.svelte +167 -0
  63. package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +893 -0
  64. package/src/chronicle/components/ChronicleRecoverySection.svelte +338 -0
  65. package/src/chronicle/components/ChronicleScheduledActionSection.svelte +192 -0
  66. package/src/chronicle/components/ChronicleSectionHeader.svelte +135 -0
  67. package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +138 -0
  68. package/src/chronicle/components/ChronicleTerminalSummary.svelte +127 -0
  69. package/src/chronicle/components/ChronicleThinkingSection.svelte +191 -0
  70. package/src/chronicle/components/ChronicleThinkingText.svelte +46 -0
  71. package/src/chronicle/components/ChronicleToolCallItem.svelte +477 -0
  72. package/src/chronicle/components/ChronicleTurnCluster.svelte +325 -0
  73. package/src/chronicle/components/ChronicleTurnRail.svelte +584 -0
  74. package/src/chronicle/components/ChronicleUsageStats.svelte +107 -0
  75. package/src/chronicle/components/CompactActionComposer.svelte +417 -0
  76. package/src/chronicle/components/ModelProfileOptions.svelte +20 -0
  77. package/src/chronicle/components/ProviderOptionsEditor.svelte +171 -0
  78. package/src/chronicle/components/RecoveryModelControl.svelte +95 -0
  79. package/src/chronicle/lib/action-bindings.ts +90 -0
  80. package/src/chronicle/lib/action-model-display.ts +133 -0
  81. package/src/chronicle/lib/action-preview.ts +16 -0
  82. package/src/chronicle/lib/chronicle-projection.ts +1342 -0
  83. package/src/chronicle/lib/chronicle-selectable-items.ts +352 -0
  84. package/src/chronicle/lib/chronicle-view-model.ts +121 -0
  85. package/src/chronicle/lib/formatting.ts +18 -0
  86. package/src/chronicle/lib/leaf-outcome-loader.ts +214 -0
  87. package/src/chronicle/lib/leaf-outcome-runtime.ts +37 -0
  88. package/src/chronicle/lib/prompt-highlighting.ts +78 -0
  89. package/src/chronicle/lib/scroll-sync.ts +88 -0
  90. package/src/chronicle/lib/tool-call-summary.ts +64 -0
  91. package/src/components/BrowserUiExtensionIndicatorHost.svelte +34 -0
  92. package/src/components/ConversationTreeDiagram.svelte +393 -0
  93. package/src/components/FormFieldRenderer.svelte +359 -0
  94. package/src/components/GenericLauncher.svelte +1970 -0
  95. package/src/components/KeyboardShortcutsModal.svelte +52 -0
  96. package/src/components/ModalShell.svelte +105 -0
  97. package/src/components/PageHeader.svelte +146 -0
  98. package/src/components/ProcessActionsMenu.svelte +514 -0
  99. package/src/components/ProcessInfoOverlay.svelte +1229 -0
  100. package/src/components/ScheduleDateTimePicker.svelte +155 -0
  101. package/src/components/SkillSelector.svelte +45 -0
  102. package/src/components/ToastContainer.svelte +192 -0
  103. package/src/components/launcher-form-copy.ts +172 -0
  104. package/src/components/launcher-model-config.ts +263 -0
  105. package/src/components/launcher-schedule.ts +127 -0
  106. package/src/extension-ui-dev-server.ts +98 -0
  107. package/src/lib/api.ts +970 -0
  108. package/src/lib/beautiful-mermaid-elk-instance.ts +54 -0
  109. package/src/lib/browser-storage.ts +11 -0
  110. package/src/lib/cost-estimates.ts +41 -0
  111. package/src/lib/elk-bundled-worker.ts +41 -0
  112. package/src/lib/flow-layout.ts +326 -0
  113. package/src/lib/format.ts +96 -0
  114. package/src/lib/future-executions-logic.ts +12 -0
  115. package/src/lib/future-launch-detail.ts +145 -0
  116. package/src/lib/instance-tree-layout.ts +158 -0
  117. package/src/lib/keyboard-shortcuts-help.ts +20 -0
  118. package/src/lib/keyboard.ts +40 -0
  119. package/src/lib/launcher-recent-values.ts +68 -0
  120. package/src/lib/markdown.ts +94 -0
  121. package/src/lib/mermaid-render.worker.ts +36 -0
  122. package/src/lib/pi-stream.ts +3 -0
  123. package/src/lib/primary-path-detail.ts +337 -0
  124. package/src/lib/primary-path-replay.ts +27 -0
  125. package/src/lib/process-browser.ts +179 -0
  126. package/src/lib/process-initial-prompt.ts +7 -0
  127. package/src/lib/process-launch-notices.svelte.ts +25 -0
  128. package/src/lib/process-row-view.ts +60 -0
  129. package/src/lib/process-terminal-display.ts +17 -0
  130. package/src/lib/process-toast-focus.svelte.ts +18 -0
  131. package/src/lib/processes-logic.ts +2 -0
  132. package/src/lib/processes.svelte.ts +334 -0
  133. package/src/lib/request-guard.ts +20 -0
  134. package/src/lib/retry-config.svelte.ts +19 -0
  135. package/src/lib/rich-markdown-elements.ts +173 -0
  136. package/src/lib/router-logic.ts +190 -0
  137. package/src/lib/router.svelte.ts +56 -0
  138. package/src/lib/runtime-config.ts +96 -0
  139. package/src/lib/test-fixtures.ts +13 -0
  140. package/src/lib/toasts.svelte.ts +104 -0
  141. package/src/lib/tool-call-rendering.ts +66 -0
  142. package/src/lib/ui-extensions.svelte.ts +381 -0
  143. package/src/lib/usage-snapshot.ts +9 -0
  144. package/src/lib/ws-classifier.ts +80 -0
  145. package/src/lib/ws.svelte.ts +281 -0
  146. package/src/main.ts +8 -0
  147. package/src/pages/FutureLaunchDetailPage.svelte +479 -0
  148. package/src/pages/HomePage.svelte +306 -0
  149. package/src/pages/ProcessCard.svelte +99 -0
  150. package/src/pages/ProcessDetailPage.svelte +599 -0
  151. package/src/pages/ProcessFlowDiagram.svelte +696 -0
  152. package/src/pages/ProcessGallery.svelte +252 -0
  153. package/src/pages/ProcessesPage.svelte +994 -0
  154. package/src/pages/SkillsPage.svelte +665 -0
  155. package/src/pages/WatchersPage.svelte +330 -0
  156. package/src/pages/process-detail/OverlayFrame.svelte +58 -0
  157. package/src/pages/process-detail/ProcessDetailChronicle.svelte +460 -0
  158. package/src/pages/process-detail/ProcessDetailHeader.svelte +167 -0
  159. package/src/pages/process-detail/process-detail-action-drafts.svelte.ts +211 -0
  160. package/src/pages/process-detail/process-detail-actions.svelte.ts +548 -0
  161. package/src/pages/process-detail/process-detail-chronicle-dom.ts +102 -0
  162. package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +711 -0
  163. package/src/pages/process-detail/process-detail-mutations.svelte.ts +91 -0
  164. package/src/pages/process-detail/process-detail-view-model.ts +149 -0
  165. package/src/shell/AppShell.svelte +249 -0
  166. package/src/shell/RouteLoadBoundary.svelte +43 -0
  167. package/src/shell/Sidebar.svelte +1358 -0
  168. package/src/shell/test-fixtures/RouteLoadTestComponent.svelte +5 -0
  169. package/src/vite-env.d.ts +2 -0
  170. package/src/vite-server-config.ts +27 -0
@@ -0,0 +1,1358 @@
1
+ <script lang="ts">
2
+ import type { FutureActionSummary, FutureExecutionSummary } from "../lib/api.js";
3
+
4
+ import { formatLocalDateTime, formatLocalDateTime24Hour } from "../lib/format.js";
5
+ import {
6
+ keyboardShortcutHelpOpen,
7
+ toggleKeyboardShortcutHelp,
8
+ } from "../lib/keyboard-shortcuts-help.js";
9
+ import type { ProcessRowView } from "../lib/process-row-view.js";
10
+ import {
11
+ futureExecutions,
12
+ listState,
13
+ loadProcessesList,
14
+ processRows,
15
+ } from "../lib/processes.svelte";
16
+ import type { Route } from "../lib/router.svelte";
17
+ import {
18
+ buildFutureLaunchPath,
19
+ buildHomePath,
20
+ buildProcessesPath,
21
+ buildProcessPath,
22
+ buildSkillsPath,
23
+ buildWatchersPath,
24
+ followLink,
25
+ navigate,
26
+ } from "../lib/router.svelte";
27
+ import { wsStore } from "../lib/ws.svelte";
28
+
29
+ interface Props {
30
+ currentRoute: Route;
31
+ }
32
+
33
+ const collapseBreakpointPx = 960;
34
+
35
+ let { currentRoute }: Props = $props();
36
+
37
+ const homePath = buildHomePath();
38
+ const processesPath = buildProcessesPath();
39
+ const watchersPath = buildWatchersPath();
40
+ const skillsPath = buildSkillsPath();
41
+ const futureActionInstanceIds = $derived(
42
+ new Set(
43
+ $futureExecutions
44
+ .filter((execution): execution is FutureActionSummary => execution.kind === "action")
45
+ .map((execution) => execution.instanceId),
46
+ ),
47
+ );
48
+ const currentRows = $derived(
49
+ $processRows.filter(
50
+ (row) => row.statusCategory !== "terminal" && !futureActionInstanceIds.has(row.instanceId),
51
+ ),
52
+ );
53
+ const waitingRows = $derived(
54
+ currentRows.filter((row) => row.statusCategory === "waiting" || row.statusCategory === "error"),
55
+ );
56
+ const runningRows = $derived(
57
+ currentRows.filter((row) => row.statusCategory !== "waiting" && row.statusCategory !== "error"),
58
+ );
59
+ const futureRows = $derived($futureExecutions);
60
+ let observedReconnectCount = $state<number | null>(null);
61
+ let sidebarCollapsed = $state(false);
62
+ let currentProcessesPopoverOpen = $state(false);
63
+ let futureExecutionsPopoverOpen = $state(false);
64
+ let collapseSupported = $state(
65
+ typeof window === "undefined" ? true : window.innerWidth > collapseBreakpointPx,
66
+ );
67
+ let observedRouteKey = $state<string | null>(null);
68
+ let currentProcessesTriggerRef = $state<HTMLButtonElement | null>(null);
69
+ let currentProcessesPopoverRef = $state<HTMLDivElement | null>(null);
70
+ let futureExecutionsTriggerRef = $state<HTMLButtonElement | null>(null);
71
+ let futureExecutionsPopoverRef = $state<HTMLDivElement | null>(null);
72
+
73
+ const connectionIssue = $derived.by(() => {
74
+ if ($listState.error) {
75
+ return $listState.error;
76
+ }
77
+ if ($wsStore.status === "connecting" && $wsStore.reconnectCount > 0) {
78
+ return "Trying to reconnect to the server…";
79
+ }
80
+ if (
81
+ $wsStore.status === "disconnected" &&
82
+ ($wsStore.serverVersion !== null || $wsStore.reconnectCount > 0)
83
+ ) {
84
+ return "Connection lost. We'll keep trying to reconnect.";
85
+ }
86
+ return null;
87
+ });
88
+ const effectiveSidebarCollapsed = $derived(collapseSupported && sidebarCollapsed);
89
+ const currentProcessesControlActive = $derived(
90
+ effectiveSidebarCollapsed &&
91
+ (currentProcessesPopoverOpen || currentRoute.page === "process-detail"),
92
+ );
93
+ const futureExecutionsControlActive = $derived(
94
+ effectiveSidebarCollapsed &&
95
+ (futureExecutionsPopoverOpen || currentRoute.page === "future-launch-detail"),
96
+ );
97
+
98
+ $effect(() => {
99
+ const reconnectCount = $wsStore.reconnectCount;
100
+ if (observedReconnectCount === reconnectCount) {
101
+ return;
102
+ }
103
+ observedReconnectCount = reconnectCount;
104
+ void loadProcessesList();
105
+ });
106
+
107
+ $effect(() => {
108
+ if (typeof window === "undefined") {
109
+ return;
110
+ }
111
+
112
+ const updateCollapseSupport = () => {
113
+ collapseSupported = window.innerWidth > collapseBreakpointPx;
114
+ };
115
+
116
+ updateCollapseSupport();
117
+ window.addEventListener("resize", updateCollapseSupport);
118
+ return () => {
119
+ window.removeEventListener("resize", updateCollapseSupport);
120
+ };
121
+ });
122
+
123
+ $effect(() => {
124
+ if (collapseSupported) {
125
+ return;
126
+ }
127
+ sidebarCollapsed = false;
128
+ currentProcessesPopoverOpen = false;
129
+ futureExecutionsPopoverOpen = false;
130
+ });
131
+
132
+ $effect(() => {
133
+ if (effectiveSidebarCollapsed) {
134
+ return;
135
+ }
136
+ currentProcessesPopoverOpen = false;
137
+ futureExecutionsPopoverOpen = false;
138
+ });
139
+
140
+ $effect(() => {
141
+ const routeKey = `${currentRoute.page}:${currentRoute.params.instanceId ?? ""}:${currentRoute.params.futureExecutionId ?? ""}`;
142
+ if (observedRouteKey === routeKey) {
143
+ return;
144
+ }
145
+ observedRouteKey = routeKey;
146
+ currentProcessesPopoverOpen = false;
147
+ futureExecutionsPopoverOpen = false;
148
+ });
149
+
150
+ $effect(() => {
151
+ if (!currentProcessesPopoverOpen && !futureExecutionsPopoverOpen) {
152
+ return;
153
+ }
154
+
155
+ const handleDocumentClick = (event: MouseEvent) => {
156
+ const target = event.target as Node | null;
157
+ if (!target) {
158
+ currentProcessesPopoverOpen = false;
159
+ futureExecutionsPopoverOpen = false;
160
+ return;
161
+ }
162
+ if (
163
+ currentProcessesPopoverRef?.contains(target) ||
164
+ futureExecutionsPopoverRef?.contains(target)
165
+ ) {
166
+ return;
167
+ }
168
+ if (
169
+ currentProcessesTriggerRef?.contains(target) ||
170
+ futureExecutionsTriggerRef?.contains(target)
171
+ ) {
172
+ return;
173
+ }
174
+ currentProcessesPopoverOpen = false;
175
+ futureExecutionsPopoverOpen = false;
176
+ };
177
+
178
+ const handleDocumentKeydown = (event: KeyboardEvent) => {
179
+ if (event.key !== "Escape") {
180
+ return;
181
+ }
182
+ const focusTarget = currentProcessesPopoverOpen
183
+ ? currentProcessesTriggerRef
184
+ : futureExecutionsTriggerRef;
185
+ currentProcessesPopoverOpen = false;
186
+ futureExecutionsPopoverOpen = false;
187
+ focusTarget?.focus();
188
+ };
189
+
190
+ document.addEventListener("click", handleDocumentClick, true);
191
+ document.addEventListener("keydown", handleDocumentKeydown);
192
+ return () => {
193
+ document.removeEventListener("click", handleDocumentClick, true);
194
+ document.removeEventListener("keydown", handleDocumentKeydown);
195
+ };
196
+ });
197
+
198
+ function processPath(instanceId: string): string {
199
+ return buildProcessPath(instanceId);
200
+ }
201
+
202
+ function isSelectedRow(row: ProcessRowView): boolean {
203
+ return (
204
+ currentRoute.page === "process-detail" && currentRoute.params.instanceId === row.instanceId
205
+ );
206
+ }
207
+
208
+ function stateKind(row: ProcessRowView): string {
209
+ if (row.lifecycleStatus === "error") {
210
+ return "error";
211
+ }
212
+ switch (row.statusCategory) {
213
+ case "waiting":
214
+ return "waiting";
215
+ case "active":
216
+ return "running";
217
+ case "terminal":
218
+ return row.lifecycleStatus === "completed" ? "completed" : "aborted";
219
+ default:
220
+ return "discovered";
221
+ }
222
+ }
223
+
224
+ function metaLine(row: ProcessRowView): string {
225
+ return row.turnLabel ? `${row.turnLabel} · ${row.processDisplayName}` : row.processDisplayName;
226
+ }
227
+
228
+ function futurePath(item: FutureExecutionSummary): string {
229
+ if (item.kind === "action") {
230
+ return processPath(item.instanceId);
231
+ }
232
+ return buildFutureLaunchPath(item.id);
233
+ }
234
+
235
+ function isSelectedFutureItem(item: FutureExecutionSummary): boolean {
236
+ if (item.kind === "action") {
237
+ return (
238
+ currentRoute.page === "process-detail" && currentRoute.params.instanceId === item.instanceId
239
+ );
240
+ }
241
+ return (
242
+ currentRoute.page === "future-launch-detail" &&
243
+ currentRoute.params.futureExecutionId === item.id
244
+ );
245
+ }
246
+
247
+ function futureRowStatusLabel(item: FutureExecutionSummary): string {
248
+ if (item.status === "blocked") return "Blocked";
249
+ if (item.kind === "action") {
250
+ return "Scheduled action";
251
+ }
252
+ return item.scheduleKind === "cron" ? "Recurring cron" : "Scheduled start";
253
+ }
254
+
255
+ function futureRowMeta(item: FutureExecutionSummary): string | null {
256
+ return item.kind === "action" ? item.actionLabel : null;
257
+ }
258
+
259
+ function futureStatusLine(item: FutureExecutionSummary): string {
260
+ const meta = futureRowMeta(item);
261
+ return meta ? `${futureRowStatusLabel(item)} · ${meta}` : futureRowStatusLabel(item);
262
+ }
263
+
264
+ function futureRowSecondary(item: FutureExecutionSummary): string {
265
+ if (item.blockedReason?.summary) return item.blockedReason.summary;
266
+ const timeLabel =
267
+ item.kind === "action"
268
+ ? formatLocalDateTime24Hour(item.nextRunAt)
269
+ : formatLocalDateTime(item.nextRunAt);
270
+ if (item.scheduleKind === "cron" && item.cronExpression) {
271
+ return `${timeLabel} · ${item.cronExpression}`;
272
+ }
273
+ return timeLabel;
274
+ }
275
+
276
+ function futureStateKind(item: FutureExecutionSummary): string {
277
+ if (item.kind === "action") {
278
+ return "future-action";
279
+ }
280
+ if (item.scheduleKind === "cron") {
281
+ return "future-cron";
282
+ }
283
+ return "future-once";
284
+ }
285
+
286
+ function openFutureItem(item: FutureExecutionSummary, event: MouseEvent) {
287
+ event.preventDefault();
288
+ futureExecutionsPopoverOpen = false;
289
+ navigate(futurePath(item));
290
+ }
291
+
292
+ function toggleSidebar() {
293
+ if (!collapseSupported) {
294
+ return;
295
+ }
296
+ sidebarCollapsed = !sidebarCollapsed;
297
+ currentProcessesPopoverOpen = false;
298
+ futureExecutionsPopoverOpen = false;
299
+ }
300
+
301
+ function openSidebar() {
302
+ sidebarCollapsed = false;
303
+ currentProcessesPopoverOpen = false;
304
+ futureExecutionsPopoverOpen = false;
305
+ }
306
+
307
+ function toggleCurrentProcessesPopover() {
308
+ if (!effectiveSidebarCollapsed) {
309
+ return;
310
+ }
311
+ currentProcessesPopoverOpen = !currentProcessesPopoverOpen;
312
+ futureExecutionsPopoverOpen = false;
313
+ }
314
+
315
+ function toggleFutureExecutionsPopover() {
316
+ if (!effectiveSidebarCollapsed) {
317
+ return;
318
+ }
319
+ futureExecutionsPopoverOpen = !futureExecutionsPopoverOpen;
320
+ currentProcessesPopoverOpen = false;
321
+ }
322
+
323
+ function openCurrentProcessRow(row: ProcessRowView, event: MouseEvent) {
324
+ currentProcessesPopoverOpen = false;
325
+ followLink(event, processPath(row.instanceId));
326
+ }
327
+ </script>
328
+
329
+ {#snippet processRowList(rows: readonly ProcessRowView[], extraListClass = "")}
330
+ <div class="process-list {extraListClass}">
331
+ {#each rows as row (row.instanceId)}
332
+ {@const href = processPath(row.instanceId)}
333
+ <a
334
+ href={href}
335
+ class="process-row"
336
+ class:is-selected={isSelectedRow(row)}
337
+ aria-current={isSelectedRow(row) ? "page" : undefined}
338
+ data-pressable="true"
339
+ title={`${row.title} — ${row.statusLine}`}
340
+ onclick={(event) => openCurrentProcessRow(row, event)}
341
+ >
342
+ <span class="row-copy">
343
+ <span class="row-title">{row.title}</span>
344
+ <span class="row-status-line">
345
+ <span class="row-meta">
346
+ <span class={`row-status-text ${stateKind(row)}`}>{row.statusLabel}</span> · {metaLine(row)}
347
+ </span>
348
+ </span>
349
+ </span>
350
+ </a>
351
+ {/each}
352
+ </div>
353
+ {/snippet}
354
+
355
+ {#snippet futureRowList(items: readonly FutureExecutionView[], extraListClass = "")}
356
+ <div class="process-list {extraListClass}">
357
+ {#each items as item (item.id)}
358
+ {@const href = futurePath(item)}
359
+ {@const itemMeta = futureRowMeta(item)}
360
+ <a
361
+ href={href}
362
+ class="process-row future-row"
363
+ class:is-selected={isSelectedFutureItem(item)}
364
+ aria-current={isSelectedFutureItem(item) ? "page" : undefined}
365
+ data-pressable="true"
366
+ title={`${item.title} — ${futureStatusLine(item)}`}
367
+ onclick={(event) => openFutureItem(item, event)}
368
+ >
369
+ <span class="row-copy">
370
+ <span class="row-title">{item.title}</span>
371
+ <span class="row-status-line">
372
+ <span class="row-meta">
373
+ <span class={`row-status-text ${futureStateKind(item)}`}>{futureRowStatusLabel(item)}</span>{#if itemMeta} · {itemMeta}{/if}
374
+ </span>
375
+ </span>
376
+ <span class="row-secondary">{futureRowSecondary(item)}</span>
377
+ </span>
378
+ </a>
379
+ {/each}
380
+ </div>
381
+ {/snippet}
382
+
383
+ <aside
384
+ class="sidebar"
385
+ data-column="sidebar"
386
+ data-sidebar-state={effectiveSidebarCollapsed ? "collapsed" : "expanded"}
387
+ >
388
+ {#if effectiveSidebarCollapsed}
389
+ <div class="collapsed-rail">
390
+ <button
391
+ type="button"
392
+ class="rail-icon-control"
393
+ data-action="toggle-sidebar"
394
+ data-pressable="true"
395
+ aria-label="Open sidebar"
396
+ title="Open sidebar"
397
+ onclick={openSidebar}
398
+ >
399
+ <span class="rail-control-icon" aria-hidden="true">
400
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
401
+ <rect x="3.5" y="4.5" width="17" height="15" rx="2"></rect>
402
+ <path d="M8.5 4.5v15"></path>
403
+ <path d="M14.5 12h4"></path>
404
+ <path d="M16.5 10l2 2-2 2"></path>
405
+ </svg>
406
+ </span>
407
+ <span class="rail-control-label">Open</span>
408
+ </button>
409
+
410
+ <a
411
+ href={homePath}
412
+ class="rail-icon-control"
413
+ data-action="create-process"
414
+ data-pressable="true"
415
+ class:is-active={currentRoute.page === "home"}
416
+ aria-current={currentRoute.page === "home" ? "page" : undefined}
417
+ aria-label="Start process"
418
+ title="Start process"
419
+ onclick={(event) => followLink(event, homePath)}
420
+ >
421
+ <span class="rail-control-icon" aria-hidden="true">
422
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
423
+ <circle cx="12" cy="12" r="8"></circle>
424
+ <path d="M12 8v8"></path>
425
+ <path d="M8 12h8"></path>
426
+ </svg>
427
+ </span>
428
+ <span class="rail-control-label">New</span>
429
+ </a>
430
+
431
+ <a
432
+ href={watchersPath}
433
+ class="rail-icon-control"
434
+ data-action="view-watchers"
435
+ data-pressable="true"
436
+ class:is-active={currentRoute.page === "watchers"}
437
+ aria-current={currentRoute.page === "watchers" ? "page" : undefined}
438
+ aria-label="Watchers"
439
+ title="Watchers"
440
+ onclick={(event) => followLink(event, watchersPath)}
441
+ >
442
+ <span class="rail-control-icon" aria-hidden="true">
443
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
444
+ <path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6z"></path>
445
+ <circle cx="12" cy="12" r="2.5"></circle>
446
+ </svg>
447
+ </span>
448
+ <span class="rail-control-label">Watch</span>
449
+ </a>
450
+
451
+ <a
452
+ href={processesPath}
453
+ class="rail-icon-control"
454
+ data-action="view-all-processes"
455
+ data-pressable="true"
456
+ class:is-active={currentRoute.page === "processes"}
457
+ aria-current={currentRoute.page === "processes" ? "page" : undefined}
458
+ aria-label="All processes"
459
+ title="All processes"
460
+ onclick={(event) => followLink(event, processesPath)}
461
+ >
462
+ <span class="rail-control-icon" aria-hidden="true">
463
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
464
+ <path d="M5 5.5h14"></path>
465
+ <path d="M5 12h14"></path>
466
+ <path d="M5 18.5h9"></path>
467
+ <path d="M17 17l2 2 2-2"></path>
468
+ </svg>
469
+ </span>
470
+ <span class="rail-control-label">All</span>
471
+ </a>
472
+
473
+ <div class="current-processes-anchor">
474
+ <button
475
+ type="button"
476
+ class="rail-icon-control"
477
+ class:is-active={currentProcessesControlActive}
478
+ class:has-issue={Boolean(connectionIssue)}
479
+ data-action="current-processes"
480
+ data-pressable="true"
481
+ aria-haspopup="dialog"
482
+ aria-controls="current-processes-popover"
483
+ aria-expanded={currentProcessesPopoverOpen}
484
+ aria-label="Waiting and running processes"
485
+ title={connectionIssue ? `Waiting and running processes — ${connectionIssue}` : "Waiting and running processes"}
486
+ bind:this={currentProcessesTriggerRef}
487
+ onclick={toggleCurrentProcessesPopover}
488
+ >
489
+ <span class="rail-control-icon" aria-hidden="true">
490
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
491
+ <path d="M5 7.5h14"></path>
492
+ <path d="M5 12h14"></path>
493
+ <path d="M5 16.5h10"></path>
494
+ <circle cx="17" cy="16.5" r="1.6" fill="currentColor" stroke="none"></circle>
495
+ </svg>
496
+ </span>
497
+ <span class="rail-control-label">Work</span>
498
+ </button>
499
+
500
+ {#if currentProcessesPopoverOpen}
501
+ <div
502
+ id="current-processes-popover"
503
+ class="current-processes-popover"
504
+ data-section="current-processes-popover"
505
+ role="dialog"
506
+ aria-modal="false"
507
+ aria-label="Waiting and running processes"
508
+ bind:this={currentProcessesPopoverRef}
509
+ >
510
+ <div class="popover-header">
511
+ <p class="popover-eyebrow">Quick switch</p>
512
+ <h2>Waiting and running</h2>
513
+ </div>
514
+
515
+ {#if connectionIssue}
516
+ <p class="group-error popover-error" role="status">{connectionIssue}</p>
517
+ {/if}
518
+
519
+ <div class="popover-scroll">
520
+ {#if $listState.loading && currentRows.length === 0}
521
+ <div class="empty-state">Loading active processes…</div>
522
+ {:else if currentRows.length === 0}
523
+ <div class="empty-state">No waiting or running processes. Start one above and it will appear here.</div>
524
+ {:else}
525
+ <div class="popover-section">
526
+ <div class="group-header compact">
527
+ <div class="group-heading">Waiting</div>
528
+ <span class="group-count" aria-label={`${waitingRows.length} waiting process${waitingRows.length === 1 ? "" : "es"}`}>{waitingRows.length}</span>
529
+ </div>
530
+ {#if waitingRows.length === 0}
531
+ <div class="empty-state">No waiting processes.</div>
532
+ {:else}
533
+ {@render processRowList(waitingRows, "popover-process-list")}
534
+ {/if}
535
+ </div>
536
+ <div class="popover-section">
537
+ <div class="group-header compact">
538
+ <div class="group-heading">Running</div>
539
+ <span class="group-count" aria-label={`${runningRows.length} running process${runningRows.length === 1 ? "" : "es"}`}>{runningRows.length}</span>
540
+ </div>
541
+ {#if runningRows.length === 0}
542
+ <div class="empty-state">No running processes.</div>
543
+ {:else}
544
+ {@render processRowList(runningRows, "popover-process-list")}
545
+ {/if}
546
+ </div>
547
+ {/if}
548
+ </div>
549
+ </div>
550
+ {/if}
551
+ </div>
552
+
553
+ <div class="current-processes-anchor">
554
+ <button
555
+ type="button"
556
+ class="rail-icon-control"
557
+ class:is-active={futureExecutionsControlActive}
558
+ data-action="future-executions"
559
+ data-pressable="true"
560
+ aria-haspopup="dialog"
561
+ aria-controls="future-executions-popover"
562
+ aria-expanded={futureExecutionsPopoverOpen}
563
+ aria-label="Future scheduled work"
564
+ title="Future scheduled work"
565
+ bind:this={futureExecutionsTriggerRef}
566
+ onclick={toggleFutureExecutionsPopover}
567
+ >
568
+ <span class="rail-control-icon" aria-hidden="true">
569
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
570
+ <path d="M7 3.5v3"></path>
571
+ <path d="M17 3.5v3"></path>
572
+ <rect x="4" y="5.5" width="16" height="15" rx="2.5"></rect>
573
+ <path d="M4 9.5h16"></path>
574
+ <path d="M8 14h4"></path>
575
+ </svg>
576
+ </span>
577
+ <span class="rail-control-label">Future</span>
578
+ </button>
579
+
580
+ {#if futureExecutionsPopoverOpen}
581
+ <div
582
+ id="future-executions-popover"
583
+ class="current-processes-popover"
584
+ data-section="future-executions-popover"
585
+ role="dialog"
586
+ aria-modal="false"
587
+ aria-label="Future scheduled work"
588
+ bind:this={futureExecutionsPopoverRef}
589
+ >
590
+ <div class="popover-header">
591
+ <p class="popover-eyebrow">Scheduled</p>
592
+ <h2>Future</h2>
593
+ </div>
594
+
595
+ <div class="popover-scroll">
596
+ {#if futureRows.length === 0}
597
+ <div class="empty-state">Scheduled starts, cron jobs, and delayed actions will appear here.</div>
598
+ {:else}
599
+ {@render futureRowList(futureRows, "popover-process-list")}
600
+ {/if}
601
+ </div>
602
+ </div>
603
+ {/if}
604
+ </div>
605
+ </div>
606
+ {:else}
607
+ <div class="sidebar-header">
608
+ <div class="sidebar-topbar">
609
+ <a href={homePath} class="sidebar-brand" onclick={(event) => followLink(event, homePath)}>
610
+ Leitwerk
611
+ </a>
612
+ {#if collapseSupported}
613
+ <button
614
+ type="button"
615
+ class="sidebar-collapse-button rail-icon-control"
616
+ data-action="toggle-sidebar"
617
+ data-pressable="true"
618
+ aria-label="Collapse sidebar"
619
+ title="Collapse sidebar"
620
+ onclick={toggleSidebar}
621
+ >
622
+ <span class="rail-control-icon" aria-hidden="true">
623
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
624
+ <rect x="3.5" y="4.5" width="17" height="15" rx="2"></rect>
625
+ <path d="M8.5 4.5v15"></path>
626
+ <path d="M14.5 12h4"></path>
627
+ <path d="M16.5 10l-2 2 2 2"></path>
628
+ </svg>
629
+ </span>
630
+ </button>
631
+ {/if}
632
+ </div>
633
+
634
+ <nav class="sidebar-primary-nav" aria-label="Primary sidebar">
635
+ <a
636
+ href={homePath}
637
+ class="sidebar-nav-link"
638
+ data-action="create-process"
639
+ data-pressable="true"
640
+ class:is-active={currentRoute.page === "home"}
641
+ aria-current={currentRoute.page === "home" ? "page" : undefined}
642
+ onclick={(event) => followLink(event, homePath)}
643
+ >
644
+ <span class="sidebar-nav-icon" aria-hidden="true">+</span>
645
+ <span class="sidebar-nav-label">Start a process</span>
646
+ </a>
647
+ <a
648
+ href={processesPath}
649
+ class="sidebar-nav-link"
650
+ class:is-active={currentRoute.page === "processes"}
651
+ data-action="view-all-processes"
652
+ data-pressable="true"
653
+ aria-current={currentRoute.page === "processes" ? "page" : undefined}
654
+ onclick={(event) => followLink(event, processesPath)}
655
+ >
656
+ <span class="sidebar-nav-icon" aria-hidden="true">⌘</span>
657
+ <span class="sidebar-nav-label">All processes</span>
658
+ </a>
659
+ <a
660
+ href={skillsPath}
661
+ class="sidebar-nav-link"
662
+ data-action="view-skills"
663
+ data-pressable="true"
664
+ class:is-active={currentRoute.page === "skills"}
665
+ aria-current={currentRoute.page === "skills" ? "page" : undefined}
666
+ onclick={(event) => followLink(event, skillsPath)}
667
+ >
668
+ <span class="sidebar-nav-icon" aria-hidden="true">
669
+ <svg viewBox="0 0 20 20" fill="none">
670
+ <path d="M4 5.5h12M4 10h12M4 14.5h8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
671
+ </svg>
672
+ </span>
673
+ <span class="sidebar-nav-label">Skills</span>
674
+ </a>
675
+ <a
676
+ href={watchersPath}
677
+ class="sidebar-nav-link"
678
+ data-action="view-watchers"
679
+ data-pressable="true"
680
+ class:is-active={currentRoute.page === "watchers"}
681
+ aria-current={currentRoute.page === "watchers" ? "page" : undefined}
682
+ onclick={(event) => followLink(event, watchersPath)}
683
+ >
684
+ <span class="sidebar-nav-icon" aria-hidden="true">◌</span>
685
+ <span class="sidebar-nav-label">Watchers</span>
686
+ </a>
687
+ </nav>
688
+ </div>
689
+
690
+ <div class="sidebar-scroll">
691
+ <section class="process-group future-group" class:is-empty={futureRows.length === 0}>
692
+ <div class="group-header">
693
+ <div class="group-heading">Future</div>
694
+ <span class="group-count" aria-label={`${futureRows.length} future scheduled work item${futureRows.length === 1 ? "" : "s"}`}>
695
+ {futureRows.length}
696
+ </span>
697
+ </div>
698
+ {#if futureRows.length === 0}
699
+ <div class="empty-state">Scheduled starts, cron jobs, and delayed actions will appear here.</div>
700
+ {:else}
701
+ {@render futureRowList(futureRows)}
702
+ {/if}
703
+ </section>
704
+
705
+ <section class="process-group waiting-group" class:is-empty={waitingRows.length === 0}>
706
+ <div class="group-header">
707
+ <div class="group-heading">Waiting</div>
708
+ <span class="group-count" aria-label={`${waitingRows.length} waiting process${waitingRows.length === 1 ? "" : "es"}`}>
709
+ {waitingRows.length}
710
+ </span>
711
+ </div>
712
+ {#if $listState.loading && currentRows.length === 0}
713
+ <div class="empty-state">Loading active processes…</div>
714
+ {:else if currentRows.length === 0}
715
+ <div class="empty-state">No waiting or running processes. Start one above and it will appear here.</div>
716
+ {:else if waitingRows.length === 0}
717
+ <div class="empty-state">No waiting processes.</div>
718
+ {:else}
719
+ {@render processRowList(waitingRows)}
720
+ {/if}
721
+ </section>
722
+
723
+ <section class="process-group running-group" class:is-empty={runningRows.length === 0}>
724
+ <div class="group-header">
725
+ <div class="group-heading">Running</div>
726
+ <span class="group-count" aria-label={`${runningRows.length} running process${runningRows.length === 1 ? "" : "es"}`}>
727
+ {runningRows.length}
728
+ </span>
729
+ </div>
730
+ {#if runningRows.length === 0}
731
+ <div class="empty-state">No running processes.</div>
732
+ {:else}
733
+ {@render processRowList(runningRows)}
734
+ {/if}
735
+ </section>
736
+ </div>
737
+ {/if}
738
+
739
+ {#if connectionIssue && !effectiveSidebarCollapsed}
740
+ <div class="connection-overlay" role="status" aria-live="polite">
741
+ <p class="overlay-title">Connection issue</p>
742
+ <p class="overlay-copy">{connectionIssue}</p>
743
+ </div>
744
+ {/if}
745
+
746
+ <button
747
+ type="button"
748
+ class="shortcut-help-trigger"
749
+ class:is-collapsed={effectiveSidebarCollapsed}
750
+ data-pressable="true"
751
+ aria-haspopup="dialog"
752
+ aria-controls="keyboard-shortcuts-modal"
753
+ aria-expanded={$keyboardShortcutHelpOpen}
754
+ aria-label="Keyboard shortcuts"
755
+ title="Keyboard shortcuts (?)"
756
+ onclick={toggleKeyboardShortcutHelp}
757
+ >
758
+ <span class="shortcut-help-trigger-inner">?</span>
759
+ </button>
760
+ </aside>
761
+
762
+ <style>
763
+ .sidebar {
764
+ --sidebar-expanded-width: clamp(260px, 25vw, 300px);
765
+ --sidebar-collapsed-width: 64px;
766
+ display: flex;
767
+ flex: 0 0 var(--sidebar-expanded-width);
768
+ flex-direction: column;
769
+ width: var(--sidebar-expanded-width);
770
+ min-width: 250px;
771
+ max-width: 300px;
772
+ height: 100%;
773
+ min-height: 0;
774
+ padding: 16px var(--space-xs) 20px;
775
+ border-right: 1px solid var(--chronicle-border);
776
+ background: var(--chronicle-sidebar-surface);
777
+ position: relative;
778
+ overflow: hidden;
779
+ transition: background-color var(--duration-fast) var(--ease-out-quart);
780
+ }
781
+
782
+ .sidebar[data-sidebar-state="collapsed"] {
783
+ flex-basis: var(--sidebar-collapsed-width);
784
+ width: var(--sidebar-collapsed-width);
785
+ min-width: var(--sidebar-collapsed-width);
786
+ max-width: var(--sidebar-collapsed-width);
787
+ padding: 16px 8px;
788
+ overflow: visible;
789
+ align-items: center;
790
+ z-index: 2;
791
+ }
792
+
793
+ .sidebar-header {
794
+ display: grid;
795
+ gap: 12px;
796
+ margin-bottom: 18px;
797
+ }
798
+
799
+ .sidebar-topbar {
800
+ display: flex;
801
+ align-items: center;
802
+ justify-content: space-between;
803
+ gap: 12px;
804
+ }
805
+
806
+ .sidebar-brand {
807
+ min-width: 0;
808
+ color: var(--chronicle-text);
809
+ font-family: var(--font-display);
810
+ font-size: 1.3rem;
811
+ font-weight: 700;
812
+ letter-spacing: -0.02em;
813
+ text-decoration: none;
814
+ }
815
+
816
+ .sidebar-brand:hover {
817
+ color: color-mix(in srgb, var(--chronicle-text) 82%, var(--chronicle-accent) 18%);
818
+ }
819
+
820
+ .rail-icon-control {
821
+ display: grid;
822
+ grid-template-rows: 20px auto;
823
+ place-items: center;
824
+ gap: 2px;
825
+ width: 48px;
826
+ min-height: 48px;
827
+ padding: 5px 2px 4px;
828
+ border: 1px solid transparent;
829
+ border-radius: 12px;
830
+ background: transparent;
831
+ color: var(--chronicle-text-faint);
832
+ text-decoration: none;
833
+ cursor: pointer;
834
+ position: relative;
835
+ }
836
+
837
+ .rail-icon-control:hover,
838
+ .rail-icon-control.is-active,
839
+ .rail-icon-control[aria-expanded="true"] {
840
+ border-color: color-mix(in srgb, var(--chronicle-border) 72%, transparent 28%);
841
+ background: color-mix(in srgb, var(--chronicle-card-surface) 78%, transparent 22%);
842
+ color: var(--chronicle-text);
843
+ }
844
+
845
+ .rail-icon-control.is-active,
846
+ .rail-icon-control[aria-expanded="true"] {
847
+ border-color: color-mix(in srgb, var(--chronicle-accent) 24%, var(--chronicle-border) 76%);
848
+ background: color-mix(in srgb, var(--chronicle-accent) 9%, var(--chronicle-card-surface) 91%);
849
+ }
850
+
851
+ .sidebar-collapse-button {
852
+ grid-template-rows: 1fr;
853
+ }
854
+
855
+ .rail-control-icon,
856
+ .rail-icon-control svg {
857
+ width: 19px;
858
+ height: 19px;
859
+ }
860
+
861
+ .rail-control-label {
862
+ max-width: 44px;
863
+ overflow: hidden;
864
+ color: currentColor;
865
+ font-size: 0.625rem;
866
+ font-weight: 650;
867
+ line-height: 1;
868
+ text-overflow: ellipsis;
869
+ white-space: nowrap;
870
+ }
871
+
872
+ .rail-icon-control.has-issue::after {
873
+ content: "";
874
+ position: absolute;
875
+ top: 5px;
876
+ right: 6px;
877
+ width: 6px;
878
+ height: 6px;
879
+ border-radius: 999px;
880
+ background: var(--chronicle-danger);
881
+ box-shadow: 0 0 0 1.5px var(--chronicle-sidebar-surface);
882
+ }
883
+
884
+ .sidebar-primary-nav {
885
+ display: grid;
886
+ gap: 4px;
887
+ }
888
+
889
+ .sidebar-nav-link {
890
+ display: grid;
891
+ grid-template-columns: 24px minmax(0, 1fr);
892
+ gap: 10px;
893
+ align-items: center;
894
+ min-height: 38px;
895
+ padding: 7px 9px;
896
+ border: 1px solid transparent;
897
+ border-radius: 12px;
898
+ color: var(--chronicle-text-muted);
899
+ text-decoration: none;
900
+ }
901
+
902
+ .sidebar-nav-link:hover,
903
+ .sidebar-nav-link.is-active {
904
+ background: color-mix(in srgb, var(--chronicle-card-surface) 78%, transparent 22%);
905
+ border-color: color-mix(in srgb, var(--chronicle-border) 72%, transparent 28%);
906
+ color: var(--chronicle-text);
907
+ }
908
+
909
+ .sidebar-nav-link.is-active {
910
+ background: color-mix(in srgb, var(--chronicle-accent) 9%, var(--chronicle-card-surface) 91%);
911
+ border-color: color-mix(in srgb, var(--chronicle-accent) 25%, var(--chronicle-border) 75%);
912
+ }
913
+
914
+ .sidebar-nav-icon {
915
+ display: inline-flex;
916
+ align-items: center;
917
+ justify-content: center;
918
+ width: 22px;
919
+ height: 22px;
920
+ border-radius: 7px;
921
+ color: inherit;
922
+ font-size: 0.92rem;
923
+ font-weight: 750;
924
+ line-height: 1;
925
+ }
926
+
927
+ .sidebar-nav-icon svg {
928
+ width: 18px;
929
+ height: 18px;
930
+ }
931
+
932
+ .sidebar-nav-label {
933
+ min-width: 0;
934
+ overflow: hidden;
935
+ font-size: 0.9rem;
936
+ font-weight: 620;
937
+ line-height: 1.3;
938
+ text-overflow: ellipsis;
939
+ white-space: nowrap;
940
+ }
941
+
942
+ .sidebar-scroll {
943
+ flex: 1;
944
+ min-height: 0;
945
+ overflow: hidden;
946
+ overscroll-behavior: contain;
947
+ display: flex;
948
+ flex-direction: column;
949
+ gap: 14px;
950
+ padding-bottom: 54px;
951
+ }
952
+
953
+ .collapsed-rail {
954
+ display: flex;
955
+ flex: 1;
956
+ width: 100%;
957
+ flex-direction: column;
958
+ align-items: center;
959
+ gap: 6px;
960
+ padding-top: 0;
961
+ padding-bottom: 42px;
962
+ }
963
+
964
+ .current-processes-anchor {
965
+ position: relative;
966
+ }
967
+
968
+ .current-processes-popover {
969
+ position: absolute;
970
+ top: 0;
971
+ left: calc(100% + 12px);
972
+ width: min(360px, calc(100vw - 132px));
973
+ max-height: min(70vh, 520px);
974
+ padding: 16px;
975
+ border-radius: 20px;
976
+ border: 1px solid color-mix(in srgb, var(--chronicle-border-strong) 82%, white 18%);
977
+ background: color-mix(in srgb, var(--chronicle-card-surface) 96%, white 4%);
978
+ box-shadow: var(--chronicle-shadow);
979
+ z-index: 4;
980
+ }
981
+
982
+ .popover-header {
983
+ margin-bottom: 12px;
984
+ }
985
+
986
+ .popover-eyebrow,
987
+ .popover-header h2 {
988
+ margin: 0;
989
+ }
990
+
991
+ .popover-eyebrow {
992
+ font-size: 11px;
993
+ font-weight: 700;
994
+ letter-spacing: 0.08em;
995
+ text-transform: uppercase;
996
+ color: var(--chronicle-text-muted);
997
+ }
998
+
999
+ .popover-header h2 {
1000
+ margin-top: 4px;
1001
+ font-size: 1rem;
1002
+ line-height: 1.35;
1003
+ color: var(--chronicle-text);
1004
+ }
1005
+
1006
+ .popover-error {
1007
+ margin-bottom: 12px;
1008
+ }
1009
+
1010
+ .popover-scroll {
1011
+ overflow-y: auto;
1012
+ max-height: min(52vh, 400px);
1013
+ padding-right: 2px;
1014
+ }
1015
+
1016
+ .popover-process-list .process-row {
1017
+ padding-block: 12px;
1018
+ }
1019
+
1020
+ .popover-section + .popover-section {
1021
+ margin-top: 16px;
1022
+ padding-top: 14px;
1023
+ border-top: 1px solid color-mix(in srgb, var(--chronicle-border) 72%, transparent 28%);
1024
+ }
1025
+
1026
+ .shortcut-help-trigger {
1027
+ position: absolute;
1028
+ bottom: 16px;
1029
+ left: 12px;
1030
+ display: inline-flex;
1031
+ align-items: center;
1032
+ justify-content: center;
1033
+ width: 40px;
1034
+ height: 40px;
1035
+ border-radius: 999px;
1036
+ cursor: pointer;
1037
+ z-index: 3;
1038
+ }
1039
+
1040
+ .shortcut-help-trigger.is-collapsed {
1041
+ left: 50%;
1042
+ bottom: 12px;
1043
+ width: 28px;
1044
+ height: 28px;
1045
+ transform: translateX(-50%);
1046
+ }
1047
+
1048
+ .shortcut-help-trigger.is-collapsed .shortcut-help-trigger-inner {
1049
+ width: 20px;
1050
+ height: 20px;
1051
+ font-size: 12px;
1052
+ }
1053
+
1054
+ .shortcut-help-trigger-inner {
1055
+ display: inline-flex;
1056
+ align-items: center;
1057
+ justify-content: center;
1058
+ width: 32px;
1059
+ height: 32px;
1060
+ border-radius: 999px;
1061
+ color: var(--chronicle-text);
1062
+ font-family: var(--font-mono);
1063
+ font-size: 16px;
1064
+ font-weight: 700;
1065
+ }
1066
+
1067
+ .shortcut-help-trigger:hover .shortcut-help-trigger-inner,
1068
+ .shortcut-help-trigger[aria-expanded="true"] .shortcut-help-trigger-inner {
1069
+ color: var(--chronicle-text);
1070
+ }
1071
+
1072
+ .shortcut-help-trigger::before {
1073
+ content: "";
1074
+ position: absolute;
1075
+ inset: -8px;
1076
+ border-radius: 999px;
1077
+ background: transparent;
1078
+ border: 1.5px solid color-mix(in srgb, var(--chronicle-border) 30%, transparent);
1079
+ pointer-events: none;
1080
+ }
1081
+
1082
+ .shortcut-help-trigger.is-collapsed::before {
1083
+ inset: -4px;
1084
+ }
1085
+
1086
+ .shortcut-help-trigger:hover::before {
1087
+ border-color: color-mix(in srgb, var(--chronicle-border) 50%, transparent);
1088
+ }
1089
+
1090
+ .process-group {
1091
+ --process-row-gutter: var(--space-xs);
1092
+ display: flex;
1093
+ min-height: 0;
1094
+ flex: 1 1 0;
1095
+ flex-direction: column;
1096
+ gap: 10px;
1097
+ padding-inline: var(--process-row-gutter);
1098
+ }
1099
+
1100
+ .process-group.is-empty {
1101
+ flex: 0 0 auto;
1102
+ }
1103
+
1104
+ .process-group:not(.is-empty) {
1105
+ min-height: 124px;
1106
+ }
1107
+
1108
+ .waiting-group:not(.is-empty) {
1109
+ flex-grow: 1.06;
1110
+ }
1111
+
1112
+ .running-group:not(.is-empty) {
1113
+ flex-grow: 0.94;
1114
+ }
1115
+
1116
+ .future-group:not(.is-empty) {
1117
+ flex-grow: 0.8;
1118
+ }
1119
+
1120
+ .group-header {
1121
+ display: flex;
1122
+ align-items: center;
1123
+ justify-content: space-between;
1124
+ gap: 10px;
1125
+ min-height: 20px;
1126
+ }
1127
+
1128
+ .group-header.compact {
1129
+ margin-top: 2px;
1130
+ margin-bottom: 6px;
1131
+ }
1132
+
1133
+ .group-heading {
1134
+ font-size: 11px;
1135
+ font-weight: 700;
1136
+ letter-spacing: 0.08em;
1137
+ text-transform: uppercase;
1138
+ color: var(--chronicle-text-muted);
1139
+ }
1140
+
1141
+ .group-count {
1142
+ display: inline-flex;
1143
+ align-items: center;
1144
+ justify-content: center;
1145
+ min-width: 22px;
1146
+ height: 20px;
1147
+ padding: 0 7px;
1148
+ border-radius: 999px;
1149
+ border: 1px solid color-mix(in srgb, var(--chronicle-border) 80%, transparent 20%);
1150
+ background: color-mix(in srgb, var(--chronicle-card-surface) 74%, transparent 26%);
1151
+ color: var(--chronicle-text-faint);
1152
+ font-family: var(--font-mono);
1153
+ font-size: 0.72rem;
1154
+ font-weight: 700;
1155
+ font-variant-numeric: tabular-nums;
1156
+ line-height: 1;
1157
+ }
1158
+
1159
+ .sidebar-scroll > .process-group > .process-list {
1160
+ min-height: 0;
1161
+ margin-inline: calc(-1 * var(--process-row-gutter));
1162
+ overflow-y: auto;
1163
+ }
1164
+
1165
+ .process-list {
1166
+ display: flex;
1167
+ flex-direction: column;
1168
+ gap: 4px;
1169
+ }
1170
+
1171
+ .process-row {
1172
+ display: block;
1173
+ padding: calc(var(--space-xs) + 1px) var(--process-row-gutter, var(--space-xs));
1174
+ border-radius: 14px;
1175
+ box-shadow: inset 0 0 0 1px transparent;
1176
+ color: inherit;
1177
+ text-decoration: none;
1178
+ }
1179
+
1180
+ .process-row:hover {
1181
+ background: color-mix(in srgb, var(--chronicle-card-surface) 92%, var(--chronicle-accent) 8%);
1182
+ box-shadow: inset 0 0 0 1px
1183
+ color-mix(in srgb, var(--chronicle-border) 76%, var(--chronicle-accent) 24%);
1184
+ }
1185
+
1186
+ .process-row.is-selected {
1187
+ background: color-mix(in srgb, var(--chronicle-card-surface) 92%, var(--chronicle-accent) 8%);
1188
+ box-shadow: inset 0 0 0 1px
1189
+ color-mix(in srgb, var(--chronicle-accent) 18%, var(--chronicle-border) 82%);
1190
+ }
1191
+
1192
+ .row-copy {
1193
+ display: grid;
1194
+ gap: 1px;
1195
+ min-width: 0;
1196
+ }
1197
+
1198
+ .row-status-line {
1199
+ display: block;
1200
+ min-width: 0;
1201
+ }
1202
+
1203
+ .row-status-text.running,
1204
+ .row-status-text.future-action {
1205
+ color: color-mix(in srgb, var(--chronicle-accent) 76%, var(--chronicle-text) 24%);
1206
+ }
1207
+
1208
+ .row-status-text.waiting,
1209
+ .row-status-text.future-once {
1210
+ color: color-mix(in srgb, var(--chronicle-attention) 76%, var(--chronicle-text) 24%);
1211
+ }
1212
+
1213
+ .row-status-text.error {
1214
+ color: color-mix(in srgb, var(--chronicle-danger) 76%, var(--chronicle-text) 24%);
1215
+ }
1216
+
1217
+ .row-status-text.completed,
1218
+ .row-status-text.future-cron {
1219
+ color: color-mix(in srgb, var(--chronicle-success) 70%, var(--chronicle-text) 30%);
1220
+ }
1221
+
1222
+ .row-title {
1223
+ font-size: 0.95rem;
1224
+ line-height: 1.32;
1225
+ font-weight: 620;
1226
+ color: var(--chronicle-text);
1227
+ display: -webkit-box;
1228
+ -webkit-line-clamp: 2;
1229
+ -webkit-box-orient: vertical;
1230
+ overflow: hidden;
1231
+ }
1232
+
1233
+ .row-meta {
1234
+ font-size: 0.75rem;
1235
+ line-height: 1.32;
1236
+ font-weight: 600;
1237
+ font-variant-numeric: tabular-nums;
1238
+ color: var(--chronicle-text-faint);
1239
+ display: -webkit-box;
1240
+ -webkit-line-clamp: 2;
1241
+ -webkit-box-orient: vertical;
1242
+ overflow: hidden;
1243
+ }
1244
+
1245
+ .row-secondary {
1246
+ font-size: 0.8125rem;
1247
+ line-height: 1.45;
1248
+ color: var(--chronicle-text-muted);
1249
+ display: -webkit-box;
1250
+ -webkit-line-clamp: 2;
1251
+ -webkit-box-orient: vertical;
1252
+ overflow: hidden;
1253
+ }
1254
+
1255
+
1256
+ .group-error,
1257
+ .empty-state {
1258
+ font-size: 0.875rem;
1259
+ line-height: 1.55;
1260
+ padding: 2px 0;
1261
+ }
1262
+
1263
+ .group-error {
1264
+ margin: 0;
1265
+ color: var(--chronicle-danger-text);
1266
+ }
1267
+
1268
+ .empty-state {
1269
+ font-size: 0.875rem;
1270
+ line-height: 1.55;
1271
+ color: var(--chronicle-text-muted);
1272
+ padding: 2px 0;
1273
+ }
1274
+
1275
+ .connection-overlay {
1276
+ position: absolute;
1277
+ left: 18px;
1278
+ right: 18px;
1279
+ bottom: 64px;
1280
+ padding: 14px;
1281
+ border-radius: 16px;
1282
+ border: 1px solid color-mix(in srgb, var(--chronicle-danger) 46%, var(--chronicle-border) 54%);
1283
+ background: color-mix(in srgb, white 92%, var(--chronicle-danger) 8%);
1284
+ }
1285
+
1286
+ .overlay-title {
1287
+ margin: 0 0 4px;
1288
+ font-size: 12px;
1289
+ font-weight: 700;
1290
+ letter-spacing: 0.04em;
1291
+ text-transform: uppercase;
1292
+ color: var(--chronicle-danger-text);
1293
+ }
1294
+
1295
+ .overlay-copy {
1296
+ margin: 0;
1297
+ font-size: 0.875rem;
1298
+ line-height: 1.55;
1299
+ color: var(--chronicle-text);
1300
+ }
1301
+
1302
+ @media (max-width: 960px) {
1303
+ .sidebar,
1304
+ .sidebar[data-sidebar-state="collapsed"] {
1305
+ flex: none;
1306
+ width: 100%;
1307
+ max-width: none;
1308
+ min-width: 0;
1309
+ height: auto;
1310
+ padding: 16px 14px;
1311
+ border-right: 0;
1312
+ border-bottom: 1px solid var(--chronicle-border);
1313
+ overflow: visible;
1314
+ align-items: stretch;
1315
+ }
1316
+
1317
+ .sidebar-header {
1318
+ margin-bottom: 16px;
1319
+ }
1320
+
1321
+ .sidebar-scroll {
1322
+ display: grid;
1323
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
1324
+ gap: 16px;
1325
+ overflow: visible;
1326
+ padding-bottom: 0;
1327
+ }
1328
+
1329
+ .process-group {
1330
+ padding: 14px;
1331
+ border-radius: 18px;
1332
+ background: color-mix(in srgb, var(--chronicle-card-surface) 92%, var(--chronicle-panel-muted) 8%);
1333
+ border: 1px solid color-mix(in srgb, var(--chronicle-border) 88%, white 12%);
1334
+ }
1335
+
1336
+ .process-group,
1337
+ .process-group.is-empty,
1338
+ .process-group:not(.is-empty) {
1339
+ min-height: 0;
1340
+ flex: initial;
1341
+ }
1342
+
1343
+ .sidebar-scroll > .process-group > .process-list {
1344
+ overflow-y: visible;
1345
+ }
1346
+
1347
+ .connection-overlay {
1348
+ position: static;
1349
+ margin-top: 16px;
1350
+ }
1351
+ }
1352
+
1353
+ @media (max-width: 640px) {
1354
+ .sidebar-scroll {
1355
+ grid-template-columns: 1fr;
1356
+ }
1357
+ }
1358
+ </style>