From e60d6b74d890e56657736a8adf8c1127d3cc5a5a Mon Sep 17 00:00:00 2001 From: cproudlock Date: Wed, 26 Aug 2026 15:05:54 -0400 Subject: [PATCH] Search: a domain that FAILED no longer looks like one that found nothing Every domain catches broadly and returns no rows so one broken table cannot take the whole search box down. That part is right. On its own, though, it makes a DOWN domain indistinguishable from an EMPTY one: the technician sees no results, is offered a spelling correction, and concludes the record does not exist. It does - the search just could not look. Failed domains are now named in the response and stated above the results. The suggestion is deliberately still offered on a degraded run. Suppressing it was tried first and is worse: a chronically unreachable domain, an external HR directory say, would silently disable spelling help for every search for ever with nothing saying why. Naming the failure is the honest fix; withholding a second useful signal is not. Guides search also moves to the published revision. It correctly limited itself to published GUIDES, but matched and displayed title/summary/tags/blocksjson from the Guide row - which is the WORKING copy. A published guide with unpublished edits matched on wording that only exists in the draft, and the reader opened it to find the word absent. --- frontend/src/views/SearchResults.vue | 27 ++++++ shopdb/core/api/search.py | 114 +++++++++++++++++------- tests/test_core/test_search_degraded.py | 65 ++++++++++++++ 3 files changed, 175 insertions(+), 31 deletions(-) create mode 100644 tests/test_core/test_search_degraded.py diff --git a/frontend/src/views/SearchResults.vue b/frontend/src/views/SearchResults.vue index 1eb53316..3e3d4b41 100644 --- a/frontend/src/views/SearchResults.vue +++ b/frontend/src/views/SearchResults.vue @@ -35,6 +35,18 @@
Searching...