Skip to content
Merged
1 change: 1 addition & 0 deletions EXPLORER_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The hash is the camera/deep-link channel. Always written together by
| `pitch` | `viewer.camera.pitch` | `-90` | degrees, 1-decimal | same | same; only written if `\|pitch + 90\| > 1` (`:608`) | clamped `[-90, 0]` (`:591`) | |
| `mode` | `viewer._globeState.mode` | omitted (= `cluster`) | `point` only | `readHash()` (`:592`); applied after camera flight in `hashchange` handler (`:1727-1729`); also restored from `_initialHash` after zoomWatcher init | `buildHash` only writes if `'point'` (`:610`); push triggers as above | exact-match `'point'` | absence ⇒ cluster |
| `pid` | `viewer._globeState.selectedPid` | omitted | sample pid string (URL-encoded) | `readHash()` (`:593`); applied at end of `zoomWatcher` (`:1873-1901`) and on `hashchange` (`:1733-1756`) | sample-click sets it (`:860`); cluster-click clears it (`:887`); written in `buildHash` if non-null (`:611`) | none beyond `null` check | drives a `lite_url` lookup + lazy `wide_url` description fetch |
| `h3` | `viewer._globeState.selectedH3` | omitted | canonical 15-char lowercase hex (e.g. `843f6d3ffffffff`) | `readHash()` parses; boot deep-link calls `fetchClusterByH3` then `hydrateClusterUI` under a `_selGen` race guard; same path on `hashchange` | cluster-click sets `selectedH3 = meta.h3_cell` and clears `selectedPid` (mutual exclusion); sample-click clears `selectedH3`; source-filter change re-validates and may clear or rehydrate; written in `buildHash` if non-null | strict `/^[0-9a-f]{15}$/i`; cell-mode (`lower[0] === '8'`); resolution nibble in `RES_TO_H3_URL` map (4/6/8) | drives a single `WHERE h3_cell = CAST('<decimal>' AS UBIGINT) AND <sourceFilterSQL>` lookup against the resolution-routed parquet. h3_cell column is UBIGINT so SELECTs cast to VARCHAR and JS converts via `BigInt(dec).toString(16)` to avoid Number precision loss. `&pid=` wins if both present. Per `EXPLORER_CLUSTER_URL_PROPOSAL.md` |

### Hash write-vs-read coordination

Expand Down
Loading
Loading