feat: show what each backup is doing as a light that moves like a rocket
Replace the single-shot meteor with a per-orbit activity system. A backup's state is read from how a small glowing triangle moves, not from a drawing of a rocket. - Events come from status changes between polls, so scheduled backups animate too. A click shows its own verdict until a poll that began after it has landed, which keeps one backup from being animated twice or flipping through a stale status. Loading the page only sets a baseline and never replays history. - Queued waits on its star. Running circles it, climbing and spinning up. - Success waits for a launch window, where the light's own motion already carries it round the black hole, then departs with that velocity. It falls under a pseudo-Newtonian pull after a burn that trims angular momentum to just under the capture limit, so the path spirals with the orbits, always arrives, and never slows on the way in. Near the shadow it reddens, dims and stretches, and the disk spins up as it feeds. - Failure explodes in place or, when the hub says the transfer failed, launches, loses power and falls back. The star keeps its busy look until the outcome and then turns red. Rehearsal is a faint dashed light that lands on its star. - Position and velocity are integrated and a mode change only swaps forces, so every transition is continuous and interruptible. Parameters use the shared spring tokens. Trails follow the path actually flown. - At most ten lights are drawn; reduced motion draws none and shows outcomes at once. - Pure modules with tests for activity, physics and trails. The Playwright capture script now checks lights by data-orbit. The animation guideline in docs/UI.md describes the simulation approach in place of the old single progress value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,8 @@ try {
|
||||
|
||||
await page.getByRole("button", { name: "Capture Load test orbit 1", exact: true }).click();
|
||||
await page.getByText("Snapshot secured from Load test orbit 1.", { exact: true }).waitFor();
|
||||
await page.waitForFunction(() => Number(document.querySelector(".capture-arrival").getAttribute("opacity")) > 0.1);
|
||||
// The clicked orbit's rocket is on screen (rockets are marked with data-orbit; other orbits may be running too).
|
||||
await page.waitForFunction(() => Number(document.querySelector('.rocket[data-orbit="orbit-0"]')?.getAttribute("opacity")) > 0.1);
|
||||
await page.waitForFunction(() => Number(
|
||||
document.querySelector("[data-vault-core]").style.getPropertyValue("--capture-absorption"),
|
||||
) > 0.2);
|
||||
@@ -144,8 +145,10 @@ try {
|
||||
await page.locator("#register-orbit-1").click();
|
||||
await page.getByRole("button", { name: "Capture Load test orbit 2", exact: true }).click();
|
||||
await page.getByText("Capture failed for Load test orbit 2.", { exact: true }).waitFor();
|
||||
await page.waitForFunction(() => Number(document.querySelector(".capture-flare").getAttribute("opacity")) > 0.1);
|
||||
assert.equal(await page.locator(".capture-arrival").getAttribute("opacity"), "0");
|
||||
await page.waitForFunction(() => Number(document.querySelector(".rocket-flare").getAttribute("opacity")) > 0.1);
|
||||
// A failed backup explodes and its rocket is gone.
|
||||
assert.equal(await page.evaluate(() =>
|
||||
[...document.querySelectorAll('.rocket[data-orbit="orbit-1"]')].filter(node => Number(node.getAttribute("opacity")) > 0).length), 0);
|
||||
|
||||
const workspaceWidth = await frame.evaluate(element => element.getBoundingClientRect().width);
|
||||
await page.getByRole("button", { name: "Big screen", exact: true }).click();
|
||||
|
||||
Reference in New Issue
Block a user