Skip to content

Debug panel cleanup + galaxy orientation provenance fix#501

Merged
rulkens merged 10 commits into
mainfrom
worktree-debug-panel-ui-cleanup
Jul 24, 2026
Merged

Debug panel cleanup + galaxy orientation provenance fix#501
rulkens merged 10 commits into
mainfrom
worktree-debug-panel-ui-cleanup

Conversation

@rulkens

@rulkens rulkens commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Debug-panel UX cleanup plus a correctness fix for the galaxy orientation-fallback highlight.

Panel + sections

  • Panel root now scrolls on overflow (max-height + overflow-y).
  • New DebugSection wrapper centralises the <details>/summary chrome; its open-state lives in useState+onToggle, which fixes GPU Timings being un-collapsible (it re-renders ~60×/s, so a bare <details open> was force-reopened every frame).
  • Debug Overlays subsection now holds the pick-buffer / disk-radius-ring toggles (were loose in the flat list).
  • Inline summary styling routed through the shared debugSection vocabulary; manual spacer divs replaced with flex gap.

Galaxy orientation provenance

  • Renamed highlightFallback/realOnlyhighlightEstimatedOrientation/onlyMeasuredOrientation across state, shader uniforms, engine, and UI. DataQualitySectionGalaxyOrientationSection ("Galaxy Orientation").
  • Fix: the fallback flag is now a persisted orientationIsFallback byte in the galaxy bin (format v6 → v7) instead of being reconstructed at load from a lossy f32 cartesian round-trip that misclassified ~10% of fallback rows. The InfoCard measured-vs-estimated provenance reads the same flag.

Asset Loading section

  • Single-line rows (req JSON → title tooltip), collapsed by default; per-state row colours + status dot; reload/cancel revealed on hover; coloured idle/ready/error header tally that filters rows on click (toggle or ✕ to clear); table spans the full panel width.

Bins

Format bumped to v7. sdss/2mrs/glade/famous bins regenerated. Regenerate in main before deploy (npm run build-tiers + build-famous). desi/milliquas untouched here (separate build paths).

Verification

  • npm run typecheck clean (src + tools); npm test green (860 files / 4994 tests).
  • Visual pass pending (orientation highlight + panel).

Still open (follow-up on this branch)

  • Highlight estimated size toggle + rename section to Galaxy Provenance (second provenance axis: default-30kpc diameter rows).

🤖 Generated with Claude Code

…ation, asset-loading polish

Panel + sections:
- DebugPanel root scrolls on overflow (max-height + overflow-y); sections
  now share a DebugSection wrapper whose open-state lives in useState+onToggle,
  fixing GpuTimingsSection being un-collapsible under its 60fps re-renders.
- Pick-buffer / disk-radius-ring toggles moved out of the flat list into a
  Debug Overlays subsection. Inline summary chrome routed through the shared
  debugSection vocabulary; manual spacer divs replaced with flex gap.

Galaxy orientation provenance:
- Rename highlightFallback/realOnly -> highlightEstimatedOrientation/
  onlyMeasuredOrientation across state, shader uniforms, engine, and the UI;
  DataQualitySection -> GalaxyOrientationSection ("Galaxy Orientation").
- Persist an authoritative orientationIsFallback flag in the galaxy bin
  (format v6 -> v7) instead of reconstructing it at load from a lossy f32
  cartesian round-trip (~10% of fallback rows were misclassified). InfoCard
  measured-vs-estimated provenance now reads the same flag.

Asset Loading section:
- Single-line rows (req JSON folded into a title tooltip), collapsed by
  default; per-state row colors + status dot; reload/cancel revealed on hover;
  colored idle/ready/error count tally in the header that filters the rows on
  click (toggle or ✕ to clear); table spans the full panel width.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
skymap 5abab7f Commit Preview URL

Branch Preview URL
Jul 24 2026, 04:44 PM

rulkens and others added 9 commits July 24, 2026 16:23
…t fixtures

Add a "Highlight estimated size" debug toggle mirroring the estimated-
orientation one. A persisted per-row diameterIsFallback flag (bin format
v7 -> v8, byte 59) rides the sign bit of the radiusMpc slot and tints
fallback-diameter galaxies cyan; the debug section is renamed to "Galaxy
Provenance". The InfoCard's diameter-provenance tag now reads the
persisted flag instead of the lossy diameterKpc === 30 compare (a
genuinely measured 30 kpc galaxy was mislabeled fallback).

Also unify galaxy-catalog test construction into shared
makeGalaxyCatalog / makeGalaxyRow factories, replacing ~40 inline
literals and duplicated local makeCloud helpers so the next format
field is a one-line change rather than a 40-file sweep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The highlight multiplied a tint into the ramp colour, which darkened red
galaxies toward black instead of making them pop, and cyan sat too close
to the blue-white of real galaxies to read as synthetic. Replace the
ramp colour outright and boost it 2.5x: magenta for estimated
orientation, green for estimated size, amber for both. Green and magenta
are both colours no real galaxy SED produces, so nothing in the field
competes with them.

Shorten the toggle labels now that the section header carries the
context ("Estimated orientation" / "Estimated size") and add matching
colour swatches so the tint is self-documenting.

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

