docs: explorer state contract (closes #164)#166
Conversation
…amplesorg#165 review Codex review of isamplesorg#165 surfaced a third option that supersedes the prior A/B framing: side-panel lookup with a temporary point-overlay of matching samples on the globe. Backend contract is unchanged from option B — cluster layer and facet counts remain unaffected — but the UI surface gains a visual answer to "where did my search land geographically." Resolves isamplesorg#163 item 4 (zero results + populated map UX wart) cleanly: zero results render zero pins; non-zero results render distinguishable result pins layered above the cluster layer. Adds a small state-inventory addendum: viewer.searchResultPoints (new Cesium primitive collection), and an optional viewer._searchResults cache. URL/hash params and DOM-as-state are unchanged. Refs isamplesorg#163, isamplesorg#165, PR isamplesorg#166. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Updated: option C added per Codex review on #165Codex's review on #165 surfaced a third option that supersedes the prior A/B framing in §6: (C) Side-panel lookup with result-pin overlay — search backend is unchanged from option B (cluster layer and facet counts remain unaffected), but the UI surface gains a temporary point-overlay of the matching samples on the globe. Cleared when the search is cleared. Resolves #163 item 4 cleanly without making H3 clusters text-aware. The new commit (`26429ec`):
URL/hash params and DOM-as-state are unchanged. The "backend orthogonal to UI surface" framing is preserved — (C) is compatible with every search backend the substrate work in #169-#172 might land. Diff is +96/-40 against the original PR; same author, same scope. |
|
Review follow-up from the FTS/state-contract pass: The option C revision is the right direction, but I would tighten two things before treating #163 item 4 as closed.
I'd also make the overlay styling part of the contract: distinct ring/halo pins, capped to the displayed result set, layered above clusters/sample points, and click behavior matching sample-mode point selection. Without that, the new pathology is visual competition with the cluster layer, even though the backend/facet-count semantics are clean. |
…iew) Codex round-2 review on isamplesorg#165 flagged that option C's UX was under-specified and §9 still pointed at the superseded "side-panel-copy fix" framing for isamplesorg#163 item 4. §6 additions: - Implementation rules table: 50-pin cap, z-order above cluster + sample-mode, hollow ring styling on source palette, hover/click behaviors mirror existing patterns, fit-to-bounds only when result extent < 30° × 30° (otherwise fly-to-top-1 to avoid disorienting zoom-out on globally distributed result sets). - Result-set shape acceptance table: zero, one, local-many, global-many must each be visually verified. §9 reconciliation: - isamplesorg#163 item 4 framing updated from "side-panel-copy fix" to "resolved by option C with the four shape cases verified." Refs isamplesorg#163, isamplesorg#165, PR isamplesorg#166. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Round-2 fixes (commit `9d35a30`)Codex round-2 review on #165 flagged two things in this PR:
Also added a result-set shape acceptance table in §6 — implementation must visually verify zero, one, local-many (regional cluster), and global-many (multi-continent spread) before this counts as done. Diff: +30/-7 on top of the existing PR. |
State-contract doc for explorer.qmd: enumerates every URL query param, hash param, DOM-as-state element, viewer.* / window.* widget field, and OJS cell with deps + side effects. Records the search-semantics decision (option B, side-panel lookup) and restates the facet-count contract from isamplesorg#158. Doc-only; no code changes. Refs isamplesorg#163, isamplesorg#158, PR isamplesorg#162. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…amplesorg#165 review Codex review of isamplesorg#165 surfaced a third option that supersedes the prior A/B framing: side-panel lookup with a temporary point-overlay of matching samples on the globe. Backend contract is unchanged from option B — cluster layer and facet counts remain unaffected — but the UI surface gains a visual answer to "where did my search land geographically." Resolves isamplesorg#163 item 4 (zero results + populated map UX wart) cleanly: zero results render zero pins; non-zero results render distinguishable result pins layered above the cluster layer. Adds a small state-inventory addendum: viewer.searchResultPoints (new Cesium primitive collection), and an optional viewer._searchResults cache. URL/hash params and DOM-as-state are unchanged. Refs isamplesorg#163, isamplesorg#165, PR isamplesorg#166. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…iew) Codex round-2 review on isamplesorg#165 flagged that option C's UX was under-specified and §9 still pointed at the superseded "side-panel-copy fix" framing for isamplesorg#163 item 4. §6 additions: - Implementation rules table: 50-pin cap, z-order above cluster + sample-mode, hollow ring styling on source palette, hover/click behaviors mirror existing patterns, fit-to-bounds only when result extent < 30° × 30° (otherwise fly-to-top-1 to avoid disorienting zoom-out on globally distributed result sets). - Result-set shape acceptance table: zero, one, local-many, global-many must each be visually verified. §9 reconciliation: - isamplesorg#163 item 4 framing updated from "side-panel-copy fix" to "resolved by option C with the four shape cases verified." Refs isamplesorg#163, isamplesorg#165, PR isamplesorg#166. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex round-3 wording nit: "Never render more, never render fewer than the result set size" was ambiguous since the full match set may exceed 50. Reword as "Pin count equals min(50, total_matches)" — the displayed result set is what gets pinned, not the full match set. Refs isamplesorg#165, PR isamplesorg#166. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9d35a30 to
062863d
Compare
Round-3 cleanup appliedThree small fixes per Codex round-3 review on #165:
|
|
Review result: no blocking issues found. The state-contract doc is internally consistent with the option-C decision, and it keeps the UI-surface contract orthogonal to the search substrate work. |
Summary
Adds
EXPLORER_STATE.md— the state-contract doc forexplorer.qmd, requested in #164.viewer.*/window.*fields, OJS cells with deps + side effects.?search=non-empty) and a result-set-shape acceptance table (zero / one / local-many / global-many) are non-negotiable defaults for the implementer.?search=does NO modify facet counts; backend contract unchanged from option B).explorer.qmdline numbers against currentmain(94e7674)._urlParamsHydratedis gone.PR is doc-only, no code changes. Three commits: original doc (
78ec90a), option C addition (d139313), option C UX-rule + §9 reconciliation + pin-count wording (cdab34a+062863d).What this unblocks
Once merged, the items in #163 can be re-scoped against the contract:
writeQueryState/ hydration cycle.Coordinating with the parallel FTS workstream
The search-backend question is intentionally orthogonal to option C. The state contract specifies which UI surfaces display matches (side panel + result-pin overlay); the FTS substrate work in #165 / #169-#172 specifies how matches are computed. The two land independently; the contract is compatible with every backend the FTS work might choose (in-browser ILIKE, static-Parquet inverted index, hosted-search service).
Test plan
explorer.qmdCloses #164. Refs #163, #158, PR #162, #165 (Codex review surfaced option C).
🤖 Generated with Claude Code