Skip to content

feat(insights,citations): keep filters in the URL #917

Closed

Description

@gkhngyk

Description

Insights and Citations keep their filters only in React state — web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx line 976 and web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx line 811 both start from useState(DEFAULT_FILTERS). A refresh resets the date range, model, region and topic, and a filtered view can't be shared as a link.

Prompts already keeps its tab, view and range in the URL (web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx, around lines 968–999).

Proposed behavior

  • Non-default filter values are written to the query string with router.replace / history.replaceState (no new history entry); defaults are omitted.
  • On load, values are read from the URL; unknown values fall back to the default.
  • Existing params (e.g. Insights' jobId) keep working.

Suggested approach

A small parse/serialize helper per page for its filter object, following the Prompts page. One PR per page is fine.

Run yarn lint and yarn build from web/ before opening the PR — see CONTRIBUTING.md.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    ai visibility
    citations
    on Oct 4, 2026
  2. added a commit that references this issue on Oct 8, 2026
    69c4e5f
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

    ai visibilitycitationsenhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions