fix: prevent Enter key from re-running a settled search (#473) #487

Merged
guettlibot merged 1 commits from fix/prevent-settled-search-rerun-473 into main 2026-06-06 16:02:51 +00:00
guettlibot commented 2026-06-06 15:21:30 +00:00 (Migrated from codeberg.org)

Summary

  • Closes Search broken. (#473)
  • Adds _lastSettledQuery field to track the query that produced the current displayed results
  • _runSearch returns early when results are already settled for the same query (no loading spinner, no redundant IMAP round-trip)
  • Adds a widget test that re-focuses the search field and presses Enter twice, asserting searchEmails is not called a second time

Test plan

  • New test pressing Enter on already-settled search does not re-run search (issue #473) passes
  • All pre-existing widget tests still pass (pre-existing shader failure in unrelated test is unchanged)
  • CI green

🤖 Generated with Claude Code

## Summary - Closes #473 - Adds `_lastSettledQuery` field to track the query that produced the current displayed results - `_runSearch` returns early when results are already settled for the same query (no loading spinner, no redundant IMAP round-trip) - Adds a widget test that re-focuses the search field and presses Enter twice, asserting `searchEmails` is not called a second time ## Test plan - [ ] New test `pressing Enter on already-settled search does not re-run search (issue #473)` passes - [ ] All pre-existing widget tests still pass (pre-existing shader failure in unrelated test is unchanged) - [ ] CI green 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.