Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
434a94c
fix(graph): route the four spacetime sliders into d3 forces in non-ga…
Coding-Dev-Tools Aug 26, 2026
d700bba
fix(graph): preserve default force strength when the spacetime slider…
Coding-Dev-Tools Aug 28, 2026
8ff0dbf
Merge remote-tracking branch 'origin/main' into ship/gravity-sliders-fix
Coding-Dev-Tools Aug 28, 2026
8d42016
fix(review): address PR #177 codex reviews (round 6) — consume normal…
Coding-Dev-Tools Aug 28, 2026
ee514b7
fix(review): address the actual slider flicker — rebalance the
Coding-Dev-Tools Aug 29, 2026
91e5d0f
fix(review): bypass the 2x response gain for the spacetime sliders so
Coding-Dev-Tools Aug 29, 2026
fddfd94
fix(graph): restore the galaxy physics 0..8/0..16 calibration scale
Coding-Dev-Tools Aug 29, 2026
573ec4a
test(graph): verify slider forces and cache bust
Coding-Dev-Tools Aug 29, 2026
f18d5f4
fix: bound galaxy orbit speeds after control
Coding-Dev-Tools Aug 29, 2026
7ecc605
preserve normalized Galaxy physics controls
Coding-Dev-Tools Aug 29, 2026
5f0e5d3
fix vector speed caps and oversized graph controls
Coding-Dev-Tools Aug 29, 2026
c2e79e3
update normalized Galaxy field expectation
Coding-Dev-Tools Aug 29, 2026
afef952
stabilize Galaxy paint audit baseline
Coding-Dev-Tools Aug 29, 2026
fe00c88
cap kinematic galaxy carrier speed
Coding-Dev-Tools Aug 29, 2026
031ee8f
cap live Galaxy carrier velocity
Coding-Dev-Tools Aug 29, 2026
f1b23d4
fix(graph): expose spacetime tuning in every preset
Coding-Dev-Tools Aug 29, 2026
90efe82
fix(graph): bound kinematic velocity and control response
Coding-Dev-Tools Aug 30, 2026
7f4f1ac
fix(graph): wire spacetime controls into every renderer
Coding-Dev-Tools Aug 30, 2026
39aa7e8
fix(graph): bound full-layout physics controls
Coding-Dev-Tools Aug 30, 2026
1e05eb5
fix(graph): share capped speed across orbit phase
Coding-Dev-Tools Aug 30, 2026
d5f4244
fix(graph): keep settling resistance responsive
Coding-Dev-Tools Aug 30, 2026
8d0bc2e
fix(graph): honor zero Every-node spring stiffness
Coding-Dev-Tools Aug 31, 2026
194cf89
fix(graph): preserve orbit pause for full Galaxy scenes
Coding-Dev-Tools Aug 31, 2026
a0b4810
fix(graph): map galactic gravity to attraction
Coding-Dev-Tools Aug 31, 2026
94fafaf
fix(graph): gate orbit pause by active preset
Coding-Dev-Tools Aug 31, 2026
d33977e
test(graph): update orbit capability contract
Coding-Dev-Tools Aug 31, 2026
5e750cf
fix(graph): hide inert full-layout spring control
Coding-Dev-Tools Aug 31, 2026
e813d24
fix(graph): describe active spacetime renderer
Coding-Dev-Tools Aug 31, 2026
b995ce4
test(graph): match renderer-specific tuning copy
Coding-Dev-Tools Aug 31, 2026
4e6e936
fix(graph): integrate the main-branch Galaxy gravity slider balance i…
Coding-Dev-Tools Aug 31, 2026
14fc296
fix(tests): drop the slider probe harness and fix lint errors
Coding-Dev-Tools Aug 31, 2026
44e4b47
fix(graph): port graphGalaxyQuality tracking and orbit-pause gating f…
Coding-Dev-Tools Sep 1, 2026
1d26ebf
fix(graph): repair slider control syntax and Linux harness
Coding-Dev-Tools Sep 1, 2026
c1240ac
fix(graph): complete slider browser contract
Coding-Dev-Tools Sep 1, 2026
d63304b
fix(graph): correct every-node spring direction
Coding-Dev-Tools Sep 1, 2026
6ebe9fb
fix(graph): keep local orbits at zero global gravity
Coding-Dev-Tools Sep 1, 2026
6a66f38
fix(ledger): cancel stale deferred preference writes
Coding-Dev-Tools Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
208 changes: 104 additions & 104 deletions engraphis/classic_assets/dashboard.js

