From 82c10535ac0ae0a5362d083a3b4025eb12550002 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Mon, 27 Jul 2026 21:11:03 -0700 Subject: [PATCH] Complete No Paint paintings through Prompt --- .../aesthetic.computer/disks/nopaint.mjs | 33 +++++++++++++------ tests/browser/nopaint-journey.test.mjs | 6 ++-- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/system/public/aesthetic.computer/disks/nopaint.mjs b/system/public/aesthetic.computer/disks/nopaint.mjs index f1cdf9c3d0..3de9b9218d 100644 --- a/system/public/aesthetic.computer/disks/nopaint.mjs +++ b/system/public/aesthetic.computer/disks/nopaint.mjs @@ -299,13 +299,20 @@ function paintMarkerLabel($, button, label, color) { }); } -function paintDecisionButton($, button, label, light = false) { +function paintDecisionButton($, button, label, flavor = "no") { const active = button.down || button.over; - $.ink(light ? [250, 250, 250, active ? 235 : 205] : [205, 38, 48, active ? 255 : 235]) + const palette = flavor === "paint" + ? { fill: [250, 250, 250, active ? 235 : 205], ink: [20, 20, 20] } + : flavor === "back" + ? { fill: [232, 119, 28, active ? 255 : 235], ink: [255, 250, 235] } + : flavor === "done" + ? { fill: [45, 170, 76, active ? 255 : 235], ink: [245, 255, 245] } + : { fill: [205, 38, 48, active ? 255 : 235], ink: [255, 245, 235] }; + $.ink(palette.fill) .box(button.box, "fill") - .ink(light ? [20, 20, 20] : [255, 255, 255]) + .ink(palette.ink) .box(button.box, "outline"); - paintMarkerLabel($, button, label, light ? [20, 20, 20] : [255, 245, 235]); + paintMarkerLabel($, button, label, palette.ink); } function paintOriginalCursor($) { @@ -879,11 +886,11 @@ function paint($) { positionButtons($.screen); if (finishMode) { - paintDecisionButton($, backButton.btn, "Back"); - paintDecisionButton($, doneButton.btn, "Done", true); + paintDecisionButton($, backButton.btn, "Back", "back"); + paintDecisionButton($, doneButton.btn, "Done", "done"); } else { paintDecisionButton($, noButton.btn, "No"); - paintDecisionButton($, paintButton.btn, "Paint", true); + paintDecisionButton($, paintButton.btn, "Paint", "paint"); } paintOriginalCursor($); return loopState === "proposing"; @@ -958,7 +965,11 @@ function act($) { playCue($, "done"); doneCount += 1; publishTestState(); - if (!initialNavigationURL()?.searchParams.has("test")) $.jump("done"); + // `done` is a Prompt command, not a piece. Autorun the canonical + // completion pipeline so it uploads and yields `painting#CODE`. + if (!initialNavigationURL()?.searchParams.has("test")) { + $.jump("prompt~done~!autorun"); + } }, }); if ( @@ -973,7 +984,9 @@ function act($) { e.y >= stage.y && e.y <= stage.y + stage.h; if (e.is("touch:1") && overPainting) { paintingPressed = true; - playCue($, "button-down"); + // The painting is the pause surface. Construct uses the same tactile + // press vocabulary heard on Space here, not a generic UI-button click. + playCue($, "pause-down"); setDecisionHeld(true); $.needsPaint(); publishTestState(); @@ -1028,7 +1041,7 @@ function act($) { if (!paintingPressed) return; paintingPressed = false; setDecisionHeld(false); - playCue($, "button-up"); + playCue($, "pause-in"); stopBrushCue(); finishMode = true; stateBeforePause = loopState; diff --git a/tests/browser/nopaint-journey.test.mjs b/tests/browser/nopaint-journey.test.mjs index 5357cb55c4..5704502a17 100644 --- a/tests/browser/nopaint-journey.test.mjs +++ b/tests/browser/nopaint-journey.test.mjs @@ -351,9 +351,9 @@ try { let finishing = await ac.nopaintState(); await receipt("05-done-ready"); expect(finishing?.finishMode === true, "tapping the painting enters completion mode"); - expect(finishing?.audio?.events?.some(({ name }) => name === "button-down") && - finishing?.audio?.events?.some(({ name }) => name === "button-up"), - "painting tap emits button press and release cues"); + expect(finishing?.audio?.events?.some(({ name }) => name === "pause-down") && + finishing?.audio?.events?.some(({ name }) => name === "pause-in"), + "painting tap emits the same tactile pause cues as Space"); expect( Object.keys(finishing?.controls || {}).join(",") === "back,done", "Back and Done replace the painting decisions", -- 2.51.2