Skip to content

Fix planet-marker desync on orbit rescale and preset-collision UI bug#4

Merged
veillette merged 1 commit into
mainfrom
claude/simulation-review-improve-cwldrb
Jul 1, 2026
Merged

Fix planet-marker desync on orbit rescale and preset-collision UI bug#4
veillette merged 1 commit into
mainfrom
claude/simulation-review-improve-cwldrb

Conversation

@veillette

Copy link
Copy Markdown
Contributor
  • Configurations screen: rebuilding the ModelViewTransform2 on axis
    change replaced the object outright, so the planet markers and
    elongation indicator (which captured the old transform in a closure
    at construction) silently kept rendering at the previous scale while
    the orbit circles resized correctly. Now mutate the transform's
    matrix in place and explicitly resync the dependent nodes.
  • ConfigurationsModel.applyPreset now reports success/failure instead
    of always committing the preset index; the control panel reverts a
    preset combo box when both planets would land on the same orbit
    (previously the combo box showed the newly picked planet while the
    semimajor axis silently stayed unchanged).
  • ConfigurationsTimeline: guard the drag handler against a zero/negative
    synodic period the same way the render loop already does.
  • ConfigurationsTimeReadout: bind Text directly to the model Property
    instead of a redundant manual link.
  • Removed two non-null assertions in the zodiac strip label loops by
    iterating with forEach instead of indexing.

Verified in-browser: reverting the fix and dragging the target
planet's semimajor-axis slider reproduces the marker staying frozen at
the old orbit distance; with the fix, both planets track their resized
orbits correctly, including while playing.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018qTbZeFneh9h3njJEhTUSQ

- Configurations screen: rebuilding the ModelViewTransform2 on axis
  change replaced the object outright, so the planet markers and
  elongation indicator (which captured the old transform in a closure
  at construction) silently kept rendering at the previous scale while
  the orbit circles resized correctly. Now mutate the transform's
  matrix in place and explicitly resync the dependent nodes.
- ConfigurationsModel.applyPreset now reports success/failure instead
  of always committing the preset index; the control panel reverts a
  preset combo box when both planets would land on the same orbit
  (previously the combo box showed the newly picked planet while the
  semimajor axis silently stayed unchanged).
- ConfigurationsTimeline: guard the drag handler against a zero/negative
  synodic period the same way the render loop already does.
- ConfigurationsTimeReadout: bind Text directly to the model Property
  instead of a redundant manual link.
- Removed two non-null assertions in the zodiac strip label loops by
  iterating with forEach instead of indexing.

Verified in-browser: reverting the fix and dragging the target
planet's semimajor-axis slider reproduces the marker staying frozen at
the old orbit distance; with the fix, both planets track their resized
orbits correctly, including while playing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qTbZeFneh9h3njJEhTUSQ
@veillette veillette merged commit 68d6ec7 into main Jul 1, 2026
4 of 6 checks passed
@veillette veillette deleted the claude/simulation-review-improve-cwldrb branch July 2, 2026 10:20
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