Skip to content

Persist workflow view and sort order preferences across navigation#3260

Merged
laurakwhit merged 2 commits intomainfrom
DT-3709-sticky-view-preferences
Apr 6, 2026
Merged

Persist workflow view and sort order preferences across navigation#3260
laurakwhit merged 2 commits intomainfrom
DT-3709-sticky-view-preferences

Conversation

@laurakwhit
Copy link
Copy Markdown
Collaborator

Description & motivation 💭

  • Adds workflowViewPreference persistStore to save whether a user prefers the /timeline or /history tab.
  • Adds routeForWorkflow that reads both workflowViewPreference and eventFilterSort from localStorage to route to the user's preferred tab with their preferred sort order.
  • Renames the existing routeForWorkflow (base path builder) to baseRouteForWorkflow to avoid naming conflicts
  • Updates all workflow navigation links (workflow list, child/parent workflows, schedule runs, nexus links, event detail links, etc.) to use routeForWorkflow instead of routeForTimeline or routeForEventHistory
  • Adds onClick handlers to "Timeline" and 'Event History" tabs in the workflow header to persist the tab preference

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  1. User clicks the "Event History" tab → workflowViewPreference is set to "history" in localStorage
  2. User clicks "Ascending" sort → eventFilterSort is set to "ascending" in localStorage (existing behavior)
  3. User navigates to a different workflow → routeForWorkflow reads both preferences and generates a URL like /workflows/[wf]/[run]/history?sort=ascending

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

DT-3709

Docs

Any docs updates needed?

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Apr 3, 2026 0:34am

Request Review

