fix: show resumed workflow ID in splash screen URL

When resuming a workflow, the Temporal Web UI link pointed to the old
(terminated) workflow ID. Now extracts "New Workflow ID" from the resume
header in workflow.log, falling back to the original ID for fresh scans.
This commit is contained in:
ezl-keygraph
2026-03-16 17:21:23 +05:30
parent de8b7c368d
commit 117a9d859d
+4 -5
View File
@@ -131,11 +131,10 @@ export function start(args: StartArgs): void {
clearInterval(pollInterval);
started = true;
// Extract workflow ID
const match = /^Workflow ID: (.+)$/m.exec(content);
if (match?.[1]) {
workflowId = match[1];
}
// Extract workflow ID (use latest resumed workflow ID, or original for fresh scans)
const resumeMatches = [...content.matchAll(/^New Workflow ID:\s+(.+)$/gm)];
const originalMatch = /^Workflow ID: (.+)$/m.exec(content);
workflowId = resumeMatches.at(-1)?.[1] ?? originalMatch?.[1] ?? '';
// Clear waiting line and show info
process.stdout.write('\r\x1b[K');