explorer: be honest that the samples table is not filtered by free-text search (#247)#250
Merged
Merged
Conversation
…ples "match the current filters" during a search (isamplesorg#247) Free-text search is not yet a table/globe predicate (that's isamplesorg#234 Step 4 / axis A1). Until A1 lands, a committed search (e.g. "bucchero") flies the camera and the samples table then fills with whatever is in the new viewport — e.g. 43,803 GEOME marine mollusks — while labeling them "match the current filters." Actively misleading; the actual search results sit in the side panel. Interim honesty fix only — no change to the search substrate or any query: - summaryText(): when a search is committed, disclose that the table reflects the map view + source/facet filters only, and point to the side panel ("…Search results for \"X\" are shown in the panel →"). - doSearch(): maintain window.__explorerActiveSearch (committed term, or null on empty/too-short submit) as the cross-cell signal summaryText reads. - samplesSection: make the search-results heading prominent and sticky so it reads unmistakably as the search results. No page/camera scroll (per Codex review — behavior, not copy). Real fix (search as a global filter across table/globe/counts) tracked as isamplesorg#234 Step 4 / A1; may want the FTS substrate (isamplesorg#168-172) first for scale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Interim honesty fix for #247: free-text search is not yet a filter on the main samples table. After a search the camera flies and the table fills with whatever is in the new viewport — e.g. searching
bucchero(Etruscan pottery) flies to Tuscany and the table then shows 43,803 GEOME marine mollusks while the meta line claims they "match the current filters." The actual search results sit in the side panel.This PR makes the UI honest about what the table is showing. It does not change any SQL / query / filter behavior — the real fix (search as a global filter across table/globe/counts) is #234 Step 4 / axis A1, deferred because it touches every count surface and may want the FTS substrate (#168–172) first for scale. See the analysis + Claude⇄Codex consensus in #247.
Changes (all in
explorer.qmd)summaryText()— when a search is committed, the table meta now reads e.g.instead of "43,803 samples match the current filters." The "non-search filters" wording deliberately marks this as pre-A1 behavior (per Codex review) so it doesn't quietly redefine what A1 will mean. No active search → unchanged copy.
doSearch()— maintainswindow.__explorerActiveSearch(committed term, ornullon empty/too-short submit) as the cross-OJS-cell signalsummaryText()reads, and nudgeswindow.refreshSamplesTable?.()after commit/clear so the meta updates even for area-scope searches that don't move the camera.Side panel — the search-results heading is now prominent + sticky (within
#samplesSection's own scroll box; no page/camera scroll), so it reads unmistakably as the search results the meta points at. A shared heading helper now also paints the zero-result and error panel states, so the "→ panel" pointer is never left pointing at stale/empty content.Verification
quarto render explorer.qmdclean;git diff --checkclean.__explorerActiveSearch="bucchero", search telemetryerror:null/ 50 of 2,693, side panel shows the 50 real Poggio Civitate hits under the sticky heading, no console errors.samples_map_litefetch; the honesty string is deterministic given the committed-search flag, which is confirmed set.Staging: https://rdhyee.github.io/isamplesorg.github.io/explorer.html?search=bucchero&sources=OPENCONTEXT%2CGEOME%2CSMITHSONIAN#v=1&lat=40.8958&lng=5.2905&alt=3048966
Provenance
Claude; Codex 2-round review — round 1 reached the ship-ad-hoc-fix-now / A1-later consensus on #247; round 2 reviewed this diff and caught that the active-search flag stayed set on zero-result/error searches (the panel pointer would lie), now fixed by painting those panel states + the refresh nudge. Empirically verified on staging.
Closes #247 (interim); real fix tracked under #234 Step 4 / A1.
🤖 Generated with Claude Code