Skip to content

Search history and saved filters #4

@sacredvoid

Description

@sacredvoid

Problem

Users frequently search for the same topics or use the same filter combinations, but there's no way to recall previous searches. Each session starts from scratch.

Proposed Solution

Recent Searches

  • Store last 10-20 searches in localStorage (query, mode, filters, timestamp)
  • Display recent searches on the search page when the input is empty or focused
  • Click to re-execute a previous search with all filters restored
  • Clear history button

Saved Search Filters

  • Allow users to save a named filter preset (e.g., "ML profs in US with 1000+ citations")
  • Store in localStorage alongside existing researchprof_saved data
  • Quick-apply buttons on the search page
  • Edit/delete saved filters

Implementation Notes

  • Follow the existing useSyncExternalStore + localStorage pattern from storage.ts
  • Add new storage key researchprof_searches for history
  • Add new storage key researchprof_filters for saved presets
  • New component: SearchHistory shown below search input
  • Preserve URL query params so searches remain shareable

Priority

High — low effort, high user value. Reduces friction for repeat users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions