Skip to content

fix(graph): balance the Gravity slider across the full 0..400 range - #185

Open
Coding-Dev-Tools wants to merge 13 commits into
mainfrom
ship/gravity-slider-1to1
Open

fix(graph): balance the Gravity slider across the full 0..400 range#185
Coding-Dev-Tools wants to merge 13 commits into
mainfrom
ship/gravity-slider-1to1

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

The Ledger Gravity slider (loose <-> tight) had three compounding defects:

  • The renderer floored the loose end at setting=24, so every position in [0, 24] produced identical physics
  • The response mapping (2x linear gain) saturated at 200, clipping the upper half of the travel
  • Burst intermediates folded into the final layout, making drags path-dependent

Changes

Engine (engraphis-graph.js)

  • Remove GALAXY_GLOBAL_GRAVITY_FLOOR_SETTING (24) and GALAXY_STELLAR_GRAVITY_FLOOR_SETTING (48): settings now clamp 1:1 to 0..400
  • preserveGalaxyPhaseOnResume armed before inner render, outer render, and the synchronous physics reheat so burst intermediates do not fold into the final layout
  • schedulePhysicsUpdate arms the phase-preserve flag for its rAF reheat in galaxy mode

Slider mapping (ledger.js)

  • graphSliderResponseValue maps the Gravity slider 1:1 (clamped identity) instead of the 2x linear gain that saturated at 200

Assets

  • Cache version bumped to 20260831-galaxy-floor-fix-2 across dashboard_assets/index.html, ledger.js, both dashboard.js mirrors, and the classic/static index.html cache busters

Tests

  • test_galaxy_gravity_floor.py pins loose >= tight * 1.5 across full travel
  • test_galaxy_gravity_slider_no_dead_zone.py pins strict monotonicity of the engine constant across 0..400
  • test_slider_response.py pins the shipped ledger.js mapping (401 unique strictly increasing effective values)
  • tests/e2e/graph-engine.spec.js adds burst path-independence and no-dead-zone sweep with canvas hash diffs
  • tests/e2e/ledger.spec.js version pins updated

Verification

  • 233/233 offline tests pass
  • ruff clean, node --check clean on all four JS assets
  • commercial manifest + asset externalization gates pass

The Ledger Gravity slider (loose <-> tight) floored the loose end at setting 24 and used a 2x linear response mapping that saturated at 200, so a large part of the slider travel produced identical output. Drags through multiple intermediate events also ended at a different layout than a direct drag (path dependence).

Engine (engraphis/dashboard_assets/engraphis-graph.js): galaxyBlackHoleGravitySetting and galaxyStellarGravitySetting now clamp 1:1 to 0..400 with no floors; preserveGalaxyPhaseOnResume is armed before inner render, outer render, and the synchronous physics reheat; schedulePhysicsUpdate arms the phase-preserve flag for its rAF reheat in galaxy mode so the post-burst frame does not re-run path-dependent contact corrections.

Slider mapping (engraphis/dashboard_assets/ledger.js): graphSliderResponseValue maps the Gravity slider 1:1 (clamped identity) instead of the 2x linear gain that saturated at 200.

Assets: cache version bumped to 20260831-galaxy-floor-fix-2 across dashboard_assets/index.html, ledger.js, both dashboard.js mirrors, and the classic/static index.html cache busters.

Tests: tests/test_galaxy_gravity_floor.py pins loose >= tight * 1.5 across full travel; tests/test_galaxy_gravity_slider_no_dead_zone.py pins strict monotonicity of the engine constant across 0..400; tests/test_slider_response.py pins the shipped ledger.js mapping (401 unique strictly increasing effective values); tests/test_galaxy_gravity_slider.py updated for the full-travel contract; tests/e2e/graph-engine.spec.js adds burst path-independence and no-dead-zone sweep with canvas hash diffs; tests/test_graph_engine_asset.py version pins updated (file reflowed to CRLF by editor save; AST-verified no logic change beyond version pins).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 413709b887

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated
Comment thread tests/test_galaxy_gravity_slider.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8591fc386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated
Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

const nx = anchor.x + (node.x - anchor.x) * ratio;
const ny = anchor.y + (node.y - anchor.y) * ratio;
if (Number.isFinite(nx) && Number.isFinite(ny)) {
maximumShift = Math.max(maximumShift,

P2 Badge Translate carrier systems instead of shrinking their orbits

When Galactic gravity changes, these coordinates scale every star and planet around the global anchor, so a 0→400 adjustment multiplies planet-to-star distances by the same roughly 0.6 ratio even though Local solar gravity was unchanged. This can push satellites into their stellar exclusion boundary and makes the next live physics step snap the local orbit back outward; move each system rigidly by the carrier's scaled displacement instead of scaling every member independently.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated
Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2003d73ea8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test_galaxy_gravity_floor.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03eae5d985

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread engraphis/dashboard_assets/engraphis-graph.js Outdated
…tion layouts

Communities and radial multiplied their centering forces by the normalized
mass multiplier, but the default compact/original branch and the constellation
branch derived x/y strengths solely from gravity, so the Black hole mass
slider was inert in those modes (PR #185 thread 3902779917).

Adds a d3-stubbed regression test pinning the 4.4x response at the clamp
ceiling in both layouts.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Reconcile the slider branch with main's reviewed spacetime implementation:
non-Galaxy D3 force wiring (full-range multipliers, damping->velocityDecay
interpolation, mass-multiplied centering in every preset) and the
tests/test_graph_engine_asset.py suite come from main; the Galaxy physics
iteration (0..400 range contracts, coalesced contact-correction, zero-floor
gravity) and the floor-test contraction rationale stay on this branch.

Both branch-unique regression tests are preserved in the merged suite:
test_black_hole_mass_reaches_centering_forces_in_every_non_galaxy_layout and
test_slider_burst_reasserts_contact_invariant_when_galaxy_is_frozen.
test_graph_engine_asset: 238 pass; slider/floor/every suites green; ruff,
commercial manifest, and CSP asset gates pass.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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