Unify study search and reduce Browse rendering work

Merged
LU
18h ago
+202-31

From the second usability review of 21 October 2026. This was an agent-led review using simulated perspectives, not recruited participants. GPT 6.1 Sol implemented the changes; Claude reviewed them. This PR fixes C16, the indexing part of C03, the Citation Impact empty state from C02, and the rendering part of C23.

Changes

  • One normaliser for Browse and Citation Impact:
    • case-folding;
    • accent removal, so Müller matches Muller;
    • curly quotes mapped to straight ones;
    • DOI URLs and doi: prefixes accepted;
    • multi-word queries match across fields ("Bem 2011", "Strack 1988"), and quoted phrases must match within one field.
  • Citation Impact search now also indexes year and journal.
  • Search index: formatted author names replace the raw Crossref JSON, so "family" and "given" no longer match 3,058 pairs. Raw outcome codes and non-DOI URLs are no longer indexed. Quotations stay searchable; the Browse-filters proposal makes them opt-in.
  • Empty state: Citation Impact shows a message and a Clear search button when nothing matches.
  • Speed: search input is debounced by 200 ms; row creation is deferred; there is one draw per Show all. On a heavily loaded machine, the median Show all time fell from about 4.7 s to 2.8 s.

Tests

Two new browser scenarios cover accents, quotes, author and year queries, DOI URLs, metadata-key queries, quotation retention, deferred rows, debouncing and the empty state. Full suite passes locally (18/18).

For review

Searching for "failed" can still match quotation text; the exact outcome filter is in the Browse-filters proposal. "Mueller" is still a separate spelling from "Müller".

🤖 Generated with Claude Code


Summary by cubic

Unifies search across Browse and Citation Impact and cuts rendering work in Browse, addressing usability issues C16, the indexing part of C03, the empty state from C02, and the rendering part of C23.

  • Both searches now fold case, strip accents (Müller matches Muller), map curly quotes to straight ones, accept DOI URLs and doi: prefixes, and match multi-word queries across fields while quoted phrases must match within one field.
  • Citation Impact now indexes year, journal, and full author names, shows a message with a Clear search button when nothing matches, and rebuilds its index when a DOI deep link loads citation data before the FLoRA pairs arrive.
  • The Browse search index uses formatted author names instead of raw Crossref JSON, so metadata keys like "family" and "given" no longer match thousands of rows; raw outcome codes and non-DOI URLs are no longer indexed, while quotations stay searchable.
  • Both search inputs are debounced by 200 ms, Browse defers row creation, and Show all performs a single draw; median Show all time fell from about 4.7 s to 2.8 s on a loaded machine.
  • New browser scenarios cover the shared search rules, debouncing, deferred rows, late debounce, full-author and deep-link lookups, and empty-state recovery.