diff --git a/src/lib/components/event/event-detail-pills.svelte b/src/lib/components/event/event-detail-pills.svelte deleted file mode 100644 index 988b25fbb..000000000 --- a/src/lib/components/event/event-detail-pills.svelte +++ /dev/null @@ -1,40 +0,0 @@ - - -{#if pillCount > 1} -
- - {#each Object.entries(attributeGrouping) as [key, value] (key)} - {#if value.length} - dispatch('pillChange', { key })} - >{translate(attributeGroupingProperties[key].label)} - {/if} - {/each} - -
-{/if} - - diff --git a/src/lib/components/event/event-empty-row.svelte b/src/lib/components/event/event-empty-row.svelte index 6dca4620c..2bced3ab2 100644 --- a/src/lib/components/event/event-empty-row.svelte +++ b/src/lib/components/event/event-empty-row.svelte @@ -13,9 +13,3 @@ {:else} {/if} - - diff --git a/src/lib/components/event/event-summary-row.svelte b/src/lib/components/event/event-summary-row.svelte index 3bbf9e47e..e0590a74f 100644 --- a/src/lib/components/event/event-summary-row.svelte +++ b/src/lib/components/event/event-summary-row.svelte @@ -136,7 +136,7 @@

{displayName}

diff --git a/src/lib/components/lines-and-dots/svg/event-detail-row.svelte b/src/lib/components/lines-and-dots/svg/event-detail-row.svelte deleted file mode 100644 index 5e4018bda..000000000 --- a/src/lib/components/lines-and-dots/svg/event-detail-row.svelte +++ /dev/null @@ -1,142 +0,0 @@ - - -{#if active && !group?.pendingActivity} - - - -{/if} - - - -
-
- {event.id} - {spaceBetweenCapitalLetters(event?.name)} -
- {#if showTimestamp} -
- {formatDate(event?.eventTime, $timeFormat, { - relative: $relativeTime, - })} -
- {/if} -
-
-{#each textAttributes as [key, value], index (key)} - -
-
- {format(key)} -
-
- -
-
-
-{/each} -{#each codeBlockAttributes as [key, value], index (key)} - {@const blockX = x + gutter} - {@const blockY = - textStartingY + - (textAttributes.length + 1) * fontSizeRatio + - index * staticCodeBlockHeight} - {format(key)} - -{/each} - - - diff --git a/src/lib/components/lines-and-dots/svg/event-details-row.svelte b/src/lib/components/lines-and-dots/svg/event-details-row.svelte deleted file mode 100644 index f2b9dab3f..000000000 --- a/src/lib/components/lines-and-dots/svg/event-details-row.svelte +++ /dev/null @@ -1,73 +0,0 @@ - - - - - {#if group} - {#if group.pendingActivity} - - {/if} - {#each group.eventList as e, index} - - {/each} - {:else} - - {/if} - - - diff --git a/src/lib/components/lines-and-dots/svg/history-graph-row.svelte b/src/lib/components/lines-and-dots/svg/history-graph-row.svelte deleted file mode 100644 index fd47acc86..000000000 --- a/src/lib/components/lines-and-dots/svg/history-graph-row.svelte +++ /dev/null @@ -1,90 +0,0 @@ - - - setActiveEvent(event, group)} - on:keypress={() => setActiveEvent(event, group)} - class="relative cursor-pointer" -> - - -
-
- {event.id} -
- - {spaceBetweenCapitalLetters(event?.name)} - {#if group && group.displayName && showDetails}{group.displayName}{/if} -
-
- {#if showTimestamp} - {formatDate(event?.eventTime, $timeFormat, { - relative: $relativeTime, - })} - {/if} -
-
-
- - diff --git a/src/lib/components/lines-and-dots/svg/history-row-payload-detail.svelte b/src/lib/components/lines-and-dots/svg/history-row-payload-detail.svelte deleted file mode 100644 index 71290b93e..000000000 --- a/src/lib/components/lines-and-dots/svg/history-row-payload-detail.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - -{#if typeof value === 'object'} - {#if value?.payloads} - - {#key decodedValue} - {decodedValue.slice(1, 20)} - {/key} - - {:else if key === 'searchAttributes'} - - {#key decodedValue} - {decodedValue.slice(1, 20)} - {/key} - - {:else} - - {#key decodedValue} - {decodedValue.slice(1, 20)} - {/key} - - {/if} -{/if} diff --git a/src/lib/models/__snapshots__/workflow-execution.test.ts.snap b/src/lib/models/__snapshots__/workflow-execution.test.ts.snap index 983253c55..5a6883206 100644 --- a/src/lib/models/__snapshots__/workflow-execution.test.ts.snap +++ b/src/lib/models/__snapshots__/workflow-execution.test.ts.snap @@ -25,6 +25,7 @@ exports[`toWorkflowExecution > should match the snapshot for Canceled workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "346e7a24-c660-4f91-a777-ffe3274d8144", "searchAttributes": { "indexedFields": { @@ -70,6 +71,7 @@ exports[`toWorkflowExecution > should match the snapshot for Completed workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "202dcff6-7f35-4c65-995c-bcadce524fb1", "searchAttributes": { "indexedFields": { @@ -112,6 +114,7 @@ exports[`toWorkflowExecution > should match the snapshot for Failed workflows 1` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "7e00b341-c579-4bb5-9e28-810d34ef4329", "searchAttributes": { "indexedFields": { @@ -179,6 +182,7 @@ exports[`toWorkflowExecution > should match the snapshot for Running workflows 1 ], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7", "searchAttributes": { "indexedFields": { @@ -255,6 +259,7 @@ exports[`toWorkflowExecution > should match the snapshot for Terminated workflow ], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "16c5fbe5-f82d-43c1-acbc-18c65c449ace", "searchAttributes": { "indexedFields": { @@ -300,6 +305,13 @@ exports[`toWorkflowExecution > should match the snapshot for TimedOut workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": { + "attempt": 1, + "originalScheduledTime": "2022-07-01T14:00:34.963148219Z", + "scheduledTime": "2022-07-01T14:00:34.963148844Z", + "startedTime": null, + "state": "Scheduled", + }, "runId": "445a17cb-6cb4-4508-bc59-187d08c6c6e2", "searchAttributes": { "indexedFields": { @@ -343,6 +355,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "346e7a24-c660-4f91-a777-ffe3274d8144", "searchAttributes": { "indexedFields": { @@ -382,6 +395,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "202dcff6-7f35-4c65-995c-bcadce524fb1", "searchAttributes": { "indexedFields": { @@ -421,6 +435,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "7e00b341-c579-4bb5-9e28-810d34ef4329", "searchAttributes": { "indexedFields": { @@ -456,6 +471,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7", "searchAttributes": { "indexedFields": { @@ -495,6 +511,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "dfd4039d-4bc0-4864-9a24-85d136814977", "searchAttributes": { "indexedFields": { @@ -534,6 +551,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "16c5fbe5-f82d-43c1-acbc-18c65c449ace", "searchAttributes": { "indexedFields": { @@ -573,6 +591,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "445a17cb-6cb4-4508-bc59-187d08c6c6e2", "searchAttributes": { "indexedFields": { diff --git a/src/lib/models/__snapshots__/workflow-execution.write-disabled.test.ts.snap b/src/lib/models/__snapshots__/workflow-execution.write-disabled.test.ts.snap index bf3942470..0ce90f6b5 100644 --- a/src/lib/models/__snapshots__/workflow-execution.write-disabled.test.ts.snap +++ b/src/lib/models/__snapshots__/workflow-execution.write-disabled.test.ts.snap @@ -25,6 +25,7 @@ exports[`toWorkflowExecution > should match the snapshot for Canceled workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "346e7a24-c660-4f91-a777-ffe3274d8144", "searchAttributes": { "indexedFields": { @@ -70,6 +71,7 @@ exports[`toWorkflowExecution > should match the snapshot for Completed workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "202dcff6-7f35-4c65-995c-bcadce524fb1", "searchAttributes": { "indexedFields": { @@ -112,6 +114,7 @@ exports[`toWorkflowExecution > should match the snapshot for Failed workflows 1` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "7e00b341-c579-4bb5-9e28-810d34ef4329", "searchAttributes": { "indexedFields": { @@ -179,6 +182,7 @@ exports[`toWorkflowExecution > should match the snapshot for Running workflows 1 ], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7", "searchAttributes": { "indexedFields": { @@ -255,6 +259,7 @@ exports[`toWorkflowExecution > should match the snapshot for Terminated workflow ], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": null, "runId": "16c5fbe5-f82d-43c1-acbc-18c65c449ace", "searchAttributes": { "indexedFields": { @@ -300,6 +305,13 @@ exports[`toWorkflowExecution > should match the snapshot for TimedOut workflows "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": { + "attempt": 1, + "originalScheduledTime": "2022-07-01T14:00:34.963148219Z", + "scheduledTime": "2022-07-01T14:00:34.963148844Z", + "startedTime": null, + "state": "Scheduled", + }, "runId": "445a17cb-6cb4-4508-bc59-187d08c6c6e2", "searchAttributes": { "indexedFields": { @@ -343,6 +355,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "346e7a24-c660-4f91-a777-ffe3274d8144", "searchAttributes": { "indexedFields": { @@ -382,6 +395,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "202dcff6-7f35-4c65-995c-bcadce524fb1", "searchAttributes": { "indexedFields": { @@ -421,6 +435,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "7e00b341-c579-4bb5-9e28-810d34ef4329", "searchAttributes": { "indexedFields": { @@ -456,6 +471,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7", "searchAttributes": { "indexedFields": { @@ -495,6 +511,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "dfd4039d-4bc0-4864-9a24-85d136814977", "searchAttributes": { "indexedFields": { @@ -534,6 +551,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "16c5fbe5-f82d-43c1-acbc-18c65c449ace", "searchAttributes": { "indexedFields": { @@ -573,6 +591,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = ` "pendingActivities": [], "pendingChildren": [], "pendingNexusOperations": [], + "pendingWorkflowTask": undefined, "runId": "445a17cb-6cb4-4508-bc59-187d08c6c6e2", "searchAttributes": { "indexedFields": { diff --git a/src/lib/models/event-groups/group-events.test.ts b/src/lib/models/event-groups/group-events.test.ts index 48fd701b3..f5829ecc9 100644 --- a/src/lib/models/event-groups/group-events.test.ts +++ b/src/lib/models/event-groups/group-events.test.ts @@ -261,6 +261,7 @@ describe('getEventGroupDisplayName', () => { }; const localActivityEvent = { + eventType: 'MarkerRecorded', markerRecordedEventAttributes: { markerName: 'core_local_activity', details: { diff --git a/src/lib/utilities/get-single-attribute-for-event.test.ts b/src/lib/utilities/get-single-attribute-for-event.test.ts index be7dd24b1..5e8ff5fe9 100644 --- a/src/lib/utilities/get-single-attribute-for-event.test.ts +++ b/src/lib/utilities/get-single-attribute-for-event.test.ts @@ -128,29 +128,32 @@ describe('getPrimaryAttributeForEvent', () => { }); }); - it('should return "taskqueue.name" if the workflow type does not exists', async () => { + it('should return "input" if the workflow type does not exists', async () => { const event = { ...workflowEvent }; event.attributes.workflowType = null; expect(await getPrimaryAttributeForEvent(event)).toStrictEqual({ - key: 'taskQueueName', - value: 'rainbow-statuses', + key: 'input', + value: { + payloads: [ + { + At: '2022-04-04T11:50:28.151785-05:00', + Hey: 'from Mars', + }, + ], + }, }); }); - it('should return "parentInitiatedEventId" if the workflow type and task queue does not exist', async () => { + it('should return "taskQueue" if the workflow type and input does not exist', async () => { const event = { ...workflowEvent }; event.attributes.workflowType = null as unknown as { name: string; }; - - event.attributes.taskQueue = null as unknown as { - name: string; - kind: string; - }; + event.attributes.input = null; expect(await getPrimaryAttributeForEvent(event)).toStrictEqual({ - key: 'parentInitiatedEventId', - value: '0', + key: 'taskQueueName', + value: 'rainbow-statuses', }); }); diff --git a/src/lib/utilities/get-single-attribute-for-event.ts b/src/lib/utilities/get-single-attribute-for-event.ts index 4d3a93352..7544f4a17 100644 --- a/src/lib/utilities/get-single-attribute-for-event.ts +++ b/src/lib/utilities/get-single-attribute-for-event.ts @@ -212,7 +212,7 @@ const preferredSummaryKeys = [ 'input', 'outcome', 'workflowExecution', - 'taskQueueName', + 'taskQueue', 'startToFireTimeout', 'identity', 'parentInitiatedEventId', diff --git a/tests/integration/workflow-event-history.spec.ts b/tests/integration/workflow-event-history.spec.ts index 62962dffa..90e55834e 100644 --- a/tests/integration/workflow-event-history.spec.ts +++ b/tests/integration/workflow-event-history.spec.ts @@ -95,32 +95,4 @@ test.describe('Workflow History', () => { await expect(page.getByTestId('json')).toBeVisible(); await expect(page.getByTestId('event-summary-table')).toBeVisible(); }); - - test('Workflow Execution shows WorkflowId and all sections and event history with Labs Mode on', async ({ - page, - }) => { - await mockWorkflowApis(page); - await expect(page.getByTestId('workflow-id-heading')).toHaveText( - '09db15_Running Click to copy content', - ); - - await expect(page.getByTestId('labs-mode-button')).toBeVisible(); - await page.getByTestId('labs-mode-button').click(); - - await expect(page.getByTestId('history-tab')).toBeVisible(); - await expect(page.getByTestId('workers-tab')).toBeVisible(); - await expect(page.getByTestId('relationships-tab')).toBeVisible(); - await expect(page.getByTestId('pending-activities-tab')).toBeHidden(); - await expect(page.getByTestId('call-stack-tab')).toBeVisible(); - await expect(page.getByTestId('queries-tab')).toBeVisible(); - await expect(page.getByTestId('summary-accordion')).toBeHidden(); - await expect(page.getByTestId('pending-activities')).toBeHidden(); - await expect(page.getByTestId('input-and-results')).toBeHidden(); - await expect(page.getByTestId('timeline-accordion')).toBeHidden(); - await expect(page.getByTestId('feed')).toBeVisible(); - await expect(page.getByTestId('timeline')).toBeVisible(); - await expect(page.getByTestId('compact')).toBeVisible(); - await expect(page.getByTestId('json')).toBeHidden(); - await expect(page.getByTestId('event-summary-table')).toBeHidden(); - }); });