Skip to content

[codex] Phase 4: add globe table view#160

Merged
rdhyee merged 2 commits intoisamplesorg:mainfrom
rdhyee:codex/issue-156-phase-4-table
May 1, 2026
Merged

[codex] Phase 4: add globe table view#160
rdhyee merged 2 commits intoisamplesorg:mainfrom
rdhyee:codex/issue-156-phase-4-table

Conversation

@rdhyee
Copy link
Copy Markdown
Contributor

@rdhyee rdhyee commented May 1, 2026

Summary

Implements issue #156 Phase 4 on top of the merged Phase 1 work.

  • adds a binary Globe/Table toggle without destroying the Cesium viewer
  • renders a paginated table with bounded maxSamples control
  • reuses the portable Phase 1 facet predicate for table filtering

Verification

  • quarto render tutorials/progressive_globe.qmd

Draft because phases 2, 3, and 4 are parallel PRs and may need final integration ordering.

@rdhyee
Copy link
Copy Markdown
Contributor Author

rdhyee commented May 1, 2026

Review finding: table results can go stale across view switches. setView() only refreshes table data when entering table mode if rows.length === 0, while filter-change listeners refresh only when table mode is already active. If a user loads the table, switches back to globe, changes filters, then returns to table, the old rows are reused. Off-table filter changes should mark the table dirty or force a refresh on the next table entry.

@rdhyee
Copy link
Copy Markdown
Contributor Author

rdhyee commented May 1, 2026

Addressed in 7fd98ec: table view now tracks a dirty state when filters change outside table mode, and refreshes on the next table entry instead of reusing stale rows.