@laurakwhit laurakwhit marked this pull request as ready for review April 3, 2026 00:25
@laurakwhit laurakwhit requested review from a team, Alex-Tideman and rossedfort as code owners April 3, 2026 00:25
@laurakwhit laurakwhit requested a review from rossnelson April 3, 2026 00:25
} else if (linkType === 'child-workflow') {
return routeForTimeline({
return routeForWorkflow({
namespace: ns,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

return routeForTimeline({
return routeForWorkflow({
namespace: ns,
workflow: attrs.workflowExecutionWorkflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | undefined' is not assignable to type 'string'.

<div class="mx-2 w-auto break-words">
<Link
href={routeForTimeline({
href={routeForWorkflow({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

<Link
href={routeForTimeline({
href={routeForWorkflow({
workflow: run.startWorkflowResult.workflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

href={routeForWorkflow({
namespace,
workflow: run?.startWorkflowResult?.workflowId,
run: run?.startWorkflowResult?.runId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Argument of type 'IScheduleActionResult[] | null | undefined' is not assignable to parameter of type 'IScheduleActionResult[]'.

<Link
href={routeForTimeline({
href={routeForWorkflow({
namespace: link.workflowEvent.namespace,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

href={routeForTimeline({
href={routeForWorkflow({
namespace: link.workflowEvent.namespace,
workflow: link.workflowEvent.workflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

});
} else {
return routeForTimeline({
return routeForWorkflow({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

} else {
return routeForTimeline({
return routeForWorkflow({
namespace: link.workflowEvent.namespace,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

return routeForTimeline({
return routeForWorkflow({
namespace: link.workflowEvent.namespace,
workflow: link.workflowEvent.workflowId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ⚠️ 'link.workflowEvent' is possibly 'null' or 'undefined'.
  • ⚠️ Type 'string | null | undefined' is not assignable to type 'string'.

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd bot commented Apr 3, 2026

Warnings
⚠️

📊 Strict Mode: 80 errors in 10 files (7.4% of 1086 total)

src/lib/utilities/event-link-href.ts (15)
  • L7:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L8:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L9:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L17:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L18:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L19:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L24:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L25:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L26:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L31:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L31:17: 'link.workflowEvent' is possibly 'null' or 'undefined'.
  • L32:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L32:16: 'link.workflowEvent' is possibly 'null' or 'undefined'.
  • L33:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L33:11: 'link.workflowEvent' is possibly 'null' or 'undefined'.
src/lib/components/event/event-details-link.svelte (2)
  • L32:8: Type 'string | undefined' is not assignable to type 'string'.
  • L33:8: Type 'string | undefined' is not assignable to type 'string'.
src/lib/components/schedule/schedule-recent-runs.svelte (11)
  • L38:6: Type 'string | undefined' is not assignable to type 'string'.
  • L48:81: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • L48:81: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
  • L48:118: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  • L48:125: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • L56:14: Type 'string | null | undefined' is not assignable to type 'string'.
  • L56:24: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • L57:14: Type 'string | null | undefined' is not assignable to type 'string'.
  • L57:19: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • L61:13: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
  • L72:11: 'run.startWorkflowResult' is possibly 'null' or 'undefined'.
src/lib/components/schedule/schedules-table-row.svelte (5)
  • L45:6: Type 'string | null | undefined' is not assignable to type 'string'.
  • L68:33: Argument of type 'IScheduleActionResult[] | null | undefined' is not assignable to parameter of type 'IScheduleActionResult[]'.
  • L73:16: Type 'string | null | undefined' is not assignable to type 'string'.
  • L74:16: Type 'string | null | undefined' is not assignable to type 'string'.
  • L90:28: Type 'IScheduleSpec | null | undefined' is not assignable to type 'IScheduleSpec'.
src/lib/components/workflow/child-workflows-table.svelte (6)
  • L29:13: 'c.attributes.workflowExecution' is possibly 'null' or 'undefined'.
  • L30:18: 'c.attributes.workflowExecution' is possibly 'null' or 'undefined'.
  • L71:14: Type 'string | null | undefined' is not assignable to type 'string'.
  • L72:14: Type 'string | null | undefined' is not assignable to type 'string'.
  • L82:14: Type 'string | null | undefined' is not assignable to type 'string'.
  • L83:14: Type 'string | null | undefined' is not assignable to type 'string'.
src/lib/components/workflow/parent-workflow-table.svelte (6)
  • L28:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L29:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L35:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L44:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L45:10: Type 'string | null | undefined' is not assignable to type 'string'.
  • L51:10: Type 'string | null | undefined' is not assignable to type 'string'.
src/lib/components/workflow/workflows-summary-configurable-table/table-body-cell.svelte (1)
  • L165:8: Type 'string | undefined' is not assignable to type 'string'.
src/lib/layouts/workflow-header.svelte (9)
  • L138:37: Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
  • L139:45: Argument of type 'WorkflowExecution | null' is not assignable to parameter of type 'WorkflowExecution'.
  • L144:13: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L170:9: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L178:20: Type 'WorkflowExecution | null' is not assignable to type 'WorkflowExecution'.
  • L235:12: Type 'string | undefined' is not assignable to type 'string'.
  • L272:11: 'workflow' is possibly 'null'.
  • L314:12: 'workflow' is possibly 'null'.
  • L314:12: 'workflow.searchAttributes' is possibly 'undefined'.
src/lib/pages/start-workflow.svelte (4)
  • L139:17: Property 'message' does not exist on type '{}'.
  • L161:20: 'pollers' is possibly 'null' or 'undefined'.
  • L240:20: Argument of type 'string | null' is not assignable to parameter of type 'string'.
  • L322:15: Type 'SearchAttributeInput[]' is not assignable to type '{ type: "Unspecified" | "Keyword" | "Text" | "Int" | "Double" | "Bool" | "KeywordList" | "Datetime"; label: string; value?: any; }[]'.
src/lib/pages/workflow-nexus-links.svelte (21)
  • L67:46: Argument of type 'WorkflowExecutionStartedEvent | WorkflowExecutionOptionsUpdatedEvent | undefined' is not assignable to parameter of type 'WorkflowEvent'.
  • L70:23: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L71:43: Argument of type 'false | ILink' is not assignable to parameter of type 'ILink'.
  • L72:22: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L77:23: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L80:34: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L81:33: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L82:28: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L83:26: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L88:23: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L91:34: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L92:26: Property 'workflowEvent' does not exist on type 'false | ILink'.
  • L102:25: 'event' is possibly 'undefined'.
  • L104:16: 'event' is possibly 'undefined'.
  • L105:16: 'event' is possibly 'undefined'.
  • L139:25: 'scheduledEvent' is possibly 'undefined'.
  • L140:19: 'scheduledEvent' is possibly 'undefined'.
  • L156:18: Type 'string | null | undefined' is not assignable to type 'string'.
  • L165:18: Type 'string | null | undefined' is not assignable to type 'string'.
  • L166:18: Type 'string | null | undefined' is not assignable to type 'string'.
  • L167:18: Type 'string | null | undefined' is not assignable to type 'string'.

Generated by 🚫 dangerJS against 821bea7

@laurakwhit laurakwhit merged commit a2eaf16 into main Apr 6, 2026
42 checks passed
@laurakwhit laurakwhit deleted the DT-3709-sticky-view-preferences branch April 6, 2026 22:21
temporal-cicd bot pushed a commit that referenced this pull request Apr 10, 2026
Auto-generated version bump from 2.48.1 to 2.48.2

Specific version: 2.48.2

Changes included:
- [`92cd681e`](92cd681) Re-wire auth to use a provider pattern. Lots of tests remove cloud references (#3230)
- [`3d92202b`](3d92202) Use --top-nav-height CSS variable for sticky element positioning (#3250)
- [`16295986`](1629598) Bump saved view limits from 20 to 50 (#3254)
- [`a9fa0e91`](a9fa0e9) Display cron string instead of calendar spec when schedule has a cron string in comment field (#3241)
- [`f1811715`](f181171) use full for 100% instead of 100vh (#3256)
- [`0dfadd74`](0dfadd7) Add samples-ruby to workflows table empty state (#3259)
- [`d85d61a3`](d85d61a) Display human-readable schedule spec labels (#3261)
- [`b63049c5`](b63049c) Add invite icon to Holocene design system (#3262)
- [`00c6418c`](00c6418) Bump google.golang.org/grpc from 1.66.1 to 1.79.3 in /server (#3232)
- [`b04a3676`](b04a367) Add back animation (#3251)
- [`7b651524`](7b65152) Bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 in /server (#3268)
- [`45f4fdea`](45f4fde) use snippets for nexus CTAs (#3266)
- [`420f5c9d`](420f5c9) min-h-full instead of screen (#3270)
- [`f5b2fab6`](f5b2fab) feat(navigation): add NavSection Holocene component (#3263)
- [`657b2728`](657b272) Adds requested design changes to breadcrumb items (#3267)
- [`6763cc4d`](6763cc4) Remove serena (#3273)
- [`dfff353e`](dfff353) Display Principal fields in Event History (#3272)
- [`2d289bce`](2d289bc) Update CODEOWNERS to wildcard for temporalio/frontend-engineering (#3275)
- [`a2eaf16e`](a2eaf16) Persist workflow view and sort order preferences across navigation (#3260)
- [`c5d4c996`](c5d4c99) Add link from Event Card to jump to event id page from Timeline. Remove unnecessary padding (#3277)
- [`e5b3ea55`](e5b3ea5) fix(deps): upgrade lodash, svelte, kit, storybook, tar-fs for security (#3269)
- [`b44afbe6`](b44afbe) fix(deps): upgrade vite and add picomatch/svgo overrides for security (#3279)
- [`4e8cb4e9`](4e8cb4e) Fix unpause confirmation modal title (#3280)
- [`740b3529`](740b352) Add Slack notification when DESIGN FEEDBACK REQUESTED label is added to a PR (#3282)
- [`7e8170e4`](7e8170e) Add check for COLLABORATOR (#3283)
- [`dc27109d`](dc27109) fix: update nav item margin from mb-1 to mb-2 (#3290)
- [`3e6416d2`](3e6416d) Pass execution runId in workflow request for schedule recent run (#3289)
- [`ae3a1844`](ae3a184) Fix schedule edit double-encoding header fields (#3287)
- [`09c083e0`](09c083e) fix: prevent reset modal from closing on authorization error (#3291)
- [`0aa3b72b`](0aa3b72) Sort namespace picker alphabetically (#3286)
- [`4c3d0057`](4c3d005) Sort alphabetically utility (#3293)
- [`67a988b9`](67a988b) Bump @sveltejs/kit from 2.55.0 to 2.57.1 (#3294)
laurakwhit added a commit that referenced this pull request Apr 10, 2026
Auto-generated version bump from 2.48.1 to 2.48.2

Specific version: 2.48.2

Changes included:
- [`92cd681e`](92cd681) Re-wire auth to use a provider pattern. Lots of tests remove cloud references (#3230)
- [`3d92202b`](3d92202) Use --top-nav-height CSS variable for sticky element positioning (#3250)
- [`16295986`](1629598) Bump saved view limits from 20 to 50 (#3254)
- [`a9fa0e91`](a9fa0e9) Display cron string instead of calendar spec when schedule has a cron string in comment field (#3241)
- [`f1811715`](f181171) use full for 100% instead of 100vh (#3256)
- [`0dfadd74`](0dfadd7) Add samples-ruby to workflows table empty state (#3259)
- [`d85d61a3`](d85d61a) Display human-readable schedule spec labels (#3261)
- [`b63049c5`](b63049c) Add invite icon to Holocene design system (#3262)
- [`00c6418c`](00c6418) Bump google.golang.org/grpc from 1.66.1 to 1.79.3 in /server (#3232)
- [`b04a3676`](b04a367) Add back animation (#3251)
- [`7b651524`](7b65152) Bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 in /server (#3268)
- [`45f4fdea`](45f4fde) use snippets for nexus CTAs (#3266)
- [`420f5c9d`](420f5c9) min-h-full instead of screen (#3270)
- [`f5b2fab6`](f5b2fab) feat(navigation): add NavSection Holocene component (#3263)
- [`657b2728`](657b272) Adds requested design changes to breadcrumb items (#3267)
- [`6763cc4d`](6763cc4) Remove serena (#3273)
- [`dfff353e`](dfff353) Display Principal fields in Event History (#3272)
- [`2d289bce`](2d289bc) Update CODEOWNERS to wildcard for temporalio/frontend-engineering (#3275)
- [`a2eaf16e`](a2eaf16) Persist workflow view and sort order preferences across navigation (#3260)
- [`c5d4c996`](c5d4c99) Add link from Event Card to jump to event id page from Timeline. Remove unnecessary padding (#3277)
- [`e5b3ea55`](e5b3ea5) fix(deps): upgrade lodash, svelte, kit, storybook, tar-fs for security (#3269)
- [`b44afbe6`](b44afbe) fix(deps): upgrade vite and add picomatch/svgo overrides for security (#3279)
- [`4e8cb4e9`](4e8cb4e) Fix unpause confirmation modal title (#3280)
- [`740b3529`](740b352) Add Slack notification when DESIGN FEEDBACK REQUESTED label is added to a PR (#3282)
- [`7e8170e4`](7e8170e) Add check for COLLABORATOR (#3283)
- [`dc27109d`](dc27109) fix: update nav item margin from mb-1 to mb-2 (#3290)
- [`3e6416d2`](3e6416d) Pass execution runId in workflow request for schedule recent run (#3289)
- [`ae3a1844`](ae3a184) Fix schedule edit double-encoding header fields (#3287)
- [`09c083e0`](09c083e) fix: prevent reset modal from closing on authorization error (#3291)
- [`0aa3b72b`](0aa3b72) Sort namespace picker alphabetically (#3286)
- [`4c3d0057`](4c3d005) Sort alphabetically utility (#3293)
- [`67a988b9`](67a988b) Bump @sveltejs/kit from 2.55.0 to 2.57.1 (#3294)

Co-authored-by: laurakwhit <15069288+laurakwhit@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants