Snap a new song to 1/16, and route new assets as the others (#365)
game-maker / gate (push) Successful in 4m3s
game-maker / suite (push) Failing after 14m40s

A new song snapped to whole bars, too coarse to lay out a beat. And a
new or duplicated sound, instrument, pattern or song went to the
master alone, so every one had to be linked into the buses by hand
again.

- A song without a grid of its own snaps to 1/16. The songs in the
  user's project have Bar written in and keep it.
- A new or duplicated sound, instrument, pattern or song gets the links
  of the one whose targets most others of its type share, at their
  volume. On a tie the latest of them decides, so a single song decides
  for the next one.
- Where nothing of its type is linked yet, it goes as most of all that
  plays, and where nothing is, to the master. A new bus still goes to
  the master alone.
- Assets made at once are matched against what stood before, not
  against each other. A project from before the routing still opens
  with everything on the master.
- The song tab has a gridAt hook. e2e 65 checks the new grid and sets
  Bar, which its checks go by.

Tests:

- Unit master-routing (1 new) and song (1 rewritten): 26 green. Counter
  checks (rule off, grid back to Bar) red.
- e2e 65 (melektaus-atx): ALL PASSED, 58 checks (1 new).
- Gate (melektaus-atx): CHECK EXIT 0, 273 files, 4226 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-09 09:37:44 +02:00
1 parent 0e73fd85b9
commit f840ec3c44
7 files changed
+131 -11

No files matched your search

+13
View File
@@ -133,6 +133,19 @@ export async function song(t) {
);
const id = created.songs[0]?.id;
const model = () => json(`__gm.song.model(${JSON.stringify(id)})`);
// A new song snaps to 1/16; the checks below go by bars, so the grid is set to a bar here.
const newGrid = await json('__gm.song.gridAt()');
await click(newGrid.x, newGrid.y);
await sleep(150);
const barEntry = (await json("__gm.locateAll('Bar')")).find((hit) => hit.y > newGrid.y);
if (barEntry) await click(barEntry.x, barEntry.y);
await sleep(150);
const barGrid = await json('__gm.song.gridAt()');
check(
'a new song snaps to 1/16, and its Grid menu sets a bar',
newGrid.text === '1/16' && barGrid.text === 'Bar',
JSON.stringify({ newGrid, barGrid }),
);
/**
* Adds a track under the last one through its head's menu: there is no other way to. Fit first:
* the tracks a fit shares the height out to leave the one added last below the edge.