Skip to content

SensorsTab additions: adding pre-fetch message, sensor array checkbox cleanup#46

Merged
matt-pharr merged 6 commits into
developfrom
gui-sensors
Jul 1, 2026
Merged

SensorsTab additions: adding pre-fetch message, sensor array checkbox cleanup#46
matt-pharr merged 6 commits into
developfrom
gui-sensors

Conversation

@amichaellu

@amichaellu amichaellu commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator
  • Replaces the raw, developer-facing error shown on the Sensors tab before a shot's HDF5 file has been fetched ("geometry unavailable: Error: fetch failed (404): 'no HDF5 file for shot …'") with a clear, user-facing message, wired up consistent with the pre-fetch messaging in the Quasi-stationary tab.

  • sensor array checkbox cleanup: (removed "coils" overlay), added first wall legend to 3D viewer

  • To-do: nstx.json integration

@amichaellu amichaellu changed the title SensorsTab: friendly pre-fetch message when a shot has no HDF5 file SensorsTab additions: adding pre-merge, sensor array checkbox cleanup, nstx.json integration Jul 1, 2026
@amichaellu amichaellu changed the title SensorsTab additions: adding pre-merge, sensor array checkbox cleanup, nstx.json integration SensorsTab additions: adding pre-fetch message, sensor array checkbox cleanup, nstx.json integration Jul 1, 2026
"Sensor visualization unavailable.
The HDF5 file for this shot has not been fetched yet.
Use the pull panel in the left sidebar to fetch the data."
- "coils" header → "Coils"
- Removed the "coils" overlay checkbox
- Added a "DIII-D first wall" legend label in 3D viewer
@amichaellu amichaellu marked this pull request as ready for review July 1, 2026 17:12
@amichaellu amichaellu requested a review from matt-pharr July 1, 2026 17:12
@amichaellu amichaellu changed the title SensorsTab additions: adding pre-fetch message, sensor array checkbox cleanup, nstx.json integration SensorsTab additions: adding pre-fetch message, sensor array checkbox cleanup Jul 1, 2026
matt-pharr and others added 2 commits July 1, 2026 15:19
…name

The coils cleanup replaced the generic `meta.coils` overlay (which renders
whatever coil sets any device config supplies) with a default-on check against
the literal sensor-set name "All 3D Coils" — a DIII-D-only string. On any other
device (e.g. NSTX-U, whose coils exist only as `meta.coils`, with no coil-kind
sensor set) coils no longer rendered by default and had no toggle at all.

Restore the generic overlay: bring back the `showCoils` state, the 2D footprint
and 3D-loop render blocks, the overlays checkbox, and the `showCoils` memo deps;
remove the `"All 3D Coils"` magic default. This also un-orphans the `CoilSet`
interface and `GeoMeta.coils` field (dead after the readers were removed).

The PR's other changes are kept: the pre-fetch 404 message, the per-loop tilt
saddle-loop orientation, the wall legend proxy, and the label capitalizations.

Verified with Playwright against DIII-D 184927 (fetched live): coils render in
2D + 3D, checkbox on by default, and unchecking removes the coil traces.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@matt-pharr

Copy link
Copy Markdown
Collaborator

Follow-up: restored the device-agnostic coil overlay (c2fc575)

Pushed a small change on top of this branch after a review pass. Rationale, so the reasoning is on record:

The coils cleanup replaced the generic meta.coils overlay with a default-on check against the literal sensor-set name "All 3D Coils". That name only exists in diiid.json, so the behavior was DIII-D-specific:

  • DIII-D has coils both as the meta.coils overlay (C/IU/IL) and as 42 coil-kind sensors grouped in the "All 3D Coils" set — so the magic string happened to work there.
  • NSTX-U has coils only as meta.coils (RWMEF ×6), with no coil-kind sensor set. Removing the overlay meant its coils no longer rendered by default and there was no checkbox to enable them — a silent regression on the live NSTX-U device.

The fix restores the generic, config-driven overlay (the showCoils state, the 2D footprint + 3D-loop render blocks, the overlays checkbox, and the memo deps) and drops the "All 3D Coils" default. This also un-orphans the CoilSet interface / GeoMeta.coils field, which were left dead once the readers were removed.

Heads-up @amichaellu: this partially reverts your coils cleanup — it brings back the separate overlay + toggle rather than routing coils through sensor sets. Happy to discuss if you'd prefer a different approach (e.g. keeping the sensor-set model but making the default generic across devices); I went with the overlay because it's the one path that renders coils for every device with zero hardcoded names.

Everything else in the PR is untouched: the pre-fetch 404 message, the per-loop tilt saddle-loop orientation, the wall legend proxy, and the label capitalizations.

Verification — all CI gates green locally (eslint, tsc, vitest 27/27; no Python touched so ty/ruff N/A), plus a live Playwright drive against DIII-D 184927: coils render in 2D + 3D, checkbox on by default, and unchecking removes the coil traces (confirming it's config-driven, not hardcoded).

@matt-pharr matt-pharr merged commit 9d12a8d into develop Jul 1, 2026
4 checks passed
priyanshlunia added a commit that referenced this pull request Jul 1, 2026
Brings develop through #46 (gui-sensors): NSTX/NSTX-U device-generic fetch,
per-node plot + HDF5 export, EFIT tree-fetch, and the data-layer device_geom
refactor. No merge conflicts; the qs_* pipeline works against develop's
refactored data layer.

Verified on the merged tree: ruff format/check clean, ty clean, 290 passed /
5 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
matt-pharr added a commit that referenced this pull request Jul 1, 2026
…relock)

Third develop→kstar_int sync. develop advanced with PR #65 (rotating-live
wiring: 2-D Gaussian pre-smoothing, download-500 hardening, heatmap null-cell
handling) and PR #46 (gui-sensors: device-agnostic coil overlay, saddle-loop
tilt). Only one conflict — uv.lock — since pyproject.toml is identical on both
sides; resolved by taking develop's lockfile and regenerating with `uv lock`
(135 packages, `uv lock --check` clean). app.py, nodes.py, and test_nodes.py
auto-merged.

Verified: ruff/ty/pytest (312 passed, 5 skipped)/eslint/tsc/vitest (29)/vite
build all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.

2 participants