Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (claude): pin the col to source-x mapping in the paint test

[._.]/ Adam Eivyc258f71fc11d
diff --git a/client/src/components/sprites/LoopTrimmer.test.jsx b/client/src/components/sprites/LoopTrimmer.test.jsx
index 78886b72ea..966a23125a 100644
--- a/client/src/components/sprites/LoopTrimmer.test.jsx
+++ b/client/src/components/sprites/LoopTrimmer.test.jsx
@@ -166,7 +166,16 @@ describe('LoopTrimmer', () => {
const { calls, ctx, restore } = recordingContext();
try {
renderTrimmer();
- await waitFor(() => expect(calls.some(([fn]) => fn === 'drawImage')).toBe(true));
+ // Wait until every thumbnail has painted, and pin the col → source-x
+ // mapping while doing it: each of the 8 thumbnails must read its OWN cell
+ // out of the strip. Asserting only that source-x lands on a cell boundary
+ // would still pass if `col` were dropped and every frame showed cell 0.
+ const drawnColumns = () => [
+ ...new Set(calls.filter(([fn]) => fn === 'drawImage').map((c) => c[2] / STRIP_CELL_PX)),
+ ].sort((a, b) => a - b);
+ await waitFor(() => {
+ expect(drawnColumns()).toEqual(Array.from({ length: STRIP_FRAMES }, (_, i) => i));
+ });
const drawAt = calls.map(([fn], i) => (fn === 'drawImage' ? i : -1)).filter((i) => i >= 0);
drawAt.forEach((i) => {
// Every draw is immediately preceded by a full-surface clear.