The Galaxy Provenance section was three loose checkboxes with an asymmetric
vocabulary: orientation had both a highlight and a cull, size had only a
highlight, and the cull was a boolean that could only ask "where is the real
photometry?" — never its complement.

Replace all three booleans with one record keyed by a registry of provenance
axes, each carrying `{ highlight, filter }` where filter is tri-state (all /
measured / estimated). Both axes now expose the full control set, and the
section renders as a table mapped from PROVENANCE_AXES: a third axis costs a
registry entry, a settings default, a uniform slot, and a shader branch — not
a copy of the markup.

Each row also reports how many loaded galaxies are estimated on that axis and
what share of the total that is, so "that looks like a lot of magenta" becomes
a number. The tally runs once per catalog commit, on the same `ready`
transition that already reports the source's row count, and lands in the engine
slice as six numbers rather than threading raw clouds into React.

Uniform layout: the provenance block is now a contiguous 112..127 run of four
u32 (highlight + filter code per axis); depthFadeEnabled moves into the
Malmquist group's previously-reserved trailing slot at byte 156. The struct
stays 176 bytes and every other offset is unchanged. The filter is a code
rather than a pair of booleans because "hide measured" and "hide estimated"
together would mean "draw nothing", a state the encoding should not be able to
express.

Culls happen at the vertex stage, so a culled galaxy is not pickable either —
the pre-existing behaviour of the boolean cull, preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Half the table's cells were unlabelled, so the meaning of a count, a
percentage, or a swatch had to be inferred from the code. Every cell now
carries a succinct title, and the hoverable ones show a help cursor.

Per-axis copy rides the registry as a `hint` field rather than a branch in
the component, so a new axis brings its own explanation.

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

The tooltips described flagged galaxies as "estimated" or "invented", which
reads as a judgement about the value rather than a statement about the source
catalog. What the flag actually records is that the catalog had no measurement
there, so the copy now says that.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"cull" read as if the selector removed the option you picked, when it draws
it. Since the honest name for that column was already taken by the highlight
checkbox, both move: highlight / show.

The first column becomes "missing" rather than "estimated", which describes
the source catalog instead of the substitute value. The filter option follows
suit; its stored value stays 'estimated' because that names what the pipeline
put there, and the shader reads it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two of the sections the item listed no longer exist, and DebugOverlays +
GalaxyProvenance now have CSS modules (their per-section containers are still
outstanding). The item stays open: four sections remain fully inline-styled.

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

Every store-touching DebugPanel section now owns its Redux reach through
its own container: RenderToggles, FlowTuning, DebugOverlays, and
GalaxyProvenance join the two clip sections in components/containers/.
That leaves DebugPanel taking only the four engine-handle props App reads
off handleRef, and leaves DebugPanelContainer a pure pass-through, so it
is deleted and App mounts a memo'd DebugPanel directly.

Also converts the last inline style objects in the section family to CSS
modules (AssetLoading, GpuTimings, RenderToggles, FlowTuning), composing
the shared debugSection vocabulary. The only style prop left carries the
provenance swatch's registry colour as a CSS custom property, since that
value cannot live in a stylesheet.

Closes the DebugPanel-sections backlog item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rulkens
rulkens marked this pull request as ready for review July 24, 2026 16:50
@rulkens
rulkens merged commit e63ef20 into main Jul 24, 2026
2 checks passed
@rulkens
rulkens deleted the worktree-debug-panel-ui-cleanup branch July 24, 2026 16:52
rulkens added a commit that referenced this pull request Jul 24, 2026
Main's #501 replaced the highlightFallback + realOnly boolean pair with a
general per-axis provenance system, and added persisted
orientationIsFallback / diameterIsFallback arrays to GalaxyCatalog. This
branch had independently moved the galaxy colour-ramp evaluation from the
points vertex stage to the fragment stage and repacked VSOut.

Most of the collision was additive and resolved as keep-both.
highlightFallback and realOnly are dropped rather than preserved: main
deleted the concept, so the entries, their reducers and their defaults go
with it.

The one real design clash was the points vertex stage. Main's provenance
highlight REPLACES the ramp colour with a flat debug colour and boosts
brightness, because multiplying a tint into a red galaxy darkens it
instead of making it pop. This branch no longer evaluates the ramp in the
vertex stage at all, since the radial gradient's argument depends on the
fragment's radius.

Resolved via the sign of instanceTint.w. pickColourIndex clamps the colour
index to [0, 2], so it is never negative, which makes a negative .w a free
and unambiguous sentinel for "highlight active: .rgb is already the final
colour, skip the ramp". The fragment collapses the ramp to a multiply by
white in that case. This is the same sign-bit-as-flag idiom the codebase
already uses for axisRatio (orientation fallback) and radiusMpc (diameter
fallback). A debug overlay therefore renders flat rather than
gradient-modulated, which is correct — its job is to read as unmistakably
synthetic.

Both branches also grew the same points uniform struct. The byte ranges
turned out disjoint: provenance at 112..127 with depthFadeEnabled moved to
156, against galaxySbScale/galaxySbMax/galaxyFalloffStrength at 172..180.
Verified the merged WESL struct against packPointUniforms.ts field by
field; UNIFORM_BYTES is 192. Main's "total: 176 bytes" layout comment was
stale and is corrected.

Co-Authored-By: Claude Opus 4.8 (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