Skip to content

feat(client): sync sessions search filter to URL params - #211

Merged
MathurAditya724 merged 5 commits into
mainfrom
issue-197-sync-sessions-search-url
Sep 19, 2026
Merged

MathurAditya724 merged 5 commits into
mainfrom
issue-197-sync-sessions-search-url

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Stores the sessions page search query in the search URL param instead of local useState, matching the events page. The filter now survives refresh, can be bookmarked/shared, and browser back/forward restores it. (Page/limit were already URL-synced.)

Testing

  • vitest run src/client/pages/sessions.test.ts (3 passed)
  • biome check clean, tsc --noEmit no new errors

Closes #197

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
jared 2862e5b Sep 19 2026, 06:43 PM

@jared-outpost
jared-outpost Bot marked this pull request as ready for review September 19, 2026 15:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8070530. Configure here.

@jared-outpost

jared-outpost Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

thanks bugbot — the one issue you flagged (search blur resetting the page) is fixed in e2980aa: applySearchFilter now no-ops when the query is unchanged, so a plain focus/blur no longer bumps the page or history. the earlier onBlur-vs-onClick history bug was also addressed in 8070530.

Store the sessions page search query in the `search` URL param instead of
local state, matching the events page. The filter now survives refresh, can
be bookmarked/shared, and browser back/forward restores it. Applied on
Enter/blur, cleared on Escape.

Fixes #197
Add onMouseDown preventDefault to the clear button so the input keeps
focus and applySearchFilter does not run before clearSearchFilter,
avoiding a stray intermediate history entry.
Guard applySearchFilter so a plain focus/blur with no change does not
reset page to 1 or push a duplicate history entry.
Mirror the sessions fixes on the events page repo filter: skip the commit
when the value is unchanged, and preventDefault on the clear button's
mousedown so onBlur does not push a duplicate history entry.
Guard clearSearchFilter/clearRepoFilter so clearing an already-empty
input (e.g. Escape on a later page) does not reset pagination to page 1.
@MathurAditya724
MathurAditya724 force-pushed the issue-197-sync-sessions-search-url branch from 9a041ab to 2862e5b Compare September 19, 2026 18:43
@MathurAditya724
MathurAditya724 enabled auto-merge (squash) September 19, 2026 18:43
@MathurAditya724
MathurAditya724 merged commit e308fd0 into main Sep 19, 2026
17 of 19 checks passed
@MathurAditya724
MathurAditya724 deleted the issue-197-sync-sessions-search-url branch September 19, 2026 18:44
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.

Sync sessions page search filter to URL params

1 participant