Skip to content

Sync sessions page search filter to URL params #197

Closed

Description

@MathurAditya724

Problem

The sessions page search filter is stored in local useState, not synced to URL search params. This means:

  • Search state is lost on page refresh
  • Filtered views cannot be bookmarked or shared via URL
  • Browser back/forward does not restore filter state

This is inconsistent with the events page which correctly syncs status, repo, and page to URL search params.

Affected File

  • apps/server/src/client/pages/sessions.tsx:112 — const [searchInput, setSearchInput] = useState("")

Reference Implementation

The events page at events.tsx uses useSearchParams():

const [searchParams, setSearchParams] = useSearchParams();
const status = searchParams.get("status") || "all";
const repo = searchParams.get("repo") || "";
const page = Number(searchParams.get("page")) || 1;

Expected Fix

  1. Replace useState with useSearchParams for the search query
  2. Read the initial search value from searchParams.get("search") or searchParams.get("q")
  3. Update the URL param on search submit (Enter key / blur)
  4. Sync the page number to URL params as well (currently also local state at sessions.tsx:113)
  5. Ensure browser back/forward navigates through filter history

Impact

Medium — Operators sharing a filtered view of agent runs (e.g., "look at runs for repo X") currently cannot share or bookmark the URL. This is a functional gap compared to the events page.

Activity

  1. jared-outpost commented on Sep 19, 2026

    @jared-outpost
    Contributor

    opened #211 to sync the sessions search filter to the search URL param (mirrors the events page). survives refresh, is shareable/bookmarkable, and back/forward restores it. ready for review whenever you get a chance.

  2. added 2 commits that reference this issue on Sep 19, 2026
    89fc3f4
    e308fd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjaredTrigger the Jared agent to work on stuff

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions