Skip to content

feat: add quantitative views, time controls, and finish dead wiring - #3

Merged
veillette merged 1 commit into
mainfrom
claude/missing-pedagogical-elements-7xvdig
Aug 11, 2026
Merged

feat: add quantitative views, time controls, and finish dead wiring#3
veillette merged 1 commit into
mainfrom
claude/missing-pedagogical-elements-7xvdig

Conversation

@veillette

Copy link
Copy Markdown
Contributor

The sim's physics and a11y were complete; what was missing was what a
learner can see and do with them.

Quantitative views

  • IntensityProfileNode: a bamboo trace of intensity across a cut through
    the detector, on Michelson and both Mach-Zehnder ports. Turns the
    photograph into a measurement — the modulation depth is the visibility,
    the ripple count is the fringe count. With both ports plus the dashed
    total it draws I_A + I_B = const, which doc/model.md calls the point of
    that screen and which two percentages could only imply.
  • CoherenceEnvelopeNode: visibility against path difference on Michelson,
    with a marker at the current OPD. Makes doc/model.md §2 visible — flat
    for a laser, a needle for white light, and the sodium doublet's nulls
    and revivals. The span comes from the source's own feature scale, so
    metres and micrometres are both legible.
  • Both draw through the existing physics: a new pure intensityProfile()
    beside intensityAt(), and spectrumVisibility() unchanged.

Time controls

  • TimeModel (previously unused) is composed into the two models that
    evolve on their own, each with stepOnce() for single-frame advance.
    Photon accumulation can now be paused and stepped a few photons at a
    time; the Fabry-Pérot sweep can be stopped on a transmission peak. Its
    scan checkbox is replaced by the clock rather than joined to it.

Finished features that were built but never reached the view

  • showOpticalPath preference: plumbed from main.ts to the table nodes,
    labelling each element with what it adds to the path difference. The
    Michelson's contributions are doubled and the Mach-Zehnder's are not,
    which makes the factor of two concrete.
  • Mach-Zehnder vertical mirror tilt, which had a model Property and an
    a11y string but no control; and its visibility readout.
  • Path difference in wavelengths, using the unused units.waves pattern.
  • Home-screen icons, which were three blank rectangles.

Also

  • New charts carry accessibleParagraph descriptions derived from the same
    samples they draw; all strings added in en/es/fr.
  • Fixed a leak the memory-leak suite caught: a chart must dispose the
    formatter Properties behind its description, not just its Multilink.
  • CSP: allow the two inline onclick handlers scenery writes on disabled
    controls, scoped to script-src-attr by hash. Without this the step
    button logs a violation on every enable/disable and fails the fuzz run.

138 tests (was 124), including that the two ports' profiles sum to a
constant and that the sodium null falls inside the mirror's travel.

The sim's physics and a11y were complete; what was missing was what a
learner can see and do with them.

Quantitative views
- IntensityProfileNode: a bamboo trace of intensity across a cut through
  the detector, on Michelson and both Mach-Zehnder ports. Turns the
  photograph into a measurement — the modulation depth is the visibility,
  the ripple count is the fringe count. With both ports plus the dashed
  total it draws I_A + I_B = const, which doc/model.md calls the point of
  that screen and which two percentages could only imply.
- CoherenceEnvelopeNode: visibility against path difference on Michelson,
  with a marker at the current OPD. Makes doc/model.md §2 visible — flat
  for a laser, a needle for white light, and the sodium doublet's nulls
  and revivals. The span comes from the source's own feature scale, so
  metres and micrometres are both legible.
- Both draw through the existing physics: a new pure intensityProfile()
  beside intensityAt(), and spectrumVisibility() unchanged.

Time controls
- TimeModel (previously unused) is composed into the two models that
  evolve on their own, each with stepOnce() for single-frame advance.
  Photon accumulation can now be paused and stepped a few photons at a
  time; the Fabry-Pérot sweep can be stopped on a transmission peak. Its
  scan checkbox is replaced by the clock rather than joined to it.

Finished features that were built but never reached the view
- showOpticalPath preference: plumbed from main.ts to the table nodes,
  labelling each element with what it adds to the path difference. The
  Michelson's contributions are doubled and the Mach-Zehnder's are not,
  which makes the factor of two concrete.
- Mach-Zehnder vertical mirror tilt, which had a model Property and an
  a11y string but no control; and its visibility readout.
- Path difference in wavelengths, using the unused units.waves pattern.
- Home-screen icons, which were three blank rectangles.

Also
- New charts carry accessibleParagraph descriptions derived from the same
  samples they draw; all strings added in en/es/fr.
- Fixed a leak the memory-leak suite caught: a chart must dispose the
  formatter Properties behind its description, not just its Multilink.
- CSP: allow the two inline onclick handlers scenery writes on disabled
  controls, scoped to script-src-attr by hash. Without this the step
  button logs a violation on every enable/disable and fails the fuzz run.

138 tests (was 124), including that the two ports' profiles sum to a
constant and that the sodium null falls inside the mirror's travel.
@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@veillette
veillette merged commit 8d15205 into main Aug 11, 2026
8 checks passed
@veillette
veillette deleted the claude/missing-pedagogical-elements-7xvdig branch August 12, 2026 03:45
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