@leitwerk-dev/ui 0.1.8 → 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-4Q7aqPBl.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 +41 -2
- 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 +135 -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 +99 -262
- 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 +209 -282
- package/src/chronicle/components/ChronicleTurnDetailsButton.svelte +16 -0
- package/src/chronicle/components/ChronicleTurnProgress.svelte +94 -0
- package/src/chronicle/components/ChronicleTurnRail.svelte +339 -394
- 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 +135 -108
- 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 +49 -15
- package/src/components/PageHeader.svelte +36 -35
- package/src/components/ProcessActionsMenu.svelte +247 -138
- 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 +330 -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 +8 -38
- package/src/pages/HomePage.svelte +8 -11
- package/src/pages/ProcessCard.svelte +1 -1
- package/src/pages/ProcessDetailPage.svelte +161 -62
- package/src/pages/ProcessGallery.svelte +1 -3
- package/src/pages/ProcessesPage.svelte +7 -42
- package/src/pages/SkillsPage.svelte +32 -24
- package/src/pages/WatchersPage.svelte +31 -55
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +415 -19
- package/src/pages/process-detail/ProcessDetailHeader.svelte +66 -25
- 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 -23
- package/src/shell/AppShell.svelte +260 -6
- package/src/shell/RouteLoadBoundary.svelte +48 -12
- package/src/shell/Sidebar.svelte +304 -172
- package/src/styles/controls.css +188 -0
- package/dist/assets/ChronicleMarkdown-D6hFzERy.css +0 -1
- package/dist/assets/ChronicleMarkdown-iH1VLv7x.js +0 -16
- package/dist/assets/FutureLaunchDetailPage-BJphZBFH.js +0 -1
- package/dist/assets/FutureLaunchDetailPage-VPMBtpYc.css +0 -1
- package/dist/assets/GenericLauncher-D_GMtsQ5.css +0 -1
- package/dist/assets/GenericLauncher-tr1to52a.js +0 -1
- package/dist/assets/HomePage-CSHVQefI.js +0 -1
- package/dist/assets/HomePage-DYh_QHXv.css +0 -1
- package/dist/assets/PageHeader-6PdvYODN.css +0 -1
- package/dist/assets/PageHeader-C4j3zJKF.js +0 -1
- package/dist/assets/ProcessActionsMenu-BT2r9vO8.css +0 -1
- package/dist/assets/ProcessActionsMenu-gNiZGUCZ.js +0 -1
- package/dist/assets/ProcessDetailPage-CGyVxjeH.js +0 -12
- package/dist/assets/ProcessDetailPage-CSrjzajF.css +0 -1
- package/dist/assets/ProcessFlowDiagram-BX_Zjm2n.js +0 -2
- package/dist/assets/ProcessesPage-BcM38HMs.css +0 -1
- package/dist/assets/ProcessesPage-D3jjufse.js +0 -1
- package/dist/assets/ScheduleDateTimePicker-D72J6EhE.js +0 -1
- package/dist/assets/SkillsPage-B30FAFia.css +0 -1
- package/dist/assets/SkillsPage-CcYm4ATy.js +0 -2
- package/dist/assets/WatchersPage-Bac86WLp.js +0 -1
- package/dist/assets/WatchersPage-Dnfi1zUK.css +0 -1
- package/dist/assets/api-HGtUzekR.js +0 -1
- package/dist/assets/dist-DVNpSD5l.js +0 -2
- package/dist/assets/index-66T4Gmbl.css +0 -1
- package/dist/assets/index-ChVsVf6R.js +0 -7
- package/dist/assets/index-client-BqF3_t3P.js +0 -2
- package/dist/assets/retry-config.svelte-DFKCJtCe.js +0 -1
- package/dist/assets/router.svelte-C2wi6I7k.js +0 -1
- package/src/lib/process-initial-prompt.ts +0 -7
|
@@ -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(() => {
|
|
@@ -49,7 +58,19 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
49
58
|
}
|
|
50
59
|
</script>
|
|
51
60
|
|
|
52
|
-
<PageHeader title={header.title} {titleId}>
|
|
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>
|
|
@@ -74,25 +95,28 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
74
95
|
{status.label}
|
|
75
96
|
</span>
|
|
76
97
|
{/if}
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
<div class="desktop-process-controls">
|
|
99
|
+
<button
|
|
100
|
+
type="button"
|
|
101
|
+
class="ui-button page-header-button process-info-trigger"
|
|
102
|
+
data-pressable="true"
|
|
103
|
+
onclick={onToggleProcessInfo}
|
|
104
|
+
aria-expanded={isProcessInfoOpen}
|
|
105
|
+
aria-controls="process-info-overlay"
|
|
106
|
+
disabled={!detail}
|
|
107
|
+
>
|
|
108
|
+
Process info
|
|
109
|
+
</button>
|
|
110
|
+
<ProcessActionsMenu
|
|
111
|
+
{instanceId}
|
|
112
|
+
lifecycleStatus={detail?.process.lifecycleStatus ?? null}
|
|
113
|
+
disabled={!detail}
|
|
114
|
+
hasSessionFile={detail?.session.signature !== null}
|
|
115
|
+
sessionTransfer={detail?.sessionTransfer ?? null}
|
|
116
|
+
processLabel={header.title}
|
|
117
|
+
{onDeleted}
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
96
120
|
{/snippet}
|
|
97
121
|
</PageHeader>
|
|
98
122
|
|
|
@@ -157,11 +181,28 @@ function processStatusMark(status: ProcessLifecycleStatus): string {
|
|
|
157
181
|
font-weight: 520;
|
|
158
182
|
}
|
|
159
183
|
|
|
184
|
+
.desktop-process-controls {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: var(--space-xs);
|
|
188
|
+
}
|
|
189
|
+
|
|
160
190
|
@media (max-width: 720px) {
|
|
161
|
-
.process-
|
|
162
|
-
.process-
|
|
163
|
-
|
|
164
|
-
|
|
191
|
+
.desktop-process-controls,
|
|
192
|
+
.page-header-process-name {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.process-header-status {
|
|
197
|
+
gap: 5px;
|
|
198
|
+
padding: 0;
|
|
199
|
+
font-size: var(--type-caption);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.process-header-status-mark {
|
|
203
|
+
width: 16px;
|
|
204
|
+
height: 16px;
|
|
205
|
+
font-size: var(--type-label);
|
|
165
206
|
}
|
|
166
207
|
}
|
|
167
208
|
</style>
|
|
@@ -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,
|
|
@@ -84,19 +84,44 @@ export function resolveScrollTargetLayout(
|
|
|
84
84
|
if (!(anchorElement instanceof HTMLElement) || !viewport.contains(anchorElement)) {
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
87
|
+
const isTurn = anchorElement.dataset.section === "chronicle-turn";
|
|
88
|
+
const candidates = [
|
|
89
|
+
[anchorElement.querySelector<HTMLElement>("[data-action-form-id]"), "start"],
|
|
90
|
+
[
|
|
91
|
+
isTurn ? anchorElement.querySelector<HTMLElement>('[data-section="turn-result"]') : null,
|
|
92
|
+
"start",
|
|
93
|
+
],
|
|
94
|
+
[anchorElement, isTurn ? "start" : "focus"],
|
|
95
|
+
] as const;
|
|
96
|
+
for (const [element, align] of candidates) {
|
|
97
|
+
const layout = element ? readScrollableElementLayout(viewport, element) : null;
|
|
98
|
+
if (layout) return { ...layout, align };
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Keep the narrow chronicle and its composer inside the visible viewport. */
|
|
104
|
+
export function fitChronicleToViewport(element: HTMLElement) {
|
|
105
|
+
const resize = () => {
|
|
106
|
+
if (window.innerWidth > 1024) {
|
|
107
|
+
element.style.removeProperty("max-height");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const viewport = window.visualViewport;
|
|
111
|
+
const bottom = viewport ? viewport.height + viewport.offsetTop : window.innerHeight;
|
|
112
|
+
const available = bottom - element.getBoundingClientRect().top - 14;
|
|
113
|
+
element.style.maxHeight = `${Math.max(240, available)}px`;
|
|
114
|
+
};
|
|
115
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(resize);
|
|
116
|
+
if (element.parentElement?.parentElement) observer?.observe(element.parentElement.parentElement);
|
|
117
|
+
window.addEventListener("resize", resize);
|
|
118
|
+
window.visualViewport?.addEventListener("resize", resize);
|
|
119
|
+
resize();
|
|
120
|
+
return {
|
|
121
|
+
destroy() {
|
|
122
|
+
observer?.disconnect();
|
|
123
|
+
window.removeEventListener("resize", resize);
|
|
124
|
+
window.visualViewport?.removeEventListener("resize", resize);
|
|
125
|
+
},
|
|
126
|
+
};
|
|
102
127
|
}
|
|
@@ -154,6 +154,12 @@ function observeChronicleLayoutInvalidation(
|
|
|
154
154
|
export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleScrollArgs) {
|
|
155
155
|
let activeAnchorId = $state<string | null>(null);
|
|
156
156
|
let activeAnchorOverrideId = $state<string | null>(null);
|
|
157
|
+
let observedViewportLayout: {
|
|
158
|
+
viewport: HTMLDivElement;
|
|
159
|
+
width: number;
|
|
160
|
+
scrollTop: number;
|
|
161
|
+
} | null = null;
|
|
162
|
+
let reflowScrollTop: number | null = null;
|
|
157
163
|
let isNearBottom = $state(true);
|
|
158
164
|
let isViewportAboveOpenActionForm = $state(false);
|
|
159
165
|
let observedProcessId = $state<string | null>(null);
|
|
@@ -169,10 +175,6 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
169
175
|
let pendingToastFocus = $state<PendingProcessToastFocus | null>(null);
|
|
170
176
|
|
|
171
177
|
const activeAnchorSyncScheduler = createTimeoutScheduler(syncActiveAnchorFromViewportNow);
|
|
172
|
-
const programmaticScrollResetScheduler = createTimeoutScheduler(() => {
|
|
173
|
-
isProgrammaticChronicleScroll = false;
|
|
174
|
-
programmaticChronicleScrollTargetTop = null;
|
|
175
|
-
});
|
|
176
178
|
const chronicleLayoutScheduler = createFrameScheduler(runChronicleLayoutPass);
|
|
177
179
|
const initialBottomPinScheduler = createFrameScheduler(() => continueInitialBottomPin());
|
|
178
180
|
|
|
@@ -216,6 +218,8 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
216
218
|
}
|
|
217
219
|
if (observedProcessId !== processId) {
|
|
218
220
|
observedProcessId = processId;
|
|
221
|
+
observedViewportLayout = null;
|
|
222
|
+
reflowScrollTop = null;
|
|
219
223
|
activeAnchorId = null;
|
|
220
224
|
activeAnchorOverrideId = null;
|
|
221
225
|
hasObservedManualChronicleScroll = false;
|
|
@@ -381,7 +385,6 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
381
385
|
$effect(() => {
|
|
382
386
|
return () => {
|
|
383
387
|
activeAnchorSyncScheduler.cancel();
|
|
384
|
-
programmaticScrollResetScheduler.cancel();
|
|
385
388
|
chronicleLayoutScheduler.cancel();
|
|
386
389
|
stopInitialBottomPin();
|
|
387
390
|
};
|
|
@@ -512,6 +515,13 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
512
515
|
return args.projection.promptItem.anchorId;
|
|
513
516
|
}
|
|
514
517
|
const atBottom = isAtChronicleBottom(viewportMetrics, 40);
|
|
518
|
+
if (viewportMetrics.scrollTop <= 5 && !atBottom) {
|
|
519
|
+
return resolveChronicleRailAnchorIdFromActiveAnchor(
|
|
520
|
+
args.projection,
|
|
521
|
+
args.railItems,
|
|
522
|
+
nextAnchorLayouts[0]?.anchorId ?? null,
|
|
523
|
+
);
|
|
524
|
+
}
|
|
515
525
|
const pendingRailItem = args.railItems.find(
|
|
516
526
|
(item) => item.anchorId === CHRONICLE_ACTION_SECTION_ANCHOR_ID,
|
|
517
527
|
);
|
|
@@ -529,12 +539,34 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
529
539
|
);
|
|
530
540
|
}
|
|
531
541
|
|
|
542
|
+
function observeViewportLayout(viewport: HTMLDivElement) {
|
|
543
|
+
const previous = observedViewportLayout;
|
|
544
|
+
if (
|
|
545
|
+
previous?.viewport === viewport &&
|
|
546
|
+
previous.width !== viewport.clientWidth &&
|
|
547
|
+
!isInitializingToBottom &&
|
|
548
|
+
!shouldFollowLiveTail
|
|
549
|
+
) {
|
|
550
|
+
activeAnchorOverrideId ??= activeAnchorId;
|
|
551
|
+
// Ignore only the scroll caused by reflow, not the next manual scroll after a resize.
|
|
552
|
+
reflowScrollTop = previous.scrollTop !== viewport.scrollTop ? viewport.scrollTop : null;
|
|
553
|
+
} else if (previous?.viewport !== viewport) {
|
|
554
|
+
reflowScrollTop = null;
|
|
555
|
+
}
|
|
556
|
+
observedViewportLayout = {
|
|
557
|
+
viewport,
|
|
558
|
+
width: viewport.clientWidth,
|
|
559
|
+
scrollTop: viewport.scrollTop,
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
|
|
532
563
|
function syncActiveAnchorFromViewportNow() {
|
|
533
564
|
const viewport = args.viewport;
|
|
534
565
|
if (!viewport) {
|
|
535
566
|
activeAnchorId = null;
|
|
536
567
|
return;
|
|
537
568
|
}
|
|
569
|
+
observeViewportLayout(viewport);
|
|
538
570
|
const viewportMetrics = {
|
|
539
571
|
scrollTop: viewport.scrollTop,
|
|
540
572
|
clientHeight: viewport.clientHeight,
|
|
@@ -563,7 +595,6 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
563
595
|
function markProgrammaticChronicleScroll(targetTop: number | null = null) {
|
|
564
596
|
isProgrammaticChronicleScroll = true;
|
|
565
597
|
programmaticChronicleScrollTargetTop = targetTop;
|
|
566
|
-
programmaticScrollResetScheduler.schedule({ force: true });
|
|
567
598
|
}
|
|
568
599
|
|
|
569
600
|
function pinChronicleToBottomNow() {
|
|
@@ -626,6 +657,17 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
626
657
|
}
|
|
627
658
|
|
|
628
659
|
function scrollToAnchor(anchorId: string, behavior: ScrollBehavior = "auto") {
|
|
660
|
+
const anchor = document.getElementById(anchorId);
|
|
661
|
+
const collapsedBody =
|
|
662
|
+
anchor?.closest(".turn-body[hidden]") ?? anchor?.querySelector(".turn-body[hidden]");
|
|
663
|
+
const failureToggle = collapsedBody?.parentElement?.querySelector<HTMLButtonElement>(
|
|
664
|
+
'[data-action="toggle-failed-turn"][aria-expanded="false"]',
|
|
665
|
+
);
|
|
666
|
+
if (failureToggle) {
|
|
667
|
+
failureToggle.click();
|
|
668
|
+
void tick().then(() => scrollToAnchor(anchorId, behavior));
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
629
671
|
const viewport = args.viewport;
|
|
630
672
|
if (!viewport) {
|
|
631
673
|
return false;
|
|
@@ -645,12 +687,11 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
645
687
|
setViewportScrollTop(viewport, top, behavior);
|
|
646
688
|
return shouldScroll;
|
|
647
689
|
}
|
|
648
|
-
|
|
649
|
-
if (!element) {
|
|
690
|
+
if (!anchor) {
|
|
650
691
|
return false;
|
|
651
692
|
}
|
|
652
693
|
markProgrammaticChronicleScroll();
|
|
653
|
-
|
|
694
|
+
anchor.scrollIntoView?.({ behavior, block: "end" });
|
|
654
695
|
return true;
|
|
655
696
|
}
|
|
656
697
|
|
|
@@ -665,23 +706,40 @@ export function createProcessDetailChronicleScroll(args: ProcessDetailChronicleS
|
|
|
665
706
|
const targetAnchorId = activeItem.anchorId;
|
|
666
707
|
activeAnchorOverrideId = targetAnchorId;
|
|
667
708
|
activeAnchorId = targetAnchorId;
|
|
709
|
+
// Reveal historical attempts before measuring their scroll position.
|
|
710
|
+
let ancestor = document.getElementById(targetAnchorId)?.parentElement;
|
|
711
|
+
while (ancestor) {
|
|
712
|
+
if (ancestor instanceof HTMLDetailsElement) ancestor.open = true;
|
|
713
|
+
ancestor = ancestor.parentElement;
|
|
714
|
+
}
|
|
668
715
|
scrollToAnchor(targetAnchorId, "auto");
|
|
669
716
|
syncActiveAnchorFromViewportNow();
|
|
670
717
|
scheduleActiveAnchorSync({ force: true });
|
|
671
718
|
}
|
|
672
719
|
|
|
673
720
|
function handleScroll() {
|
|
721
|
+
if (args.viewport) observeViewportLayout(args.viewport);
|
|
674
722
|
const viewportMetrics = getChronicleViewportMetrics(args.viewport);
|
|
675
723
|
const isProgrammaticScrollAtTarget =
|
|
676
724
|
isProgrammaticChronicleScroll &&
|
|
677
725
|
viewportMetrics !== null &&
|
|
678
726
|
(programmaticChronicleScrollTargetTop === null ||
|
|
679
727
|
Math.abs(viewportMetrics.scrollTop - programmaticChronicleScrollTargetTop) <= 1);
|
|
680
|
-
|
|
728
|
+
const isReflowScroll =
|
|
729
|
+
reflowScrollTop !== null && viewportMetrics?.scrollTop === reflowScrollTop;
|
|
730
|
+
reflowScrollTop = null;
|
|
731
|
+
if (!isProgrammaticScrollAtTarget && !isReflowScroll) {
|
|
732
|
+
// Scroll events can arrive after a zero-delay timer in Firefox. Keep the
|
|
733
|
+
// selected rail item until the viewport actually leaves our target.
|
|
734
|
+
isProgrammaticChronicleScroll = false;
|
|
735
|
+
programmaticChronicleScrollTargetTop = null;
|
|
681
736
|
activeAnchorOverrideId = null;
|
|
682
737
|
hasObservedManualChronicleScroll = true;
|
|
683
738
|
stopInitialBottomPin();
|
|
684
739
|
}
|
|
740
|
+
if (isProgrammaticScrollAtTarget && programmaticChronicleScrollTargetTop === null) {
|
|
741
|
+
isProgrammaticChronicleScroll = false;
|
|
742
|
+
}
|
|
685
743
|
if (viewportMetrics) {
|
|
686
744
|
isNearBottom = isNearChronicleBottom(viewportMetrics);
|
|
687
745
|
updateOpenActionFormViewportPosition(viewportMetrics);
|