@leitwerk-dev/ui 0.1.9 → 0.2.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/assets/ApiTokensPage-B15IzsLp.css +1 -0
- package/dist/assets/ApiTokensPage-ClJp9PYr.js +1 -0
- package/dist/assets/ChronicleMarkdown-lqwX9Ywa.js +16 -0
- package/dist/assets/ChronicleMarkdown-wsUF8Z75.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-BOoZaG11.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-Bdlgm4cJ.js +1 -0
- package/dist/assets/GenericLauncher-Bf7Eb1Rw.js +1 -0
- package/dist/assets/GenericLauncher-CExW6wei.css +1 -0
- package/dist/assets/HomePage-CSkNdC4m.js +1 -0
- package/dist/assets/PageHeader-DPuQInDo.css +1 -0
- package/dist/assets/PageHeader-sphJnWL1.js +1 -0
- package/dist/assets/ProcessActionsMenu-DLMywI9c.js +1 -0
- package/dist/assets/ProcessActionsMenu-VKT7PE6z.css +1 -0
- package/dist/assets/ProcessDetailPage-Cth6A0DN.css +1 -0
- package/dist/assets/ProcessDetailPage-fvvdvO19.js +14 -0
- package/dist/assets/ProcessFlowDiagram-Dx2wheGN.js +2 -0
- package/dist/assets/ProcessesPage-uLl7LXp8.js +1 -0
- package/dist/assets/ProcessesPage-yPjjrzjg.css +1 -0
- package/dist/assets/ScheduleDateTimePicker-DmojMRxN.js +1 -0
- package/dist/assets/{ScheduleDateTimePicker-CadXN9z7.css → ScheduleDateTimePicker-uacJAkIq.css} +1 -1
- package/dist/assets/SkillsPage-CJrtt8xU.css +1 -0
- package/dist/assets/SkillsPage-CotbGUxm.js +2 -0
- package/dist/assets/WatchersPage-ByWGNJet.js +1 -0
- package/dist/assets/WatchersPage-cRBnmTAD.css +1 -0
- package/dist/assets/external-links-CX92-VRP.js +1 -0
- package/dist/assets/http-client-VpPXJwbR.js +2 -0
- package/dist/assets/index-C7zNe3je.js +6 -0
- package/dist/assets/index-DtEI5gsQ.css +1 -0
- package/dist/assets/index-client-BYQviCtQ.js +2 -0
- package/dist/assets/{mermaid-render.worker-DAVgiVRG.js → mermaid-render.worker-QW2WZpEE.js} +12 -12
- package/dist/assets/process-terminal-display-BQRQwGod.js +1 -0
- package/dist/assets/router.svelte-EEldxHlO.js +1 -0
- package/dist/index.html +8 -8
- package/package.json +8 -8
- package/src/App.svelte +36 -0
- package/src/chronicle/components/ChronicleActionSection.svelte +70 -143
- package/src/chronicle/components/ChronicleCreateIssueButton.svelte +22 -0
- package/src/chronicle/components/ChronicleEntryHeader.svelte +76 -0
- package/src/chronicle/components/ChronicleExpandButton.svelte +11 -34
- package/src/chronicle/components/ChronicleFailureMessage.svelte +41 -0
- package/src/chronicle/components/ChronicleFlow.svelte +133 -28
- package/src/chronicle/components/ChronicleLeafOutcomeRendererHost.svelte +1 -8
- package/src/chronicle/components/ChronicleLeafOutcomeSection.svelte +25 -52
- package/src/chronicle/components/ChronicleLiveChip.svelte +1 -35
- package/src/chronicle/components/ChronicleLiveTail.svelte +55 -154
- package/src/chronicle/components/ChronicleMarkdown.svelte +6 -6
- package/src/chronicle/components/ChronicleOperatorInputSection.svelte +5 -18
- package/src/chronicle/components/ChronicleProcessErrorSection.svelte +10 -107
- package/src/chronicle/components/ChroniclePromptSection.svelte +6 -26
- package/src/chronicle/components/ChronicleQuestionRequest.svelte +22 -5
- package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +71 -109
- package/src/chronicle/components/ChronicleRecoverySection.svelte +96 -264
- package/src/chronicle/components/ChronicleScheduledActionSection.svelte +1 -1
- package/src/chronicle/components/ChronicleSectionHeader.svelte +1 -4
- package/src/chronicle/components/ChronicleStartupHistory.svelte +63 -0
- package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +10 -26
- package/src/chronicle/components/ChronicleThinkingSection.svelte +25 -165
- package/src/chronicle/components/ChronicleThinkingText.svelte +1 -0
- package/src/chronicle/components/ChronicleToolApproval.svelte +40 -0
- package/src/chronicle/components/ChronicleToolCallItem.svelte +1 -1
- package/src/chronicle/components/ChronicleTurnCluster.svelte +208 -284
- package/src/chronicle/components/ChronicleTurnDetailsButton.svelte +16 -0
- package/src/chronicle/components/ChronicleTurnProgress.svelte +77 -54
- package/src/chronicle/components/ChronicleTurnRail.svelte +327 -391
- package/src/chronicle/components/CompactActionComposer.svelte +36 -13
- package/src/chronicle/components/ReadonlyJsonValue.svelte +30 -0
- package/src/chronicle/lib/action-bindings.ts +1 -1
- package/src/chronicle/lib/action-model-display.ts +2 -2
- package/src/chronicle/lib/action-preview.ts +1 -1
- package/src/chronicle/lib/chronicle-projection.ts +125 -109
- package/src/chronicle/lib/chronicle-rail-groups.ts +158 -0
- package/src/chronicle/lib/chronicle-selectable-items.ts +16 -11
- package/src/chronicle/lib/chronicle-ticket-artifact.ts +7 -0
- package/src/chronicle/lib/formatting.ts +19 -0
- package/src/chronicle/lib/leaf-outcome-loader.ts +30 -111
- package/src/chronicle/lib/leaf-outcome-runtime.ts +3 -15
- package/src/chronicle/lib/result-presentation.ts +40 -0
- package/src/chronicle/lib/retry-groups.ts +24 -0
- package/src/chronicle/lib/scroll-sync.ts +1 -0
- package/src/chronicle/lib/tool-call-summary.ts +1 -9
- package/src/chronicle/ticket-selection.ts +23 -0
- package/src/components/ElapsedTime.svelte +31 -0
- package/src/components/ExternalLink.svelte +39 -0
- package/src/components/FormFieldRenderer.svelte +4 -1
- package/src/components/GenericLauncher.svelte +40 -15
- package/src/components/KeyboardShortcutsModal.svelte +2 -2
- package/src/components/LaunchChecklist.svelte +184 -0
- package/src/components/ModalShell.svelte +43 -32
- package/src/components/PageHeader.svelte +7 -33
- package/src/components/ProcessActionsMenu.svelte +217 -140
- package/src/components/ProcessInfoOverlay.svelte +13 -21
- package/src/components/ProgressChecklist.svelte +46 -0
- package/src/components/ProgressChecklistRows.svelte +80 -0
- package/src/components/launcher-form-copy.ts +4 -1
- package/src/components/launcher-model-config.ts +1 -1
- package/src/extension-ui-dev-server.ts +2 -5
- package/src/lib/api-tokens.ts +34 -0
- package/src/lib/api.ts +323 -455
- package/src/lib/elapsed-time.ts +19 -0
- package/src/lib/external-links.ts +81 -0
- package/src/lib/flow-layout.ts +1 -8
- package/src/lib/format.ts +3 -26
- package/src/lib/future-launch-detail.ts +1 -1
- package/src/lib/http-client.ts +79 -0
- package/src/lib/launch-updates.ts +17 -0
- package/src/lib/markdown.ts +8 -1
- package/src/lib/primary-path-detail.ts +97 -3
- package/src/lib/primary-path-replay.ts +13 -7
- package/src/lib/process-row-view.ts +1 -1
- package/src/lib/process-terminal-display.ts +4 -7
- package/src/lib/processes.svelte.ts +41 -9
- package/src/lib/reasoning-history.ts +95 -0
- package/src/lib/retry-config.svelte.ts +1 -1
- package/src/lib/rich-markdown-elements.ts +2 -2
- package/src/lib/router-logic.ts +3 -0
- package/src/lib/runtime-config.ts +1 -3
- package/src/lib/test-fixtures.ts +1 -1
- package/src/lib/tool-call-rendering.ts +4 -1
- package/src/lib/ui-extensions.svelte.ts +78 -127
- package/src/lib/ws-classifier.ts +8 -1
- package/src/pages/ApiTokensPage.svelte +213 -0
- package/src/pages/FutureLaunchDetailPage.svelte +7 -35
- package/src/pages/HomePage.svelte +7 -7
- package/src/pages/ProcessCard.svelte +1 -1
- package/src/pages/ProcessDetailPage.svelte +158 -62
- package/src/pages/ProcessGallery.svelte +1 -1
- package/src/pages/ProcessesPage.svelte +7 -42
- package/src/pages/SkillsPage.svelte +37 -26
- package/src/pages/WatchersPage.svelte +31 -53
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +125 -28
- package/src/pages/process-detail/ProcessDetailHeader.svelte +24 -2
- package/src/pages/process-detail/ProcessSummary.svelte +35 -0
- package/src/pages/process-detail/TicketCreationComposer.svelte +219 -0
- package/src/pages/process-detail/process-detail-action-drafts.svelte.ts +5 -5
- package/src/pages/process-detail/process-detail-actions.svelte.ts +4 -2
- package/src/pages/process-detail/process-detail-chronicle-dom.ts +39 -14
- package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +68 -10
- package/src/pages/process-detail/process-detail-view-model.ts +10 -24
- package/src/shell/AppShell.svelte +4 -1
- package/src/shell/Sidebar.svelte +88 -125
- package/src/styles/controls.css +188 -0
- package/dist/assets/ChronicleMarkdown-B1hD4HFS.js +0 -16
- package/dist/assets/ChronicleMarkdown-D6hFzERy.css +0 -1
- package/dist/assets/FutureLaunchDetailPage-Dy3FlLih.js +0 -1
- package/dist/assets/FutureLaunchDetailPage-UFgp7Ju4.css +0 -1
- package/dist/assets/GenericLauncher-BPEQjJ1J.js +0 -1
- package/dist/assets/GenericLauncher-D_GMtsQ5.css +0 -1
- package/dist/assets/HomePage-E41Krxko.js +0 -1
- package/dist/assets/PageHeader-DDgWPeHS.js +0 -1
- package/dist/assets/PageHeader-vhyfX7xT.css +0 -1
- package/dist/assets/ProcessActionsMenu-BWlFe5c4.css +0 -1
- package/dist/assets/ProcessActionsMenu-cI0j2LWe.js +0 -1
- package/dist/assets/ProcessDetailPage-DVHldJgi.js +0 -12
- package/dist/assets/ProcessDetailPage-Oh6ld320.css +0 -1
- package/dist/assets/ProcessFlowDiagram-C6m6V_cB.js +0 -2
- package/dist/assets/ProcessesPage-B2QGyCZO.js +0 -1
- package/dist/assets/ProcessesPage-BcM38HMs.css +0 -1
- package/dist/assets/ScheduleDateTimePicker-aey_oMiH.js +0 -1
- package/dist/assets/SkillsPage-MPITMvhn.css +0 -1
- package/dist/assets/SkillsPage-iB4sbq7r.js +0 -2
- package/dist/assets/WatchersPage-BOSgjtw0.css +0 -1
- package/dist/assets/WatchersPage-l0rwv-Nx.js +0 -1
- package/dist/assets/api-CtKbU0lT.js +0 -1
- package/dist/assets/dist-eOPUi0B8.js +0 -2
- package/dist/assets/index-B4flHG_s.js +0 -7
- package/dist/assets/index-DunTIQSW.css +0 -1
- package/dist/assets/index-client-CnG8mWmF.js +0 -2
- package/dist/assets/retry-config.svelte-WukHimiy.js +0 -1
- package/dist/assets/router.svelte-2RvxUvs5.js +0 -1
- package/src/lib/process-initial-prompt.ts +0 -7
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ProcessExternalTriggerSignal } from "@leitwerk-dev/protocol";
|
|
3
|
+
import type {
|
|
4
|
+
ProcessExternalTriggerSummary,
|
|
5
|
+
ProcessSelectedTurnSummary,
|
|
6
|
+
ScheduledActionDetail,
|
|
7
|
+
} from "@leitwerk-dev/protocol/http-contracts";
|
|
3
8
|
import { tick } from "svelte";
|
|
4
9
|
import ChronicleFlow from "../../chronicle/components/ChronicleFlow.svelte";
|
|
5
10
|
import ChronicleTerminalSummary from "../../chronicle/components/ChronicleTerminalSummary.svelte";
|
|
@@ -15,22 +20,24 @@ import {
|
|
|
15
20
|
moveChronicleAnchorByOffset,
|
|
16
21
|
resolveChronicleTurnRecordIdForAnchor,
|
|
17
22
|
} from "../../chronicle/lib/chronicle-selectable-items.js";
|
|
23
|
+
import type {
|
|
24
|
+
ChronicleTicketArtifact,
|
|
25
|
+
ChronicleTicketDraftArtifact,
|
|
26
|
+
} from "../../chronicle/lib/chronicle-ticket-artifact.js";
|
|
27
|
+
import { readTicketResultSelection } from "../../chronicle/ticket-selection.js";
|
|
18
28
|
import ModalShell from "../../components/ModalShell.svelte";
|
|
19
29
|
import ProcessActionsMenu from "../../components/ProcessActionsMenu.svelte";
|
|
20
|
-
import type {
|
|
21
|
-
ProcessDetailData,
|
|
22
|
-
ProcessExternalTriggerSummary,
|
|
23
|
-
ProcessSelectedTurnSummary,
|
|
24
|
-
ScheduledActionDetail,
|
|
25
|
-
} from "../../lib/api.js";
|
|
30
|
+
import type { ProcessDetailData } from "../../lib/api.js";
|
|
26
31
|
import { shouldIgnorePlainShortcut } from "../../lib/keyboard.js";
|
|
27
32
|
import type { ProcessTerminalStatus } from "../../lib/process-terminal-display.js";
|
|
28
33
|
import type { createProcessDetailActions } from "./process-detail-actions.svelte.js";
|
|
34
|
+
import { fitChronicleToViewport } from "./process-detail-chronicle-dom.js";
|
|
29
35
|
import { createProcessDetailChronicleScroll } from "./process-detail-chronicle-scroll.svelte.js";
|
|
30
36
|
import type {
|
|
31
37
|
CurrentProcessErrorViewModel,
|
|
32
38
|
CurrentTurnRecoveryViewModel,
|
|
33
39
|
} from "./process-detail-view-model.js";
|
|
40
|
+
import TicketCreationComposer from "./TicketCreationComposer.svelte";
|
|
34
41
|
|
|
35
42
|
interface Props {
|
|
36
43
|
instanceId: string;
|
|
@@ -47,6 +54,7 @@ interface Props {
|
|
|
47
54
|
externalTriggerSignals: readonly ProcessExternalTriggerSignal[];
|
|
48
55
|
selectedTurn?: ProcessSelectedTurnSummary | null;
|
|
49
56
|
recovery: CurrentTurnRecoveryViewModel | null;
|
|
57
|
+
startup: ProcessDetailData["startup"];
|
|
50
58
|
startupRecovery: ProcessDetailData["startupRecovery"];
|
|
51
59
|
processError: CurrentProcessErrorViewModel | null;
|
|
52
60
|
scheduledActionDetail: ScheduledActionDetail | null;
|
|
@@ -78,6 +86,7 @@ let {
|
|
|
78
86
|
externalTriggerSignals,
|
|
79
87
|
selectedTurn = null,
|
|
80
88
|
recovery,
|
|
89
|
+
startup,
|
|
81
90
|
startupRecovery,
|
|
82
91
|
processError,
|
|
83
92
|
scheduledActionDetail,
|
|
@@ -96,7 +105,22 @@ let {
|
|
|
96
105
|
|
|
97
106
|
let chronicleViewport: HTMLDivElement | null = $state(null);
|
|
98
107
|
let mobileQuickNavOpen = $state(false);
|
|
99
|
-
let
|
|
108
|
+
let ticketDraft = $state<ChronicleTicketDraftArtifact | null>(null);
|
|
109
|
+
let ticketSelectionDraft = $state<ChronicleTicketDraftArtifact | null>(null);
|
|
110
|
+
|
|
111
|
+
function openTicketComposer(artifact: ChronicleTicketArtifact) {
|
|
112
|
+
ticketDraft = { ...artifact };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function handleTicketSelection() {
|
|
116
|
+
const selected = readTicketResultSelection(window.getSelection());
|
|
117
|
+
if (!selected) return;
|
|
118
|
+
const [kind, id] = selected.artifactId.split(":", 2);
|
|
119
|
+
if (kind === "turn_result" && id)
|
|
120
|
+
ticketSelectionDraft = { kind, turnRecordId: id, excerpt: selected.text };
|
|
121
|
+
if (kind === "leaf_outcome" && id)
|
|
122
|
+
ticketSelectionDraft = { kind, leafEntryId: id, excerpt: selected.text };
|
|
123
|
+
}
|
|
100
124
|
|
|
101
125
|
const processLabel = $derived(
|
|
102
126
|
detail?.process.title ??
|
|
@@ -168,12 +192,10 @@ function moveActiveAnchorByOffset(offset: number) {
|
|
|
168
192
|
}
|
|
169
193
|
|
|
170
194
|
function openMobileQuickNav() {
|
|
171
|
-
restoreMobileQuickNavFocus = true;
|
|
172
195
|
mobileQuickNavOpen = true;
|
|
173
196
|
}
|
|
174
197
|
|
|
175
|
-
function closeMobileQuickNav(
|
|
176
|
-
restoreMobileQuickNavFocus = restoreFocus;
|
|
198
|
+
function closeMobileQuickNav() {
|
|
177
199
|
mobileQuickNavOpen = false;
|
|
178
200
|
}
|
|
179
201
|
|
|
@@ -183,7 +205,7 @@ function selectMobileQuickNavAnchor(anchorId: string) {
|
|
|
183
205
|
}
|
|
184
206
|
|
|
185
207
|
function openProcessInfoFromQuickNav() {
|
|
186
|
-
closeMobileQuickNav(
|
|
208
|
+
closeMobileQuickNav();
|
|
187
209
|
onToggleProcessInfo();
|
|
188
210
|
}
|
|
189
211
|
|
|
@@ -263,16 +285,21 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
263
285
|
|
|
264
286
|
<section
|
|
265
287
|
class="chronicle"
|
|
288
|
+
use:fitChronicleToViewport
|
|
266
289
|
data-column="chronicle"
|
|
267
290
|
aria-labelledby={headingId}
|
|
268
291
|
>
|
|
269
292
|
<h2 id={headingId} class="sr-only">Process timeline</h2>
|
|
293
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -- selection preserves native copy behavior -->
|
|
270
294
|
<div
|
|
271
295
|
class="chronicle-scroll"
|
|
272
296
|
bind:this={chronicleViewport}
|
|
273
297
|
data-role="chronicle-scroll"
|
|
298
|
+
role="region"
|
|
299
|
+
aria-label="Process results"
|
|
274
300
|
data-layout-observer-ready={chronicleScroll.isLayoutObserverReady ? "true" : undefined}
|
|
275
301
|
onscroll={chronicleScroll.handleScroll}
|
|
302
|
+
onmouseup={handleTicketSelection}
|
|
276
303
|
>
|
|
277
304
|
{#if launchWarning}
|
|
278
305
|
<div class="warning-banner" role="status">
|
|
@@ -308,7 +335,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
308
335
|
<div class="refresh-banner">{error} — showing the last process state we loaded.</div>
|
|
309
336
|
{/if}
|
|
310
337
|
|
|
311
|
-
{#if projection.timelineItems.length === 0 && !startupRecovery}
|
|
338
|
+
{#if projection.timelineItems.length === 0 && startup.attempts.length === 0 && !startupRecovery}
|
|
312
339
|
<div class="empty-state" data-section="chronicle-empty-state">
|
|
313
340
|
<p>
|
|
314
341
|
This process has not recorded activity yet. As the worker plans, acts, and saves results, the timeline will fill in here.
|
|
@@ -319,6 +346,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
319
346
|
{instanceId}
|
|
320
347
|
{projection}
|
|
321
348
|
questionRequests={detail.questionRequests}
|
|
349
|
+
toolApprovalRequests={detail.toolApprovalRequests}
|
|
322
350
|
activeAnchorId={chronicleScroll.activeAnchorId}
|
|
323
351
|
{definesLeafOutcome}
|
|
324
352
|
hasTerminalSummary={terminalSummaryStatus !== null}
|
|
@@ -330,6 +358,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
330
358
|
externalTriggerSignals={externalTriggerSignals}
|
|
331
359
|
selectedTurn={selectedTurn}
|
|
332
360
|
{recovery}
|
|
361
|
+
{startup}
|
|
333
362
|
{startupRecovery}
|
|
334
363
|
{processError}
|
|
335
364
|
scheduledAction={scheduledActionDetail && actionsController.editingScheduledActionId !== scheduledActionDetail.id
|
|
@@ -337,6 +366,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
337
366
|
: null}
|
|
338
367
|
modelConfiguration={detail.modelConfiguration}
|
|
339
368
|
onOpenReasoningDetails={onOpenReasoningDetails}
|
|
369
|
+
onDraftTicket={openTicketComposer}
|
|
340
370
|
/>
|
|
341
371
|
{/if}
|
|
342
372
|
|
|
@@ -355,6 +385,8 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
355
385
|
<CompactActionComposer
|
|
356
386
|
actionSectionController={actionsController}
|
|
357
387
|
onOpenDetails={openDetailedActionForm}
|
|
388
|
+
decisionTitle={selectedTurn?.description}
|
|
389
|
+
onViewContext={chronicleScroll.jumpToLatest}
|
|
358
390
|
/>
|
|
359
391
|
{:else if chronicleScroll.showJumpToLatest}
|
|
360
392
|
<button
|
|
@@ -369,6 +401,24 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
369
401
|
</section>
|
|
370
402
|
</div>
|
|
371
403
|
|
|
404
|
+
{#if ticketSelectionDraft}
|
|
405
|
+
<button
|
|
406
|
+
type="button"
|
|
407
|
+
class="ticket-selection-action"
|
|
408
|
+
data-pressable="true"
|
|
409
|
+
onclick={() => {
|
|
410
|
+
if (ticketSelectionDraft) openTicketComposer(ticketSelectionDraft);
|
|
411
|
+
ticketSelectionDraft = null;
|
|
412
|
+
}}
|
|
413
|
+
>Create issue</button>
|
|
414
|
+
{/if}
|
|
415
|
+
|
|
416
|
+
<TicketCreationComposer
|
|
417
|
+
{instanceId}
|
|
418
|
+
draft={ticketDraft}
|
|
419
|
+
onClose={() => (ticketDraft = null)}
|
|
420
|
+
/>
|
|
421
|
+
|
|
372
422
|
<ModalShell
|
|
373
423
|
open={mobileQuickNavOpen}
|
|
374
424
|
titleId="mobile-process-quick-nav-title"
|
|
@@ -377,14 +427,18 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
377
427
|
dataSection="mobile-process-quick-nav"
|
|
378
428
|
panelId="mobile-process-quick-nav"
|
|
379
429
|
presentation="bottom-sheet"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
430
|
+
width="min(100%, 560px)"
|
|
431
|
+
height="min(82svh, 720px)"
|
|
432
|
+
maxHeight="calc(100svh - max(48px, env(safe-area-inset-top)))"
|
|
433
|
+
initialFocusSelector="[aria-current='step']"
|
|
434
|
+
restoreFocusSelector="[data-action='open-mobile-quick-nav']"
|
|
384
435
|
>
|
|
436
|
+
<div class="mobile-quick-nav-handle" aria-hidden="true"></div>
|
|
385
437
|
<header class="mobile-quick-nav-header">
|
|
386
|
-
<
|
|
387
|
-
|
|
438
|
+
<div>
|
|
439
|
+
<h2 id="mobile-process-quick-nav-title">Process steps</h2>
|
|
440
|
+
<p>{activeQuickNavItem?.title ?? "Choose a step"}</p>
|
|
441
|
+
</div>
|
|
388
442
|
</header>
|
|
389
443
|
|
|
390
444
|
<div class="mobile-quick-nav-rail">
|
|
@@ -419,6 +473,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
419
473
|
lifecycleStatus={detail?.process.lifecycleStatus ?? null}
|
|
420
474
|
disabled={!detail}
|
|
421
475
|
hasSessionFile={detail?.session.signature !== null}
|
|
476
|
+
sessionTransfer={detail?.sessionTransfer ?? null}
|
|
422
477
|
{processLabel}
|
|
423
478
|
{onDeleted}
|
|
424
479
|
presentation="sheet"
|
|
@@ -428,6 +483,33 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
428
483
|
</ModalShell>
|
|
429
484
|
|
|
430
485
|
<style>
|
|
486
|
+
.ticket-selection-action {
|
|
487
|
+
min-height: 44px;
|
|
488
|
+
padding: 0 var(--space-md);
|
|
489
|
+
border-radius: 999px;
|
|
490
|
+
font: inherit;
|
|
491
|
+
font-size: var(--type-body-sm);
|
|
492
|
+
font-weight: 700;
|
|
493
|
+
cursor: pointer;
|
|
494
|
+
position: fixed;
|
|
495
|
+
z-index: 42;
|
|
496
|
+
right: var(--space-md);
|
|
497
|
+
bottom: var(--space-md);
|
|
498
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-accent) 30%, var(--chronicle-border) 70%);
|
|
499
|
+
background: var(--chronicle-text);
|
|
500
|
+
color: var(--chronicle-card-surface);
|
|
501
|
+
box-shadow: 0 10px 24px rgba(24, 33, 43, 0.12);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.ticket-selection-action:hover:not(:disabled) {
|
|
505
|
+
transform: translateY(-1px);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.ticket-selection-action:focus-visible {
|
|
509
|
+
outline: 2px solid var(--chronicle-accent);
|
|
510
|
+
outline-offset: 2px;
|
|
511
|
+
}
|
|
512
|
+
|
|
431
513
|
.mobile-quick-nav-trigger {
|
|
432
514
|
display: none;
|
|
433
515
|
}
|
|
@@ -442,6 +524,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
442
524
|
}
|
|
443
525
|
|
|
444
526
|
.desktop-turn-rail {
|
|
527
|
+
display: flex;
|
|
445
528
|
min-width: 0;
|
|
446
529
|
min-height: 0;
|
|
447
530
|
}
|
|
@@ -484,7 +567,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
484
567
|
|
|
485
568
|
.warning-title {
|
|
486
569
|
margin: 0 0 6px;
|
|
487
|
-
font-size:
|
|
570
|
+
font-size: var(--type-caption);
|
|
488
571
|
font-weight: 700;
|
|
489
572
|
letter-spacing: 0.08em;
|
|
490
573
|
text-transform: uppercase;
|
|
@@ -503,7 +586,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
503
586
|
border-radius: 999px;
|
|
504
587
|
background: color-mix(in srgb, white 92%, var(--chronicle-card-surface) 8%);
|
|
505
588
|
color: var(--chronicle-danger-text);
|
|
506
|
-
font-size:
|
|
589
|
+
font-size: var(--type-body-sm);
|
|
507
590
|
font-weight: 620;
|
|
508
591
|
cursor: pointer;
|
|
509
592
|
}
|
|
@@ -554,7 +637,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
554
637
|
background: var(--chronicle-panel-surface);
|
|
555
638
|
color: var(--chronicle-text);
|
|
556
639
|
font: inherit;
|
|
557
|
-
font-size:
|
|
640
|
+
font-size: var(--type-body-sm);
|
|
558
641
|
font-weight: 620;
|
|
559
642
|
cursor: pointer;
|
|
560
643
|
box-shadow: 0 10px 24px rgba(24, 33, 43, 0.08);
|
|
@@ -576,9 +659,13 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
576
659
|
max-height: min(72svh, 48rem);
|
|
577
660
|
}
|
|
578
661
|
|
|
579
|
-
|
|
662
|
+
.ticket-selection-action {
|
|
663
|
+
left: var(--space-sm);
|
|
664
|
+
right: var(--space-sm);
|
|
665
|
+
bottom: max(var(--space-sm), env(safe-area-inset-bottom));
|
|
666
|
+
width: calc(100% - (2 * var(--space-sm)));
|
|
667
|
+
}
|
|
580
668
|
|
|
581
|
-
@media (max-width: 720px) {
|
|
582
669
|
.mobile-quick-nav-trigger {
|
|
583
670
|
display: grid;
|
|
584
671
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
@@ -637,10 +724,20 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
637
724
|
display: none;
|
|
638
725
|
}
|
|
639
726
|
|
|
727
|
+
.mobile-quick-nav-handle {
|
|
728
|
+
width: 38px;
|
|
729
|
+
height: 4px;
|
|
730
|
+
margin: 0 auto 8px;
|
|
731
|
+
border-radius: 999px;
|
|
732
|
+
background: var(--chronicle-border-strong);
|
|
733
|
+
}
|
|
734
|
+
|
|
640
735
|
.mobile-quick-nav-header {
|
|
641
|
-
display:
|
|
642
|
-
|
|
643
|
-
|
|
736
|
+
display: flex;
|
|
737
|
+
align-items: center;
|
|
738
|
+
justify-content: space-between;
|
|
739
|
+
gap: var(--space-md);
|
|
740
|
+
padding: 4px 44px 12px 2px;
|
|
644
741
|
border-bottom: 1px solid var(--chronicle-border);
|
|
645
742
|
}
|
|
646
743
|
|
|
@@ -693,7 +790,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
693
790
|
|
|
694
791
|
.mobile-quick-nav-rail :global(.rail-track) {
|
|
695
792
|
flex-direction: column;
|
|
696
|
-
gap:
|
|
793
|
+
gap: var(--space-2xs);
|
|
697
794
|
width: 100%;
|
|
698
795
|
min-width: 0;
|
|
699
796
|
}
|
|
@@ -705,7 +802,7 @@ function handleWindowKeydown(event: KeyboardEvent) {
|
|
|
705
802
|
.mobile-quick-nav-rail :global(.rail-item) {
|
|
706
803
|
min-width: 0;
|
|
707
804
|
scroll-snap-align: none;
|
|
708
|
-
padding:
|
|
805
|
+
padding: var(--space-xs);
|
|
709
806
|
}
|
|
710
807
|
|
|
711
808
|
.mobile-quick-nav-utilities {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ProcessLifecycleStatus } from "@leitwerk-dev/domain";
|
|
3
|
+
import ExternalLink from "../../components/ExternalLink.svelte";
|
|
3
4
|
import PageHeader from "../../components/PageHeader.svelte";
|
|
4
5
|
import ProcessActionsMenu from "../../components/ProcessActionsMenu.svelte";
|
|
5
6
|
import type { ProcessDetailData } from "../../lib/api.js";
|
|
@@ -24,7 +25,15 @@ const header = $derived.by(() => {
|
|
|
24
25
|
const title = detail.process.title ?? detail.process.externalId ?? detail.process.id;
|
|
25
26
|
const processDisplayName =
|
|
26
27
|
detail.processDisplayName?.trim() || formatDefinition(detail.process.processId);
|
|
27
|
-
return {
|
|
28
|
+
return {
|
|
29
|
+
title,
|
|
30
|
+
processDisplayName: title === processDisplayName ? null : processDisplayName,
|
|
31
|
+
externalUrl: detail.process.externalUrl,
|
|
32
|
+
externalLabel:
|
|
33
|
+
detail.process.externalId && detail.process.externalId !== title
|
|
34
|
+
? `${title} (${detail.process.externalId})`
|
|
35
|
+
: title,
|
|
36
|
+
};
|
|
28
37
|
});
|
|
29
38
|
|
|
30
39
|
const status = $derived.by(() => {
|
|
@@ -50,6 +59,18 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
50
59
|
</script>
|
|
51
60
|
|
|
52
61
|
<PageHeader title={header.title} {titleId} compactOnMobile={true}>
|
|
62
|
+
{#snippet titleContent()}
|
|
63
|
+
{#if header.externalUrl}
|
|
64
|
+
<ExternalLink
|
|
65
|
+
href={header.externalUrl}
|
|
66
|
+
label={header.title}
|
|
67
|
+
resourceType="issue"
|
|
68
|
+
accessibleLabel={header.externalLabel}
|
|
69
|
+
/>
|
|
70
|
+
{:else}
|
|
71
|
+
<span>{header.title}</span>
|
|
72
|
+
{/if}
|
|
73
|
+
{/snippet}
|
|
53
74
|
{#snippet titleSuffix()}
|
|
54
75
|
{#if header.processDisplayName}
|
|
55
76
|
<span class="page-header-process-name"> · {header.processDisplayName}</span>
|
|
@@ -77,7 +98,7 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
77
98
|
<div class="desktop-process-controls">
|
|
78
99
|
<button
|
|
79
100
|
type="button"
|
|
80
|
-
class="page-header-button process-info-trigger"
|
|
101
|
+
class="ui-button page-header-button process-info-trigger"
|
|
81
102
|
data-pressable="true"
|
|
82
103
|
onclick={onToggleProcessInfo}
|
|
83
104
|
aria-expanded={isProcessInfoOpen}
|
|
@@ -91,6 +112,7 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
91
112
|
lifecycleStatus={detail?.process.lifecycleStatus ?? null}
|
|
92
113
|
disabled={!detail}
|
|
93
114
|
hasSessionFile={detail?.session.signature !== null}
|
|
115
|
+
sessionTransfer={detail?.sessionTransfer ?? null}
|
|
94
116
|
processLabel={header.title}
|
|
95
117
|
{onDeleted}
|
|
96
118
|
/>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
summary,
|
|
4
|
+
recordedAt,
|
|
5
|
+
onDismiss,
|
|
6
|
+
}: {
|
|
7
|
+
summary: string;
|
|
8
|
+
recordedAt?: string;
|
|
9
|
+
onDismiss: () => void;
|
|
10
|
+
} = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="process-summary" data-section="process-summary">
|
|
14
|
+
<div class="summary-copy">
|
|
15
|
+
<p>{summary}</p>
|
|
16
|
+
{#if recordedAt}<time datetime={recordedAt}>Updated {new Date(recordedAt).toLocaleString()}</time>{/if}
|
|
17
|
+
</div>
|
|
18
|
+
<button type="button" class="dismiss-summary" aria-label="Dismiss process summary" title="Hide for this process in this browser" onclick={onDismiss}>
|
|
19
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" aria-hidden="true"><path d="m6 6 12 12M18 6 6 18" /></svg>
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<style>
|
|
24
|
+
.process-summary { display: flex; align-items: flex-start; gap: var(--space-xs); flex-shrink: 0; min-width: 0; color: var(--chronicle-text-muted); font-size: var(--type-body-sm); line-height: 1.5; }
|
|
25
|
+
.summary-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-sm); flex: 1; min-width: 0; padding-block: 5px; }
|
|
26
|
+
p { margin: 0; overflow-wrap: anywhere; }
|
|
27
|
+
time { font-size: var(--type-caption); }
|
|
28
|
+
.dismiss-summary { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; cursor: pointer; }
|
|
29
|
+
.dismiss-summary:hover { color: var(--chronicle-text); }
|
|
30
|
+
.dismiss-summary:hover { background: var(--chronicle-panel-muted); }
|
|
31
|
+
.dismiss-summary:focus-visible { outline: 2px solid var(--chronicle-accent); outline-offset: 2px; }
|
|
32
|
+
@media (max-width: 540px) {
|
|
33
|
+
.dismiss-summary { width: 44px; height: 44px; }
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { TicketCreationToolSummary } from "@leitwerk-dev/protocol";
|
|
3
|
+
import type { FormFieldDefinition } from "@leitwerk-dev/protocol/form-contract";
|
|
4
|
+
import type { ChronicleTicketDraftArtifact } from "../../chronicle/lib/chronicle-ticket-artifact.js";
|
|
5
|
+
import FormFieldRenderer from "../../components/FormFieldRenderer.svelte";
|
|
6
|
+
import ModalShell from "../../components/ModalShell.svelte";
|
|
7
|
+
import { fetchTicketCreationTools, launchTicketCreation } from "../../lib/api.js";
|
|
8
|
+
import { buildProcessPath, navigate } from "../../lib/router.svelte.js";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
instanceId: string;
|
|
12
|
+
draft: ChronicleTicketDraftArtifact | null;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { instanceId, draft, onClose }: Props = $props();
|
|
17
|
+
let ticketTools = $state<TicketCreationToolSummary[]>([]);
|
|
18
|
+
let ticketToolsLoading = $state(false);
|
|
19
|
+
let ticketToolLoadRequest = $state(0);
|
|
20
|
+
let selectedTicketTool = $state("");
|
|
21
|
+
let ticketInstructions = $state("");
|
|
22
|
+
let ticketError = $state<string | null>(null);
|
|
23
|
+
let ticketLaunching = $state(false);
|
|
24
|
+
|
|
25
|
+
const ticketInstructionsField: FormFieldDefinition<"textarea"> = {
|
|
26
|
+
id: "ticket-instructions",
|
|
27
|
+
label: "What issue should be created?",
|
|
28
|
+
kind: "textarea",
|
|
29
|
+
placeholder: "Describe the problem, expected outcome, and any important constraints.",
|
|
30
|
+
};
|
|
31
|
+
const ticketToolField: FormFieldDefinition<"select"> = {
|
|
32
|
+
id: "ticket-tool",
|
|
33
|
+
label: "Ticket system",
|
|
34
|
+
kind: "select",
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
$effect(() => {
|
|
38
|
+
if (!draft) return;
|
|
39
|
+
void ticketToolLoadRequest;
|
|
40
|
+
ticketTools = [];
|
|
41
|
+
selectedTicketTool = "";
|
|
42
|
+
let cancelled = false;
|
|
43
|
+
ticketError = null;
|
|
44
|
+
ticketToolsLoading = true;
|
|
45
|
+
void fetchTicketCreationTools()
|
|
46
|
+
.then((tools) => {
|
|
47
|
+
if (cancelled) return;
|
|
48
|
+
ticketTools = tools;
|
|
49
|
+
selectedTicketTool = tools.length === 1 ? (tools[0]?.name ?? "") : "";
|
|
50
|
+
})
|
|
51
|
+
.catch((reason) => {
|
|
52
|
+
if (!cancelled) ticketError = reason instanceof Error ? reason.message : String(reason);
|
|
53
|
+
})
|
|
54
|
+
.finally(() => {
|
|
55
|
+
if (!cancelled) ticketToolsLoading = false;
|
|
56
|
+
});
|
|
57
|
+
return () => {
|
|
58
|
+
cancelled = true;
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
function close() {
|
|
63
|
+
ticketInstructions = "";
|
|
64
|
+
ticketError = null;
|
|
65
|
+
onClose();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function submitTicketDraft() {
|
|
69
|
+
if (!draft || !selectedTicketTool) return;
|
|
70
|
+
ticketLaunching = true;
|
|
71
|
+
ticketError = null;
|
|
72
|
+
try {
|
|
73
|
+
const result = await launchTicketCreation(instanceId, {
|
|
74
|
+
artifact:
|
|
75
|
+
draft.kind === "turn_result"
|
|
76
|
+
? { kind: "turn_result", turnRecordId: draft.turnRecordId }
|
|
77
|
+
: { kind: "leaf_outcome", leafEntryId: draft.leafEntryId },
|
|
78
|
+
focus: draft.excerpt ? { kind: "excerpt", excerpt: draft.excerpt } : { kind: "whole_result" },
|
|
79
|
+
additionalInstructions: ticketInstructions.trim(),
|
|
80
|
+
toolName: selectedTicketTool,
|
|
81
|
+
});
|
|
82
|
+
close();
|
|
83
|
+
navigate(buildProcessPath(result.childInstanceId));
|
|
84
|
+
} catch (reason) {
|
|
85
|
+
ticketError = reason instanceof Error ? reason.message : String(reason);
|
|
86
|
+
} finally {
|
|
87
|
+
ticketLaunching = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<ModalShell
|
|
93
|
+
open={draft !== null}
|
|
94
|
+
titleId="ticket-composer-title"
|
|
95
|
+
closeLabel="Close issue creator"
|
|
96
|
+
onClose={close}
|
|
97
|
+
dataSection="ticket-composer"
|
|
98
|
+
panelId="ticket-composer"
|
|
99
|
+
width="min(100% - 32px, 520px)"
|
|
100
|
+
maxHeight="min(85dvh, 620px)"
|
|
101
|
+
initialFocusSelector="textarea"
|
|
102
|
+
dismissible={!ticketLaunching}
|
|
103
|
+
>
|
|
104
|
+
<header class="ticket-composer-header">
|
|
105
|
+
<h2 id="ticket-composer-title">Create issue</h2>
|
|
106
|
+
<p>Start an issue draft from this result. You’ll review it before it is published.</p>
|
|
107
|
+
</header>
|
|
108
|
+
<div class="ticket-composer-body">
|
|
109
|
+
{#if draft?.excerpt}
|
|
110
|
+
<details class="ticket-source"><summary>Selected text</summary><blockquote>{draft.excerpt}</blockquote></details>
|
|
111
|
+
{:else}
|
|
112
|
+
<p class="ticket-source-note">The full result will be included as context.</p>
|
|
113
|
+
{/if}
|
|
114
|
+
<FormFieldRenderer
|
|
115
|
+
field={ticketInstructionsField}
|
|
116
|
+
id="ticket-instructions"
|
|
117
|
+
value={ticketInstructions}
|
|
118
|
+
textareaRows={6}
|
|
119
|
+
onValueChange={(_, value) => (ticketInstructions = String(value))}
|
|
120
|
+
/>
|
|
121
|
+
{#if ticketToolsLoading}
|
|
122
|
+
<p class="ticket-composer-state" role="status">Loading ticket systems…</p>
|
|
123
|
+
{:else if ticketTools.length > 1}
|
|
124
|
+
<FormFieldRenderer
|
|
125
|
+
field={ticketToolField}
|
|
126
|
+
id="ticket-tool"
|
|
127
|
+
value={selectedTicketTool}
|
|
128
|
+
options={ticketTools.map((tool) => ({ value: tool.name, label: tool.displayName }))}
|
|
129
|
+
onValueChange={(_, value) => (selectedTicketTool = String(value))}
|
|
130
|
+
/>
|
|
131
|
+
{:else if ticketTools.length === 1}
|
|
132
|
+
<p class="ticket-source-note">Ticket system: {ticketTools[0].displayName}</p>
|
|
133
|
+
{:else if ticketTools.length === 0 && !ticketError}
|
|
134
|
+
<p class="ticket-composer-state">No ticket system is available. Ask your administrator to configure one before creating an issue.</p>
|
|
135
|
+
{/if}
|
|
136
|
+
{#if ticketError}
|
|
137
|
+
<div class="ticket-composer-error" role="alert">
|
|
138
|
+
<p>{ticketError}</p>
|
|
139
|
+
{#if ticketTools.length === 0}<button type="button" class="ui-button" onclick={() => ticketToolLoadRequest++}>Try again</button>{/if}
|
|
140
|
+
</div>
|
|
141
|
+
{/if}
|
|
142
|
+
</div>
|
|
143
|
+
<footer class="ticket-composer-actions">
|
|
144
|
+
<button type="button" class="ui-button" data-pressable="true" disabled={ticketLaunching} onclick={close}>Cancel</button>
|
|
145
|
+
<button
|
|
146
|
+
type="button"
|
|
147
|
+
class="ui-button" data-variant="primary"
|
|
148
|
+
data-pressable="true"
|
|
149
|
+
disabled={!ticketInstructions.trim() || !selectedTicketTool || ticketLaunching || ticketToolsLoading}
|
|
150
|
+
onclick={submitTicketDraft}
|
|
151
|
+
>{ticketLaunching ? "Starting draft…" : "Draft issue"}</button>
|
|
152
|
+
</footer>
|
|
153
|
+
</ModalShell>
|
|
154
|
+
|
|
155
|
+
<style>
|
|
156
|
+
.ticket-composer-header {
|
|
157
|
+
display: grid;
|
|
158
|
+
gap: 6px;
|
|
159
|
+
padding-right: var(--space-2xl);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ticket-composer-header h2,
|
|
163
|
+
.ticket-composer-header p,
|
|
164
|
+
.ticket-composer-state,
|
|
165
|
+
.ticket-composer-error {
|
|
166
|
+
margin: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ticket-composer-header h2 {
|
|
170
|
+
font-size: var(--type-title-md);
|
|
171
|
+
line-height: 1.2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ticket-composer-header p {
|
|
175
|
+
max-width: 44ch;
|
|
176
|
+
color: var(--chronicle-text-muted);
|
|
177
|
+
font-size: var(--type-body-sm);
|
|
178
|
+
line-height: 1.5;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ticket-composer-body {
|
|
182
|
+
display: grid;
|
|
183
|
+
gap: var(--space-md);
|
|
184
|
+
min-width: 0;
|
|
185
|
+
overflow-y: auto;
|
|
186
|
+
padding: 2px;
|
|
187
|
+
scrollbar-color: var(--chronicle-border-strong) transparent;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.ticket-composer-state,
|
|
191
|
+
.ticket-composer-error {
|
|
192
|
+
padding: var(--space-sm);
|
|
193
|
+
border-radius: 10px;
|
|
194
|
+
background: var(--chronicle-panel-muted);
|
|
195
|
+
color: var(--chronicle-text-muted);
|
|
196
|
+
font-size: var(--type-body-sm);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.ticket-composer-error {
|
|
200
|
+
border: 1px solid var(--chronicle-danger-border);
|
|
201
|
+
background: var(--chronicle-danger-surface-soft);
|
|
202
|
+
color: var(--chronicle-danger-text-strong);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ticket-composer-actions {
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: flex-end;
|
|
208
|
+
gap: var(--space-xs);
|
|
209
|
+
padding-top: var(--space-xs);
|
|
210
|
+
border-top: 1px solid var(--chronicle-border);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ticket-source-note, .ticket-source { margin: 0; font-size: var(--type-body-sm); line-height: 1.5; color: var(--chronicle-text-muted); }
|
|
214
|
+
.ticket-source summary { padding: var(--space-xs) 0; cursor: pointer; }
|
|
215
|
+
.ticket-source blockquote { margin: var(--space-xs) 0 0; padding: var(--space-sm); border-radius: var(--radius-sm); background: var(--chronicle-panel-muted); max-height: 140px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
216
|
+
.ticket-composer-error { display: grid; gap: var(--space-sm); }
|
|
217
|
+
.ticket-composer-error p { margin: 0; }
|
|
218
|
+
.ticket-composer-actions { flex-wrap: wrap; flex-shrink: 0; }
|
|
219
|
+
</style>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProcessActionFieldDefinition,
|
|
3
|
+
ProcessActionSummary,
|
|
4
|
+
ScheduledActionDetail,
|
|
5
|
+
} from "@leitwerk-dev/protocol/http-contracts";
|
|
1
6
|
import type { ActionScheduledAtLocalParts } from "../../chronicle/lib/action-bindings.js";
|
|
2
7
|
import {
|
|
3
8
|
currentLocalScheduleDateTimeParts,
|
|
4
9
|
isoToLocalScheduleDateTimeParts,
|
|
5
10
|
splitLauncherScheduleTimeString,
|
|
6
11
|
} from "../../components/launcher-schedule.js";
|
|
7
|
-
import type {
|
|
8
|
-
ProcessActionFieldDefinition,
|
|
9
|
-
ProcessActionSummary,
|
|
10
|
-
ScheduledActionDetail,
|
|
11
|
-
} from "../../lib/api.js";
|
|
12
12
|
|
|
13
13
|
interface ActionDraft {
|
|
14
14
|
fields?: Record<string, string | number | boolean>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProcessActionModelPreview,
|
|
3
|
+
ProcessActionSummary,
|
|
4
|
+
} from "@leitwerk-dev/protocol/http-contracts";
|
|
1
5
|
import { findQuickActionField } from "../../chronicle/lib/action-bindings.js";
|
|
2
6
|
import {
|
|
3
7
|
buildLauncherScheduleTimeString,
|
|
@@ -6,8 +10,6 @@ import {
|
|
|
6
10
|
import {
|
|
7
11
|
deleteFutureExecution,
|
|
8
12
|
fetchProcessActionModelPreview,
|
|
9
|
-
type ProcessActionModelPreview,
|
|
10
|
-
type ProcessActionSummary,
|
|
11
13
|
type ProcessDetailData,
|
|
12
14
|
postProcessAbortTurn,
|
|
13
15
|
postProcessAction,
|