@rdhyee rdhyee force-pushed the codex/issue-156-phase-4-table branch from 7fd98ec to 3f3f58c Compare May 1, 2026 17:44
@rdhyee rdhyee marked this pull request as ready for review May 1, 2026 17:44
@rdhyee rdhyee merged commit 02eb168 into isamplesorg:main May 1, 2026
1 check passed
rdhyee added a commit to rdhyee/isamplesorg.github.io that referenced this pull request May 1, 2026
Closes the unified-explorer migration (issue isamplesorg#156). Phases 1-4 (isamplesorg#157-isamplesorg#160)
built the unified UI on tutorials/progressive_globe.qmd; this PR promotes
it to the canonical site-root URL and retires the old Search Explorer
page.

Rename + asset-path fix
- Move tutorials/progressive_globe.qmd → explorer.qmd at site root.
- Adjust source-palette import from `../assets/js/source-palette.js` to
  `assets/js/source-palette.js` so it resolves on both isamples.org and
  on rdhyee.github.io/isamplesorg.github.io PR previews.

URL param: search, not q
- The explorer's URL state now uses `?search=` instead of `?q=`. Quarto's
  site-wide search reserves `?q=` for its highlight feature and strips
  the param via history.replaceState before any of our cells run (see
  docs/site_libs/quarto-search/quarto-search.js). `?search=` is unused
  by Quarto and survives intact.

Redirect stubs at the old URLs
- tutorials/progressive_globe.html and tutorials/isamples_explorer.html
  become preview-safe redirect stubs:
    new URL('../explorer.html' + search + hash, href)
- They forward whatever query string the browser presents. Note: legacy
  `?q=basalt` URLs lose the search term because Quarto strips `?q=`
  before our stub script runs (the stub is itself a Quarto-rendered
  page, so its <head> loads quarto-search.js). Non-q params (sources,
  material, etc.) and the hash fragment all survive — the only
  affected URLs are Phase 3 dev test links that were never published.

_quarto.yml + internal links
- Navbar Interactive Explorer href → explorer.qmd. Search Explorer
  removed from both the How-to-Use menu and the sidebar.
- Update internal links to /explorer.html in index.qmd, how-to-use.qmd,
  tutorials/index.qmd, about.qmd, data.qmd, design/index.qmd,
  index_alt.qmd, query-spec.qmd, tutorials/narrow_vs_wide_performance.qmd,
  and the existing parquet_cesium_isamples_wide redirect stub.

Tests
- tests/test_explorer.py → tests/test_globe.py targeting /explorer.html.
- Selectors updated for the unified DOM-based UI: #sourceFilter,
  #materialFilter, #contextFilter, #objectTypeFilter, #globeViewBtn /
  #tableViewBtn (no List view), #maxSamples number input.
- Unskip the cross-filter facet tests deferred in isamplesorg#155 — native HTML
  checkboxes respond to programmatic .click() unlike the old Explorer's
  OJS Inputs.checkbox.
- Add redirect-preserves-params tests for both old URLs (using the
  current ?search= param, which survives Quarto's q-stripping).
- test_navigation.py + test_tutorials_landing.py drop Search Explorer
  assertions and retarget the globe-loads test to /explorer.html.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rdhyee added a commit that referenced this pull request May 1, 2026
…#162)

* Phase 5: rename Interactive Explorer to /explorer.html with redirects

Closes the unified-explorer migration (issue #156). Phases 1-4 (#157-#160)
built the unified UI on tutorials/progressive_globe.qmd; this PR promotes
it to the canonical site-root URL and retires the old Search Explorer
page.

Rename + asset-path fix
- Move tutorials/progressive_globe.qmd → explorer.qmd at site root.
- Adjust source-palette import from `../assets/js/source-palette.js` to
  `assets/js/source-palette.js` so it resolves on both isamples.org and
  on rdhyee.github.io/isamplesorg.github.io PR previews.

URL param: search, not q
- The explorer's URL state now uses `?search=` instead of `?q=`. Quarto's
  site-wide search reserves `?q=` for its highlight feature and strips
  the param via history.replaceState before any of our cells run (see
  docs/site_libs/quarto-search/quarto-search.js). `?search=` is unused
  by Quarto and survives intact.

Redirect stubs at the old URLs
- tutorials/progressive_globe.html and tutorials/isamples_explorer.html
  become preview-safe redirect stubs:
    new URL('../explorer.html' + search + hash, href)
- They forward whatever query string the browser presents. Note: legacy
  `?q=basalt` URLs lose the search term because Quarto strips `?q=`
  before our stub script runs (the stub is itself a Quarto-rendered
  page, so its <head> loads quarto-search.js). Non-q params (sources,
  material, etc.) and the hash fragment all survive — the only
  affected URLs are Phase 3 dev test links that were never published.

_quarto.yml + internal links
- Navbar Interactive Explorer href → explorer.qmd. Search Explorer
  removed from both the How-to-Use menu and the sidebar.
- Update internal links to /explorer.html in index.qmd, how-to-use.qmd,
  tutorials/index.qmd, about.qmd, data.qmd, design/index.qmd,
  index_alt.qmd, query-spec.qmd, tutorials/narrow_vs_wide_performance.qmd,
  and the existing parquet_cesium_isamples_wide redirect stub.

Tests
- tests/test_explorer.py → tests/test_globe.py targeting /explorer.html.
- Selectors updated for the unified DOM-based UI: #sourceFilter,
  #materialFilter, #contextFilter, #objectTypeFilter, #globeViewBtn /
  #tableViewBtn (no List view), #maxSamples number input.
- Unskip the cross-filter facet tests deferred in #155 — native HTML
  checkboxes respond to programmatic .click() unlike the old Explorer's
  OJS Inputs.checkbox.
- Add redirect-preserves-params tests for both old URLs (using the
  current ?search= param, which survives Quarto's q-stripping).
- test_navigation.py + test_tutorials_landing.py drop Search Explorer
  assertions and retarget the globe-loads test to /explorer.html.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Fix Codex review findings

1. test_baseline_sesar_count_matches_summaries was racy: facet-count
   spans are present in static HTML before being populated, so
   wait_for("attached") returned immediately and the test parsed an
   empty string. Wait until the SESAR span text matches \(\d (i.e., a
   parenthesised number) before reading.

2. Drop ?maxSamples= from URL state. Phase 3 introduced it to control
   the globe POINT_BUDGET; Phase 4 added a separate #maxSamples input
   for the table cap with different defaults (5000 vs 25000) and ranges
   (1-1000000 vs 1000-100000). The two were never the same concept and
   conflating them under one URL param meant `?maxSamples=10000`
   silently affected the globe but not the visible table input, and
   table-input changes never made it back to the URL. Remove the URL
   param entirely: globe POINT_BUDGET reverts to the constant
   DEFAULT_POINT_BUDGET (5000), table input remains a UI-only control.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Fix explorer facet dimming

* Drop search-triggered refreshFacetCounts calls

Follow-on to 8559b56 (Fix explorer facet dimming) which decoupled facet
counts from the search predicate. After that change, calling
refreshFacetCounts on every search keystroke / button click / Enter
triggered DB requeries that produced no visible difference (counts no
longer depend on search text). Drop those calls.

The single refreshFacetCounts() at the end of the cell (initial paint)
and the calls from facet checkbox handlers remain — those are still
load-bearing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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