Large diffs are not rendered by default.

48 changes: 41 additions & 7 deletions engraphis/dashboard_assets/engraphis-graph-every-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
const MAX_CENTROID_GROUPS = 512;

let model = null;
let settings = { repel: 48, link: 16, gravity: 48 };
let settings = {
repel: 48, link: 16, gravity: 48,
gravitationalConstant: 1, blackHoleMass: 1, localGravitationalConstant: 1,
damping: 1, springStiffness: 1,
};
let generation = 0;

function post(message) { self.postMessage(message); }
Expand Down Expand Up @@ -217,16 +221,24 @@
springs run weak — they are visual routes between districts, not licence to drag
the districts into one another over the settle passes. */
const scaledSpacing = SPACING * MAP_SCALE;
const spring = Number.isFinite(Number(settings.springStiffness))
? Math.max(0, Math.min(100 / 32, Number(settings.springStiffness))) : 1;
// springStiffness is already a normalized multiplier from the dashboard. Preserve its
// zero endpoint so the Link spring control can actually disable pair attraction.
const springScale = spring;
const rest = Math.max(scaledSpacing * 1.9, Number(settings.link) * 1.6 * (MAP_SCALE * 0.55));
for (let edge = 0; edge < model.totalLinks; edge += 1) {
const a = model.sources[edge], b = model.targets[edge];
const ddx = pos[b * 2] - pos[a * 2], ddy = pos[b * 2 + 1] - pos[a * 2 + 1];
const dist = Math.sqrt(ddx * ddx + ddy * ddy) || 0.0001;
const crossCommunity =
model.communities[a] !== model.communities[b] ? 0.02 : 0.07;
const force = (dist - rest) / dist * crossCommunity;
dx[a] -= ddx * force; dy[a] -= ddy * force;
dx[b] += ddx * force; dy[b] += ddy * force;
const force = (dist - rest) / dist * crossCommunity * springScale;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply spring stiffness to an attractive correction

In the All Nodes Every-worker path, when a linked pair is farther apart than rest, force is positive but the subsequent updates move a opposite b and b farther along ddx, pushing the pair apart; when they are too close, the same signs pull them closer. Multiplying this unstable correction by springScale means raising Link spring amplifies divergence rather than making links settle more firmly at their rest length. Reverse the correction signs before applying the new stiffness multiplier.

Useful? React with 👍 / 👎.

/* `force` is positive when the pair is beyond rest and negative when it overlaps.
Apply equal-and-opposite corrections along a→b so positive force attracts the pair
and negative force separates it. */
dx[a] += ddx * force; dy[a] += ddy * force;
dx[b] -= ddx * force; dy[b] -= ddy * force;
}

/* Local repulsion through a spatial hash with a per-node visit cap keeps each pass O(n)
Expand All @@ -241,7 +253,11 @@
}
const minDist = SPACING * MAP_SCALE * 1.55;
const minDist2 = minDist * minDist;
const push = Number(settings.repel) / 48;
const cohesion = Number.isFinite(Number(settings.localGravitationalConstant))
? Math.max(0, Math.min(2, Number(settings.localGravitationalConstant))) : 1;
/* Cluster cohesion strengthens the attractive spring network above. Invert its influence
on the collision-style push so a higher cohesion setting does not spread clusters apart. */
const push = Number(settings.repel) / 48 * (1.5 - 0.5 * cohesion);
for (let index = 0; index < count; index += 1) {
const gx = Math.floor(pos[index * 2] / cell), gy = Math.floor(pos[index * 2 + 1] / cell);
let checked = 0;
Expand Down Expand Up @@ -314,14 +330,23 @@
}
}

const gravity = Number(settings.gravity) / 48 * 0.0015;
const coreAttraction = Number.isFinite(Number(settings.gravitationalConstant))
? Math.max(0, Math.min(2, Number(settings.gravitationalConstant))) : 1;
const coreMass = Number.isFinite(Number(settings.blackHoleMass))
? Math.max(0, Math.min(2, Number(settings.blackHoleMass))) : 1;
Comment on lines +333 to +336

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the upper slider ranges in the Every worker

In All Nodes views using EngraphisEveryGraph, the dashboard emits Core attraction over 0–4 (raw / 50) and Core mass up to 4.4, but these clamps cap both at 2. Core-attraction positions 100–200 and core-mass positions 260–500 therefore produce identical worker layouts, leaving large visible portions of both controls inert. Normalize the dashboard values to the worker's intended range or map the full emitted ranges without saturation.

