Skip to content

explorer: interactive map state can diverge from cold-reload state of the same URL #239

@rdhyee

Description

@rdhyee

Symptom (reported 2026-05-27)

While interacting with the explorer (panning, zooming, applying a material filter), the map dots appeared to stop refreshing — the visible dots remained at a state inconsistent with the current facet counts and active filter.

URL captured from the stale tab:

https://isamples.org/explorer.html?material=https%3A%2F%2Fw3id.org%2Fisample%2Fvocabulary%2Fmaterial%2F1.0%2Forganicmaterial#v=1&lat=34.9540&lng=33.3063&alt=258920&heading=360.0

When the same URL was opened in a fresh tab, the map showed a different (likely correct) cold-load state. So this is not a problem with the URL itself; it's a divergence between interactive state and URL-encoded state on the same page.

Why this is interesting

Adjacent to #234's "filter coherence" thesis. Adjacent to #235 (which fixed #facetNote not appearing on URL-load — a sibling instance of interactive-vs-URL divergence). Possibly an instance of the same underlying class of bug: some recompute paths (here, the map-dot rendering) are bound to camera/filter event handlers that don't fire (or fire and short-circuit) the same way they do on a fresh load.

Cluster-mode dot rendering specifically depends on loadRes() being called when the camera-changed or source-filter-changed event fires. If a material/feature/specimen filter change doesn't trigger a re-render of cluster dots (which honors only the source filter today, per the C2 behavior documented in #234), the visible dots could persist past a state where they no longer represent "what's in view."

What's needed

  • Reproduction recipe: exact sequence of clicks / pans / filter toggles that produces the stale visual state. Hard to investigate without this.
  • Once reproducible, instrument the cluster re-render path (loadRes, camera.changed listener, source-filter handler) to identify which event was expected to fire and didn't.

Diagnostic findings so far

A Playwright probe of the captured URL at cold-load (2026-05-27):

  • #facetNote correctly visible: "Material / feature / specimen filters apply at sample zoom level — zoom in or click a cluster." (so the C2 disclosure is working on cold load)
  • Source counts at cold load were global, not viewport-scoped — possibly a separate finding (B1 may not be firing on URL-load with no moveEnd event ever firing); needs follow-up probe.

Cross-refs

Acceptance

  • Reproducible repro recipe documented
  • Root-cause traced to a specific event/handler path

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexplorerInteractive Explorer featuresneeds-discussionRequires team input before implementing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions