Conversation
* WIP - start standalone activity * change routes, add duration input, fix imports * use queryparams for initial form values * clean up - update go api module - clean up api routes - add placeholder page for activity execution details - add support for query params to pre-fill form * add page components * add integration tests
* standalone activity details * decode and refactor * clean up * clean up * add page titles * add default param * remove pause, update and reset buttons * fix pnpm lock * add error state * increase toast duration
* Add standalone activities UI * Upgrade to svelte5 * Don't allow onclick on button until we migrate it to Svelte5 * Remove batch functionality * Fix up some table stuff * Add filterable/copiable cells * Add Start Activity Like this One
* add terminate and cancel to activity details page * update api
* design scrub * fix i18n * rename and reorganize * fix poller
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| loading = true; | ||
| try { | ||
| const { count, groups } = await fetchActivityCountByStatus({ | ||
| namespace, |
There was a problem hiding this comment.
⚠️ Type 'string | null' is not assignable to type 'string'.
| query, | ||
| }).catch((_e) => { | ||
| return { count: '0', groups: [] }; | ||
| }); |
There was a problem hiding this comment.
⚠️ Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
| }).catch((_e) => { | ||
| return { count: '0', groups: [] }; | ||
| }); | ||
| $activityCount.count = parseInt(count); |
There was a problem hiding this comment.
⚠️ Argument of type 'never[] | { count: string; groupValues: IPayloads; }[] | undefined' is not assignable to parameter of type 'never[] | undefined'.
| const fetchNewCounts = async () => { | ||
| try { | ||
| const { count, groups } = await fetchActivityCountByStatus({ | ||
| namespace, |
There was a problem hiding this comment.
⚠️ Type 'string | null' is not assignable to type 'string'.
| query, | ||
| }).catch((_e) => { | ||
| return { count: '0', groups: [] }; | ||
| }); |
There was a problem hiding this comment.
⚠️ Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
|
|
||
| this.onUpdate(activityExecution); | ||
|
|
||
| if (activityExecution.info.status === 'ACTIVITY_EXECUTION_STATUS_RUNNING') { |
There was a problem hiding this comment.
⚠️ 'activityExecution' is possibly 'undefined'.
| this.onUpdate(activityExecution); | ||
|
|
||
| if (activityExecution.info.status === 'ACTIVITY_EXECUTION_STATUS_RUNNING') { | ||
| this.runId = activityExecution.runId; |
There was a problem hiding this comment.
⚠️ 'activityExecution' is possibly 'undefined'.⚠️ Type 'string | undefined' is not assignable to type 'string'.
| if ( | ||
| polledActivityExecution && | ||
| !isEmptyObject(polledActivityExecution) | ||
| ) { |
There was a problem hiding this comment.
⚠️ Type 'string | undefined' is not assignable to type 'string'.
| if (error instanceof Error && error.name === 'AbortError') { | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
⚠️ Argument of type 'unknown' is not assignable to parameter of type 'Error'.
| <ErrorComponent {error} /> | ||
| {:else} | ||
| <StandaloneActivityLayout | ||
| {poller} |
There was a problem hiding this comment.
⚠️ Type 'ActivityExecution | undefined' is not assignable to type 'ActivityExecution'.
| disabled={!isRunning} | ||
| size="sm" | ||
| > | ||
| {translate('standalone-activities.request-cancellation')} |
| disabled={!isRunning} | ||
| data-testid="terminate-button" | ||
| > | ||
| {translate('standalone-activities.terminate')} |
| </script> | ||
|
|
||
| <div class="flex shrink flex-wrap items-center justify-start gap-2"> | ||
| <ActivityDropdownFilterList /> |
| {#each systemActivityViews as view} | ||
| {@render queryButton({ | ||
| ...view, | ||
| active: query === view.query, |
| > | ||
| <h5>{translate('standalone-activities.form-timeouts-heading')}</h5> | ||
|
|
||
| <DurationInput |
| {:else if label === 'Close Time'} | ||
| <Timestamp dateTime={activity.closeTime} /> | ||
| {:else if label === 'Execution Duration'} | ||
| {#if activity.executionDuration} |
| </td> | ||
| {/if} | ||
|
|
||
| <style lang="postcss"> |
There was a problem hiding this comment.
NIT: Maybe we can avoid adding more postcss if possible 🙏
| goto( | ||
| routeForStartStandaloneActivity({ | ||
| namespace, | ||
| activityId: activityExecutionInfo.activityId, |
There was a problem hiding this comment.
⚠️ Type 'string | null | undefined' is not assignable to type 'string | undefined'.
| <DetailListLabel>Activity Type</DetailListLabel> | ||
| <DetailListLinkValue | ||
| copyable | ||
| iconName="filter" |
There was a problem hiding this comment.
⚠️ Type 'string | null | undefined' is not assignable to type 'string'.
server/go.mod
Outdated
| github.com/stretchr/testify v1.10.0 | ||
| github.com/urfave/cli/v2 v2.3.0 | ||
| go.temporal.io/api v1.57.0 | ||
| go.temporal.io/api v1.61.0 |
| const handleCopy = (e: Event) => { | ||
| const sharableViewUrl = | ||
| new URL(page.url.href) + | ||
| '&savedQuery=' + |
There was a problem hiding this comment.
⚠️ Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | boolean'.
| <RetryPolicyInput | ||
| bind:initialInterval={$form.initialInterval} | ||
| bind:backoffCoefficient={$form.backoffCoefficient} | ||
| bind:maximumInterval={$form.maximumInterval} |
There was a problem hiding this comment.
⚠️ Type 'undefined' is not assignable to type 'string'.
|
|
||
| if (index === $activeQueryIndex) { | ||
| $activeQueryIndex = null; | ||
| $filter = emptyFilter(); |
There was a problem hiding this comment.
⚠️ '$activeQueryIndex' is possibly 'null'.
| if (index === $activeQueryIndex) { | ||
| $activeQueryIndex = null; | ||
| $filter = emptyFilter(); | ||
| } else if (index < $activeQueryIndex) { |
There was a problem hiding this comment.
⚠️ '$activeQueryIndex' is possibly 'null'.
| {#if isStatusFilter(activityFilter) && i === firstExecutionStatusIndex} | ||
| <StatusDropdownFilterChip | ||
| filters={executionStatusFilters} | ||
| index={i} |
There was a problem hiding this comment.
⚠️ Type 'number | null' is not assignable to type 'number | undefined'.
| {:else if !isStatusFilter(activityFilter) && activityFilter.attribute} | ||
| <DropdownFilterChip | ||
| filter={activityFilter} | ||
| index={i} |
There was a problem hiding this comment.
⚠️ Type 'number | null' is not assignable to type 'number | undefined'.
src/lib/components/standalone-activities/start-standalone-activity-form/form.svelte
Show resolved
Hide resolved
src/lib/components/standalone-activities/start-standalone-activity-form/form.svelte
Show resolved
Hide resolved
src/lib/components/standalone-activities/start-standalone-activity-form/form.svelte
Show resolved
Hide resolved
| let refreshTime = $state(new Date()); | ||
|
|
||
| const refreshTimeFormatted = $derived( | ||
| formatDate(refreshTime, $timeFormat, { |
There was a problem hiding this comment.
Change request: If you use the $timestamp store, this'll be reactive for 12/24 hour format change to.
andrewzamojc
left a comment
There was a problem hiding this comment.
I tried out the branch locally and was able to start/stop a standalone activity and view its details. The decoding steps in the PR worked too. Looking pretty good to me 👍
Auto-generated version bump from 2.44.1 to 2.45.0 Bump type: minor Changes included: - [`4d828b96`](4d828b9) Account for potential not in conditional in custom query (#3081) - [`bead6b37`](bead6b3) Fix truncate in detail-list-text-value (#3089) - [`bb4bee6c`](bb4bee6) Bump svelte dependencies (#3097) - [`586bfe19`](586bfe1) Test section - [`4ad6cfff`](4ad6cff) Remove sisyphus and add to .gitignore (#3104) - [`0aea80f3`](0aea80f) Nav update icons clean (#3095) - [`bca75cc5`](bca75cc) make routes conditional on prop (#3106) - [`0008100b`](0008100) Add new Nexus timeout fields and translations (#3105) - [`b9939675`](b993967) Bump golang.org/x/crypto from 0.38.0 to 0.45.0 in /server (#3028) - [`5963ca9c`](5963ca9) Nav release fix/kt (#3110) - [`3cab346e`](3cab346) quick nav fix add logo and route to title (#3112) - [`f9f75d64`](f9f75d6) [DT-3501] reactive timestamp (#3108) - [`faa48e2b`](faa48e2) [DT-3501][DT-3505] 12/24 hour and ISO formats added to timezone popover (#3113) - [`068e5978`](068e597) Fix nav collapse icon (#3117) - [`d0b34226`](d0b3422) feat(workflows): show Versioning Behavior column when filtering by deployment version (#3120) - [`bd8a3556`](bd8a355) [DT-3580] Add tooltips to worker deployment version status badges (#3119) - [`f46dca00`](f46dca0) Add Portal component (#3107) - [`ef6b923e`](ef6b923) feat(deployments): make build ID and deployment name copyable and filterable (#3121) - [`6209f9b6`](6209f9b) DT-3507-fix-code-block-scrolling (#3129) - [`023f034b`](023f034) DT-3523 - standalone activities UI (#3124) - [`7199ce9e`](7199ce9) Set API to v1.60.0 (#3132)
Auto-generated version bump from 2.44.1 to 2.45.0 Bump type: minor Changes included: - [`4d828b96`](4d828b9) Account for potential not in conditional in custom query (#3081) - [`bead6b37`](bead6b3) Fix truncate in detail-list-text-value (#3089) - [`bb4bee6c`](bb4bee6) Bump svelte dependencies (#3097) - [`586bfe19`](586bfe1) Test section - [`4ad6cfff`](4ad6cff) Remove sisyphus and add to .gitignore (#3104) - [`0aea80f3`](0aea80f) Nav update icons clean (#3095) - [`bca75cc5`](bca75cc) make routes conditional on prop (#3106) - [`0008100b`](0008100) Add new Nexus timeout fields and translations (#3105) - [`b9939675`](b993967) Bump golang.org/x/crypto from 0.38.0 to 0.45.0 in /server (#3028) - [`5963ca9c`](5963ca9) Nav release fix/kt (#3110) - [`3cab346e`](3cab346) quick nav fix add logo and route to title (#3112) - [`f9f75d64`](f9f75d6) [DT-3501] reactive timestamp (#3108) - [`faa48e2b`](faa48e2) [DT-3501][DT-3505] 12/24 hour and ISO formats added to timezone popover (#3113) - [`068e5978`](068e597) Fix nav collapse icon (#3117) - [`d0b34226`](d0b3422) feat(workflows): show Versioning Behavior column when filtering by deployment version (#3120) - [`bd8a3556`](bd8a355) [DT-3580] Add tooltips to worker deployment version status badges (#3119) - [`f46dca00`](f46dca0) Add Portal component (#3107) - [`ef6b923e`](ef6b923) feat(deployments): make build ID and deployment name copyable and filterable (#3121) - [`6209f9b6`](6209f9b) DT-3507-fix-code-block-scrolling (#3129) - [`023f034b`](023f034) DT-3523 - standalone activities UI (#3124) - [`7199ce9e`](7199ce9) Set API to v1.60.0 (#3132) - [`138473c6`](138473c) Set API to v1.60.1 (#3134)
Auto-generated version bump from 2.44.1 to 2.45.0 Bump type: minor Changes included: - [`4d828b96`](4d828b9) Account for potential not in conditional in custom query (#3081) - [`bead6b37`](bead6b3) Fix truncate in detail-list-text-value (#3089) - [`bb4bee6c`](bb4bee6) Bump svelte dependencies (#3097) - [`586bfe19`](586bfe1) Test section - [`4ad6cfff`](4ad6cff) Remove sisyphus and add to .gitignore (#3104) - [`0aea80f3`](0aea80f) Nav update icons clean (#3095) - [`bca75cc5`](bca75cc) make routes conditional on prop (#3106) - [`0008100b`](0008100) Add new Nexus timeout fields and translations (#3105) - [`b9939675`](b993967) Bump golang.org/x/crypto from 0.38.0 to 0.45.0 in /server (#3028) - [`5963ca9c`](5963ca9) Nav release fix/kt (#3110) - [`3cab346e`](3cab346) quick nav fix add logo and route to title (#3112) - [`f9f75d64`](f9f75d6) [DT-3501] reactive timestamp (#3108) - [`faa48e2b`](faa48e2) [DT-3501][DT-3505] 12/24 hour and ISO formats added to timezone popover (#3113) - [`068e5978`](068e597) Fix nav collapse icon (#3117) - [`d0b34226`](d0b3422) feat(workflows): show Versioning Behavior column when filtering by deployment version (#3120) - [`bd8a3556`](bd8a355) [DT-3580] Add tooltips to worker deployment version status badges (#3119) - [`f46dca00`](f46dca0) Add Portal component (#3107) - [`ef6b923e`](ef6b923) feat(deployments): make build ID and deployment name copyable and filterable (#3121) - [`6209f9b6`](6209f9b) DT-3507-fix-code-block-scrolling (#3129) - [`023f034b`](023f034) DT-3523 - standalone activities UI (#3124) - [`7199ce9e`](7199ce9) Set API to v1.60.0 (#3132) - [`138473c6`](138473c) Set API to v1.60.1 (#3134) Co-authored-by: laurakwhit <15069288+laurakwhit@users.noreply.github.com>










Description & motivation 💭
Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Run temporal server from a local build
make binsandmake startdefaultnamespace, runtemporal operator namespace create --namespace defaultdefaultnamespace, runtemporal operator search-attribute create --namespace default --name MySearchAttribute --type KeywordRun the UI against a local build of temporal server
standalone-activitiesbranch in the ui repocd server/ && make buildcd .. && pnpm dev:local-temporalRun some sample workflows in the samples-go repo
cd temporal-fixtures/stuck-workflows/go run worker/main.gogo run starter/main.goStart a Standalone Activity
stuck-workflowsStuckWorkflowActivityStart to Close Timeoutfield with some long duration,1 hourfor examplehttp://localhost:3000/namespaces/default/activities/<activity_id>/detailsTo test Activities with Payloads + Codec Server
In the
samples-gorepo:cd codec-servergo run ./codec-server -web=http://localhost:3000 -port=8088go run worker/main.gogo run starter/main.goIn the UI
http://localhost:8088codecserverActivityhttp://localhost:3000/namespaces/default/activities/<activity_id>/detailsand ensure payloads are being decoded.Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?