Skip to content

Commit f1b23d4

Browse files
fix(graph): expose spacetime tuning in every preset
1 parent 031ee8f commit f1b23d4

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

engraphis/dashboard_assets/ledger.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,10 @@
23792379
const label = byId(id);
23802380
if (label) label.textContent = labels[index];
23812381
});
2382-
byId('graph-spacetime-tuning').hidden = !galaxy;
2382+
// The spacetime multipliers are also wired into the d3 forces for every
2383+
// non-Galaxy preset. Keep the controls available wherever those settings
2384+
// have an observable effect; only the labels and summary vary by mode.
2385+
byId('graph-spacetime-tuning').hidden = false;
23832386
const forceLabels = full
23842387
? ['Core attraction', 'Core mass', 'Cluster cohesion', 'Settling resistance', 'Link spring']
23852388
: ['Galactic gravity', 'Black hole mass', 'Local solar gravity', 'Space friction', 'Spring stiffness'];

tests/e2e/graph-engine.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,19 @@ test('served Ledger wires normalized spacetime controls, overlay, and orbit paus
19911991
expect(session.pageErrors).toEqual([]);
19921992
});
19931993

1994+
test('served Ledger exposes spacetime controls for non-Galaxy presets', async ({ page }) => {
1995+
const session = await openDashboard(page);
1996+
await page.goto('/');
1997+
await page.locator('.nav-item[data-view="relations"]').click();
1998+
await expect(page.locator('#graph-canvas canvas').first()).toBeAttached({ timeout: 20_000 });
1999+
await page.locator('[data-graph-preset-choice="compact"]').click();
2000+
await expect(page.locator('[data-graph-preset-choice="compact"]'))
2001+
.toHaveAttribute('aria-pressed', 'true');
2002+
await expect(page.locator('#graph-spacetime-tuning')).toBeVisible();
2003+
await expect(page.locator('#graph-spacetime-summary')).toHaveText('Spacetime · black-hole orbit controls');
2004+
expect(session.pageErrors).toEqual([]);
2005+
});
2006+
19942007
test('served Galaxy paints complete independent solar envelopes with a visible clearance',
19952008
async ({ page }, testInfo) => {
19962009
test.setTimeout(55_000);

0 commit comments

Comments
 (0)