Useful? React with 👍 / 👎.

const gravity = Number(settings.gravity) / 48 * 0.0015 * coreAttraction * coreMass;
for (let index = 0; index < count; index += 1) {
dx[index] += (cx - pos[index * 2]) * gravity;
dy[index] += (cy - pos[index * 2 + 1]) * gravity;
}

/* A tight per-pass step cap keeps the settle from smearing district boundaries. */
const damp = 0.8, maxStep = SPACING * MAP_SCALE * 0.7;
const resistance = Number.isFinite(Number(settings.damping))
? Math.max(0, Math.min(15, Number(settings.damping))) : 1;
/* Keep the full 0..15 control range responsive: the reciprocal curve reaches 0.2
at resistance 13, so a 0.2 floor would make the final two slider units inert. */
const damp = Math.max(0.15, Math.min(0.95, 0.8 / (0.75 + 0.25 * resistance)));
const maxStep = SPACING * MAP_SCALE * 0.7;
for (let index = 0; index < count; index += 1) {
let vx = dx[index] * damp, vy = dy[index] * damp;
const speed = Math.sqrt(vx * vx + vy * vy);
Expand Down Expand Up @@ -409,6 +434,15 @@
repel: Number.isFinite(Number(next.repel)) ? Number(next.repel) : settings.repel,
link: Number.isFinite(Number(next.link)) ? Number(next.link) : settings.link,
gravity: Number.isFinite(Number(next.gravity)) ? Number(next.gravity) : settings.gravity,
gravitationalConstant: Number.isFinite(Number(next.gravitationalConstant))
? Number(next.gravitationalConstant) : settings.gravitationalConstant,
blackHoleMass: Number.isFinite(Number(next.blackHoleMass))
? Number(next.blackHoleMass) : settings.blackHoleMass,
localGravitationalConstant: Number.isFinite(Number(next.localGravitationalConstant))
? Number(next.localGravitationalConstant) : settings.localGravitationalConstant,
damping: Number.isFinite(Number(next.damping)) ? Number(next.damping) : settings.damping,
springStiffness: Number.isFinite(Number(next.springStiffness))
? Number(next.springStiffness) : settings.springStiffness,
};
if (data.relayout && model) {
generation += 1;
Expand Down
11 changes: 8 additions & 3 deletions engraphis/dashboard_assets/engraphis-graph-every.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(function () {
'use strict';

const WORKER_URL = '/v2-assets/engraphis-graph-every-worker.js?v=20260823-every-19';
const WORKER_URL = '/v2-assets/engraphis-graph-every-worker.js?v=20260830-spacetime-controls-20';
const MAX_NODES = 20000;
const MAX_LINKS = 200000;
const LABEL_MAX = 220;
Expand Down Expand Up @@ -151,7 +151,9 @@
totalLinks: 0, edgeVertexCount: 0,
camera: { x: 0, y: 0, scale: 1 }, baseScale: 1, width: 1, height: 1, dpr: 1,
styleName: opts.style || 'cyber', colorBy: 'community', typeColors: {}, themeColors: {}, palette: 'theme',
settings: { labels: true, flow: false, flowSpeed: 45, frozen: false, mode: 'communities', repel: 48, link: 16, gravity: 48, font: 12, size: 3, linkw: 0.72 },
settings: { labels: true, flow: false, flowSpeed: 45, frozen: false, mode: 'communities', repel: 48, link: 16, gravity: 48, font: 12, size: 3, linkw: 0.72,
gravitationalConstant: 1, blackHoleMass: 1, localGravitationalConstant: 1,
damping: 1, springStiffness: 1 },
sizeBy: 'degree', bridges: true, ghosts: true,
scope: { minDegree: 0, showUnlinked: true, depth: 2 },
collapse: false, collapsed: false,
Expand Down Expand Up @@ -1376,7 +1378,10 @@
const patch = value || {};
state.settings = { ...state.settings, ...patch };
state.flowPaintAt = 0;
const relayout = Object.keys(patch).some(key => ['mode', 'repel', 'link', 'gravity'].includes(key));
const relayout = Object.keys(patch).some(key => [
'mode', 'repel', 'link', 'gravity', 'gravitationalConstant', 'blackHoleMass',
'localGravitationalConstant', 'damping', 'springStiffness',
].includes(key));
postSettings(relayout);
uploadNodeMeta();
camera();
Expand Down
Loading