explorer: rewrite on progressive_globe foundation for speed + add results table#153
Merged
rdhyee merged 4 commits intoisamplesorg:mainfrom May 1, 2026
Merged
Conversation
Replaces the OJS-reactive explorer (sampleData → renderPoints → Cesium re-add chain) with the progressive_globe architecture, then layers the explorer's facet UI and a results table on top. Speed wins from progressive_globe: - Globe loads H3 res4 (580 KB) in ~1 s, then swaps to res6 / res8 as the camera zooms; only at <120 km does it switch to individual point primitives, viewport-bounded with 30% padding cache. - Cesium viewer is mounted eagerly and lives outside the OJS reactive graph — filter changes call loadRes() / loadViewportSamples() rather than invalidating sampleData and rebuilding the whole point set. - Two PointPrimitiveCollections (h3Points, samplePoints) toggled via .show, never destroyed/re-created. - Source filter applied at H3 level (works on the cluster files); material / sampled-feature / specimen filters apply at point zoom and to the results table. Explorer-specific additions on top of progressive_globe: - Specimen Type (object_type) filter alongside Material and Sampled Feature, populated from facet_summaries; switches facets_url to the v2 file (which carries object_type). - ?sources=A,B query string is read on load to pre-check the source legend before phase 1 runs, and is kept in sync as the filter changes (camera state continues to live in the URL hash). - "### Results" table below the globe shows the first 200 samples matching the current filters via lite_url (joined to facets_url when facet filters are active). Refreshes on every filter change. - Frontmatter title, intro, and "See Also" framing match the explorer's role; preloads samples_map_lite.parquet. Removes the old reactive sampleData / whereClause / cross-filter cache machinery, the v1/v2 explorerVersion toggle, the maxSamples slider (progressive_globe hard-codes POINT_BUDGET=5000), and the SKOS prefLabel lookup (URI-tail fallback is good enough for facet labels). Smoke-tested locally: 0 JS exceptions, 0 console errors, 0 network failures; globe paints res4 clusters and the results table fills in from lite_url. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Brings the previous explorer's filter UX back on top of the progressive_globe-based rewrite (isamplesorg#153): - Source legend now shows per-source counts loaded from facet_summaries (matches the (12,345)-style badges on the prior live page). - Material / Sampled Feature / Specimen Type checkboxes use SKOS prefLabels via vocab_labels.parquet (~60 KB lookup) with URI-tail fallback. Full URI is preserved as the checkbox value so the SQL filter matches sample_facets_v2's URI-string columns exactly. - Filter semantics flip back to the prior pattern: empty = no filter (show everything); selecting items = include only those. Reduces side-panel noise at startup (was rendering hundreds of pre-checked rows). - Max Samples slider (1K-100K, default 25K) drives both the globe's point-mode budget and the results-table query LIMIT. Live label updates while dragging; query refreshes on release (debounced 300 ms). - "Clear Filters" button next to Share resets to a clean state by reloading to the bare pathname (matches the prior <a href="?">). - Results table is now scrollable (max-height 600 px) and capped at 200 rendered rows so a 100K-LIMIT query doesn't blow up DOM. Meta line reports `first N of M+` when the LIMIT is hit. Smoke test: 0 JS exceptions, 0 console errors, 0 network failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… honest P2 fixes from Codex review of isamplesorg#153: 1. doSearch() now composes facet filters (Material / Sampled Feature / Specimen Type) via JOIN sample_facets_v2 on pid, mirroring the pattern used by loadViewportSamples and refreshResultsTable. Was only honoring text + source filter, so search could surface and fly to samples outside the active facet selection — inconsistent with the rest of the explorer. 2. "How It Works" prose no longer claims source filtering "applies at every zoom level." Now states explicitly that at cluster zoom the H3 tier files carry one row per (h3_cell, dominant_source), so source filtering keeps cells whose *dominant* source matches; mixed cells where the unchecked source isn't dominant are still drawn (and contribute their full sample_count to the legend). Per-source filtering kicks in fully at sample zoom and in the table/search. Per-source-per-cell H3 builds would fix this properly but require a different parquet build — out of scope. 3. Updated the data-tier table to reflect Max Samples slider (default 25K, max 100K) instead of the stale 5K hardcoded value. Smoke test still PASS (0 exceptions, 0 errors, 0 network fails). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The cluster H3 filter is `WHERE dominant_source IN (checked)`, so "OpenContext present but not dominant" does not keep a cell visible when OpenContext is unchecked — the cell's dominant source is what gets matched. Reworked the prose to spell out both consequences: (1) cell whose dominant is X disappears entirely when X unchecked, even if it contains samples from still-checked sources; (2) cell whose dominant is X stays with full sample_count when X checked, even if some samples in it are from unchecked sources. Codex P3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 1, 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.
Summary
Rewrites
tutorials/isamples_explorer.qmdon theprogressive_globe.qmdfoundation so the search/filter explorer gets the same near-instant globe rendering as the Progressive Globe page. Also adds a Specimen Type facet, a results table below the globe, and?sources=URL-param sync.Live preview: https://rdhyee.github.io/isamplesorg.github.io/tutorials/isamples_explorer.html?sources=OPENCONTEXT
Speed wins (lifted from progressive_globe)
Explorer-specific additions on top
What I dropped
Test plan
Compatibility
🤖 Generated with Claude Code