Search hides request failures as no results or missing items #877

Open
opened 2026-10-02 17:29:29 +00:00 by kayg · 0 comments
Owner

Evidence

  • apps/web/src/lib/search/registry.ts:121-151 turns a provider failure into an empty result array. The code comment says an offline provider “answers nothing”.
  • apps/web/src/lib/components/search-dialog.svelte:886-898 shows “No matches” when the result list is empty and the query is not empty. It cannot tell a successful empty result from a failed server search.
  • apps/web/src/lib/search/SearchPreview.svelte:181-190,234-240 turns any preview request failure into missing. The Calendar preview then says the item is no longer in the calendar.

Rule

Issue #869 and CLAUDE.md require real error states. A network failure is not a successful empty search or proof that an item is gone.

Expected behaviour

Keep provider and preview failures as errors. Show plain error text and a Retry action. Show “No matches” only after a successful search response with no matches. Show “This item is no longer in the calendar” only after a confirmed missing response.

Test idea

Make the server search provider return 500 and fail offline. Check that the palette shows an error, not “No matches”. Make an Event preview return 500 and 404. Check that the error and missing states differ, and that Retry can load the Event.

## Evidence - `apps/web/src/lib/search/registry.ts:121-151` turns a provider failure into an empty result array. The code comment says an offline provider “answers nothing”. - `apps/web/src/lib/components/search-dialog.svelte:886-898` shows “No matches” when the result list is empty and the query is not empty. It cannot tell a successful empty result from a failed server search. - `apps/web/src/lib/search/SearchPreview.svelte:181-190,234-240` turns any preview request failure into `missing`. The Calendar preview then says the item is no longer in the calendar. ## Rule Issue #869 and CLAUDE.md require real error states. A network failure is not a successful empty search or proof that an item is gone. ## Expected behaviour Keep provider and preview failures as errors. Show plain error text and a Retry action. Show “No matches” only after a successful search response with no matches. Show “This item is no longer in the calendar” only after a confirmed missing response. ## Test idea Make the server search provider return 500 and fail offline. Check that the palette shows an error, not “No matches”. Make an Event preview return 500 and 404. Check that the error and missing states differ, and that Retry can load the Event.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#877
No description provided.