Skip to content

feat: sync table sort state to the URL - #2029

Open
mentonin wants to merge 1 commit into
kernelci:mainfrom
profusion:sort-url
Open

feat: sync table sort state to the URL#2029
mentonin wants to merge 1 commit into
kernelci:mainfrom
profusion:sort-url

Conversation

@mentonin

@mentonin mentonin commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Persist sortable table state in the URL via a shared useSortingState hook and root tableSort search param, so sort order is shareable and bookmarkable.
  • Encode a single active table as flat s=…; use keyed params (s|b=…, s|t=…) only on pages with multiple tracked tables (issue details).
  • Clear tableSort when switching tree/hardware details tabs so inactive tables do not keep stale sort.

Test plan

  • Sort tree, hardware, and issue listing tables; confirm the URL updates and reload/share restores the same sort
  • Reset to default sort and confirm the s / tableSort param is omitted
  • On tree and hardware details, sort a tab, switch tabs, and confirm sort resets for the newly active table
  • On issue details, sort builds and tests independently and confirm keyed URL params (s|b, s|t)
  • Confirm unit tests: useSortingState.test.ts, search.test.ts

Related issues

Make sortable tables shareable via search params: flat s=… for single
tables, keyed s|… when multiple tables share a page. Clear sort when
switching details tabs so inactive tables do not keep stale ordering.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
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.

Add non-default table sort to URL for easier sharing

1 participant