Skip to content

fix(server): recover the results page when a scope filters everything out#88

Merged
ErikChevalier merged 1 commit into
mainfrom
fix/empty-scope-recovery
Jun 11, 2026
Merged

fix(server): recover the results page when a scope filters everything out#88
ErikChevalier merged 1 commit into
mainfrom
fix/empty-scope-recovery

Conversation

@ErikChevalier

Copy link
Copy Markdown
Contributor

Problem

On the served results page the scope bar only rendered when results existed. An include scope that matched nothing (e.g. "Recipes" on a threejs search) produced a blank "No results" page with no way to see or clear the scope that hid the results, and re-searching kept filtering to empty because the scope persisted invisibly. This reads as "the page lost my results."

Fix

The empty-results branch now (for the loopback owner):

  • renders the scope bar so the active scope is visible and switchable,
  • attributes the emptiness to the scope: "No results match the '{scope}' scope for '{query}'.",
  • offers a one-click Clear scope that posts an empty lens and returns to the same query unfiltered.

Verification

  • Live: applying "Recipes" to threejs shows the scope bar + clear control; clicking Clear restored all 10 results.
  • New tests/server/test_empty_scope_recovery.py (owner sees recovery UI; no active scope keeps the plain message; a network visitor gets no controls). Full suite green.

🤖 Generated with Claude Code

… out

On the served results page the scope bar only rendered when there were
results, so an include scope that matched nothing left a blank "No results"
page with no way to see or clear the scope that hid them. Re-searching kept
filtering to empty because the scope persisted invisibly.

The empty-results branch now renders the scope bar, attributes the emptiness
to the active scope ("No results match the '<scope>' scope for '<query>'"),
and offers a one-click "Clear scope" that posts an empty lens and returns to
the same query unfiltered. Owner-only, like the rest of the in-page controls.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ErikChevalier ErikChevalier merged commit 15c05ec into main Jun 11, 2026
1 check passed
@ErikChevalier ErikChevalier deleted the fix/empty-scope-recovery branch June 11, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant