feat(06-05): guidance/confirm/trip-end card builders + the token-only shell.css guidance block (GREEN)

- buildGuidanceCard: GUIDE register, verbatim headline, live telemetry row (MIN / {km} KM / ETA), 4px progressbar with full aria value set + instant inline width, no-reroute state line only when degrading, ONE btn-secondary END TRIP
- buildConfirmCard: GUIDE // CONFIRM + exact en/ms privacy copy, btn-primary YES ABANDON + btn-secondary CONTINUE, guide-confirm bottom-register hook — the ONE primary CTA in guidance chrome
- buildTripEndCard: GUIDE // END, exact deletion copy, no actions
- shell.css guidance block: banner chassis + 1px separator, CSS-only strip compaction under [data-guidance], list panel + row states + lamp, progress bar — token vars only, zero motion/depth/radius/hex (theme audit clean)
This commit is contained in:
araharah-executor
2026-10-24 14:18:21 +08:00
parent f0931d6195
commit 79836f0a31
3 changed files with 251 additions and 2 deletions
+5 -2
View File
@@ -600,7 +600,10 @@ test("GS11 shell.css guidance block — zero transition/animation/box-shadow/bor
const css = readFileSync(cssPath, "utf8");
const marker = css.indexOf("guidance cockpit");
assert.ok(marker > 0, "the guidance block exists in shell.css");
const block = css.slice(marker);
// prose is not a call site (GEO3 pattern): strip CSS comments, then scan
const block = css
.slice(marker)
.replace(/\/\*[\s\S]*?\*\//g, " ");
assert.ok(block.length > 500, `the block dresses the whole cockpit (found ${block.length} chars)`);
for (const banned of ["transition", "animation", "box-shadow", "border-radius"]) {
assert.ok(!block.includes(banned), `guidance block uses ${banned} — states are instant hard swaps, zero depth`);
@@ -620,5 +623,5 @@ test("GS11 shell.css guidance block — zero transition/animation/box-shadow/bor
test("GS12 banner.ts places .btn-primary exactly once — the confirm card's YES, ABANDON (comment-stripped)", () => {
const src = codeText(path.join(GUIDANCE_DIR, "banner.ts"));
assert.equal((src.match(/btn-primary/g) ?? []).length, 1, "only the confirm card builds a primary CTA");
assert.ok((src.match(/btn-secondary/g) ?? []).length >= 2, "END TRIP + CONTINUE are secondary");
assert.equal((src.match(/btn-secondary/g) ?? []).length, 1, "every other action rides the shared secondary-button helper");
});