Make Timeline/Event History and sort order preferences sticky#3252
Make Timeline/Event History and sort order preferences sticky#3252rossnelson wants to merge 1 commit intomainfrom
Conversation
Persist user preferences for workflow view tab and sort order in localStorage so they carry across workflow navigations. - Add preferredWorkflowTab persistStore (timeline/history) - Read stored tab preference in [run]/+page.ts redirect - Persist tab choice via $effect in workflow-header - Fall back to stored sort preference when no ?sort= URL param DT-3709
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I think we're going to need to go back to the drawing board on this one. This doesn't address:
Most links were switched to routeForTimeline so clicking on any of those links won't respect the preference. We need to wrap routeForTimeline and routeForEventHistory with routeForWorkflowTabPreference that checks the tab preference then picks the appropriate route. Or link to /runId and let that layout.ts hand redirect. We should use the existing eventFilterSort persistStore instead of getPersistedSort. This also currently doesn't let you change your sort order because updateEventFilterParams uses descending as the default sort (no query param, but then gets overridden by getPersistedSort which as ascending if (filters.sort !== undefined) { |
All good. I just had Claude throw this together. It should have been in draft. I haven’t reviewed it yet. 🫠 |
|
Closing in favor of #3260. |
Summary
preferredWorkflowTabpersistStore?sort=URL param is present, instead of always defaulting to descendingChanges
src/lib/stores/event-view.tspreferredWorkflowTabpersistStoresrc/routes/.../[run]/+page.tssrc/lib/layouts/workflow-header.svelte$effectpersists tab on navigationsrc/lib/utilities/event-filter-params.tsTest plan
pnpm check— 0 errorspnpm lint— 0 new errorspnpm test -- --run— 1671 tests passed?sort=ascendingoverrides stored preferenceCloses DT-3709