From 05de1cd619c6ecdff6961b21685ac304a4d5a272 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Sat, 21 Nov 2026 15:46:34 -0500 Subject: [PATCH 1/3] feat(ui-feedback): copy the chosen design from the command bar and hide the mockup's data bar The Copy menu gets Copy chosen design. A mockup builds its copy-out terminator text in window.uiFeedbackCopyOut, which its own terminator calls; the ready message says whether the page has one (copyOut), the host page asks with {type: "copy-out"} and the frame helper answers {type: "chosen", text}. The host keeps one reply per ask, and only when chosenFrom admits it: a non-empty string of at most 8000 code points (two note texts, note.schema.json's text maxLength 4000), kept whole, with no tag, comment or processing instruction and no control character but tab and line breaks. The text is set as a textarea value and copied, never rendered. Framed by the host page, the bundled switcher now hides every element marked data-harness-chrome, so the mockup's data bar shows only in the bar's Sample data menu, which still presses the hidden controls; opened alone from file:// the page keeps its bar. The switcher's own rule takes !important with it, so a mockup's display rule on its bar cannot win. Closes #17991 Co-Authored-By: Claude Opus 5.5 --- .../fix-17991-copy-chosen-design-2f5881f0.md | 7 ++ .../fix-17991-copy-chosen-design-694e6c08.md | 7 ++ docs/contracts/ui-feedback/README.md | 8 ++ lib/ui-feedback/frame-channel.mjs | 15 +++ lib/ui-feedback/frame-channel.test.mjs | 25 ++++- lib/ui-feedback/host.html | 1 + lib/ui-feedback/host.mjs | 30 +++++- lib/ui-feedback/proto-pin.js | 12 +++ plugins/planning/shared/web/proto-pin.js | 12 +++ .../prototype/notes-bridge/frame-channel.mjs | 15 +++ plugins/prototype/notes-bridge/host.html | 1 + plugins/prototype/notes-bridge/host.mjs | 30 +++++- plugins/prototype/notes-bridge/proto-pin.js | 12 +++ .../skills/explore-directions/SKILL.md | 5 +- .../assets/variant-switcher.html | 4 +- .../reference/data-controls.md | 4 + .../explore-directions/reference/feedback.md | 3 +- .../scripts/notes-copyout-browser-take.js | 58 ++++++++++++ .../scripts/notes-copyout-browser.test.sh | 93 +++++++++++++++++++ 19 files changed, 334 insertions(+), 8 deletions(-) create mode 100644 .changes/planning/fix-17991-copy-chosen-design-2f5881f0.md create mode 100644 .changes/prototype/fix-17991-copy-chosen-design-694e6c08.md create mode 100644 plugins/prototype/skills/explore-directions/scripts/notes-copyout-browser-take.js create mode 100755 plugins/prototype/skills/explore-directions/scripts/notes-copyout-browser.test.sh diff --git a/.changes/planning/fix-17991-copy-chosen-design-2f5881f0.md b/.changes/planning/fix-17991-copy-chosen-design-2f5881f0.md new file mode 100644 index 00000000000..5076e1748b0 --- /dev/null +++ b/.changes/planning/fix-17991-copy-chosen-design-2f5881f0.md @@ -0,0 +1,7 @@ +--- +bump: patch +--- + +### Changed + +- Shared `proto-pin.js` synced where this plugin carries it: the frame helper answers a host page's copy-out ask with the page's copy-out text; no other change to this plugin. diff --git a/.changes/prototype/fix-17991-copy-chosen-design-694e6c08.md b/.changes/prototype/fix-17991-copy-chosen-design-694e6c08.md new file mode 100644 index 00000000000..40cf01c5192 --- /dev/null +++ b/.changes/prototype/fix-17991-copy-chosen-design-694e6c08.md @@ -0,0 +1,7 @@ +--- +bump: minor +--- + +### Added + +- The notes host page's Copy menu has Copy chosen design: it copies the text the mockup's own copy-out terminator gives, which a mockup builds in `window.uiFeedbackCopyOut`. Framed by the host page, the mockup's data bar, marked `data-harness-chrome`, hides, and the bar's Sample data menu presses its controls; opened alone from `file://` the page keeps its own bar. diff --git a/docs/contracts/ui-feedback/README.md b/docs/contracts/ui-feedback/README.md index 430c0741e7c..08ed8dd8c0c 100644 --- a/docs/contracts/ui-feedback/README.md +++ b/docs/contracts/ui-feedback/README.md @@ -105,6 +105,14 @@ validator checks every note, takes all or none, skips a note already in the log, imported notes toward `x-maxNotesPerRun`, and refuses while a server runs on the data dir. The block is data like any note; it is never run as text. +Copy chosen design copies the mockup's own copy-out terminator text. A page whose terminator text +comes from a `window.uiFeedbackCopyOut()` function returning a string says so in the ready message +(`copyOut: true`). The host page then asks with `{type: "copy-out"}`, and the frame helper answers +`{type: "chosen", text}`. The host page keeps one reply per ask, and only when `chosenFrom` +(`frame-channel.mjs`) admits it: a non-empty string of at most 8000 code points, kept whole, with +no `<` before a letter, `!`, `/` or `?`, and no control character but tab and line breaks. It sets +the text as a textarea value and copies it; it never renders it as markup. + ## Controls `controls.schema.json` defines the controls manifest: the one list of what can vary on the framed diff --git a/lib/ui-feedback/frame-channel.mjs b/lib/ui-feedback/frame-channel.mjs index 366eb90be28..a1b395a1dd5 100644 --- a/lib/ui-feedback/frame-channel.mjs +++ b/lib/ui-feedback/frame-channel.mjs @@ -48,6 +48,21 @@ export function namesFrom(m) { return out; } +/** The most code points a chosen design keeps: two note texts (note.schema.json's text maxLength is 4000). */ +const CHOSEN_MAX = 8000; +const MARKUP = /<[A-Za-z!/?]/; +const CONTROL = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/; + +/** + * The text of the frame's chosen-design reply (the mockup's copy-out terminator text), whole and as sent, or null when + * the message is not a `chosen` one, its text is not a non-empty string, runs past 8000 code points, or holds a tag, + * comment or processing instruction, or a control character other than tab and line breaks. + */ +export function chosenFrom(m) { + const t = m?.type === "chosen" && typeof m.text === "string" ? m.text : ""; + return t.trim() && [...t].length <= CHOSEN_MAX && !MARKUP.test(t) && !CONTROL.test(t) ? t : null; +} + /** * Calls `onBlocked` unless the returned function is called first, within `ms`. On a frame a CSP * blocks, Firefox fires no load event and Chrome fires one diff --git a/lib/ui-feedback/frame-channel.test.mjs b/lib/ui-feedback/frame-channel.test.mjs index 59fca93e347..febc6fbd081 100644 --- a/lib/ui-feedback/frame-channel.test.mjs +++ b/lib/ui-feedback/frame-channel.test.mjs @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import { readFileSync } from "node:fs"; import { test } from "node:test"; -import { awaitReady, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "./frame-channel.mjs"; +import { awaitReady, chosenFrom, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "./frame-channel.mjs"; const DEV = "http://localhost:5173"; const HOST = readFileSync(new URL("./host.html", import.meta.url), "utf8"); @@ -149,3 +149,26 @@ test("the frame's names for listed notes keep positive integer keys and string p ]); assert.deepEqual([...namesFrom({ names: "x" })], []); }); + +const CHOSEN = "direction: B Cards\nnotes: keep the status pill; a < b stays text\ntest-ids: B: shipments-row, shipments-title\n"; + +test("the frame's chosen design is kept whole, its lines and spacing as sent", () => { + assert.equal(chosenFrom({ type: "chosen", text: CHOSEN }), CHOSEN); +}); + +test("a chosen design of 8000 code points is kept and one of 8001 is refused, never cut", () => { + assert.equal(chosenFrom({ type: "chosen", text: "😀".repeat(8000) }), "😀".repeat(8000)); + assert.equal(chosenFrom({ type: "chosen", text: "😀".repeat(8001) }), null); +}); + +test("a chosen-design message of another type, or whose text is not a non-empty string, is refused", () => { + for (const m of [{ type: "named", text: CHOSEN }, { text: CHOSEN }, { type: "chosen", text: 7 }, { type: "chosen", text: ["a"] }, { type: "chosen" }, { type: "chosen", text: " \n " }, null, "chosen"]) { + assert.equal(chosenFrom(m), null, JSON.stringify(m)); + } +}); + +test("a chosen design holding markup or a control character is refused", () => { + for (const text of ['notes: ', "ab", "", "", "", "bell\u0007", "nul\u0000"]) { + assert.equal(chosenFrom({ type: "chosen", text }), null, JSON.stringify(text)); + } +}); diff --git a/lib/ui-feedback/host.html b/lib/ui-feedback/host.html index 7f4059682fe..f5c382ab80a 100644 --- a/lib/ui-feedback/host.html +++ b/lib/ui-feedback/host.html @@ -226,6 +226,7 @@ Copy diff --git a/lib/ui-feedback/host.mjs b/lib/ui-feedback/host.mjs index 45e3a5d686d..f7f49f60b2e 100644 --- a/lib/ui-feedback/host.mjs +++ b/lib/ui-feedback/host.mjs @@ -1,5 +1,5 @@ import { draftStore, problems, readerName, use } from "/note-model.mjs"; -import { awaitReady, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "/frame-channel.mjs"; +import { awaitReady, chosenFrom, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "/frame-channel.mjs"; const $ = (id) => document.getElementById(id); const frame = $("page"), composer = $("composer"), text = $("text"); @@ -43,6 +43,7 @@ function takeControls(m) { : m.controls === false ? "The mockup's controls manifest is not JSON, so only its built-in controls are here." : m.controls == null ? "The mockup has no controls manifest." : `${controls.length} control(s) from the mockup's manifest.`; for (const b of [$("copy-config"), $("reset-controls"), $("copy-values")]) b.disabled = !controls.length; + $("copy-chosen").disabled = m.copyOut !== true; renderControls(); renderSteps(); } @@ -527,6 +528,29 @@ function copyAll() { else manual(); } +/** The mockup's copy-out terminator text, asked of the frame; only the one reply to an ask is copied, as text. */ +let wantChosen = false; +function askChosen() { + closeMenus(); + $("copy-button").focus(); + wantChosen = true; + toFrame({ type: "copy-out" }); +} +function copyChosen(m) { + wantChosen = false; + if ($("panel").hidden) setPanel(true); + selectTab(tabs[0], false); + const text = chosenFrom(m); + if (text === null) return say("The mockup's chosen design is not plain text of at most 8000 characters, so nothing was copied."); + $("block").value = text; + $("copyout").hidden = false; + $("block").select(); + const done = () => say("Copied the chosen design. Paste it to Claude."); + const manual = () => say("Select the text below and copy it, then paste it to Claude."); + if (navigator.clipboard) navigator.clipboard.writeText(text).then(done, manual); + else manual(); +} + function render() { const listening = noSession ? "No session: the notes server is not answering. Your notes stay on this page; Copy all notes makes a block to paste to Claude." @@ -662,6 +686,7 @@ addEventListener("message", (e) => { else if (m.type === "shown" && m.found === false && chosen) say("That note's place is not on the mockup now, so no box is drawn."); else if (m.type === "content" && fits(m.name, schema.properties.content)) { content = m.name; renderControls(); } else if (m.type === "want-text") askText(); + else if (m.type === "chosen" && wantChosen) copyChosen(m); else if (m.type === "key" && FRAME_KEYS.has(m.key)) shortcut(m.key); else if (m.type === "pinned" && picking === "element") { const note = noteFrom(m, "element"); @@ -699,6 +724,7 @@ $("dock").addEventListener("click", () => setPanel($("panel").hidden)); $("markers").addEventListener("click", () => setMarkers(!markersShown)); $("cancel").addEventListener("click", closeComposer); $("copy").addEventListener("click", copyAll); +$("copy-chosen").addEventListener("click", askChosen); $("copy-config").addEventListener("click", copyConfig); $("copy-values").addEventListener("click", () => { closeMenus(); $("copy-button").focus(); if ($("panel").hidden) setPanel(true); selectTab(tabs[1], false); copyConfig(); }); $("side").addEventListener("click", () => setSide($("panel").dataset.side === "start" ? "end" : "start")); @@ -774,7 +800,7 @@ try { if (loads > 1) { ready = false; picking = null; - for (const b of [...Object.values(buttons), $("quote"), $("controls-fields"), $("copy-config"), $("reset-controls"), $("copy-values"), $("vprev"), $("vnext")]) b.disabled = true; + for (const b of [...Object.values(buttons), $("quote"), $("controls-fields"), $("copy-config"), $("reset-controls"), $("copy-values"), $("copy-chosen"), $("vprev"), $("vnext")]) b.disabled = true; for (const b of $("data-list").children) b.disabled = true; say("The mockup loaded another page in its frame, so this page stopped listening to it. Reload to start again."); $("controls-status").textContent = "The mockup loaded another page in its frame, so these controls no longer reach it. Reload to start again."; diff --git a/lib/ui-feedback/proto-pin.js b/lib/ui-feedback/proto-pin.js index 2a6fd5ad45e..ae59f625813 100644 --- a/lib/ui-feedback/proto-pin.js +++ b/lib/ui-feedback/proto-pin.js @@ -630,6 +630,7 @@ else if (m.type === "name") names(m.targets); else if (m.type === "set") setControls(m.values); else if (m.type === "press" && !mode) replay([m.step]); + else if (m.type === "copy-out") post({ type: "chosen", text: copyOut() }); else if (m.type === "focus") { const p = pins.find(x => x.n === m.n); if (!p) return; @@ -638,9 +639,20 @@ else scrollTo({ top: Math.max(0, at.y - innerHeight / 3), behavior }); } }); + /** The page's copy-out terminator text, from the function its own terminator calls; null when it has none. */ + function copyOut() { + try { + const t = typeof window.uiFeedbackCopyOut === "function" ? window.uiFeedbackCopyOut() : null; + return typeof t === "string" ? t : null; + } catch (err) { + console.error("ui-feedback: the page's uiFeedbackCopyOut threw", err); + return null; + } + } const marks = [...document.querySelectorAll("[data-data-control]")].map(stepOf).filter(Boolean); post({ type: "ready", + copyOut: typeof window.uiFeedbackCopyOut === "function", controls: window.uiFeedbackControls?.manifest() ?? null, data: [...new Map(marks.map(m => [JSON.stringify(m), m])).values()], content: document.querySelector('[data-content-set="demo"]') && document.querySelector('[data-content-set="worst"]') ? root.dataset.vsContent || null : null, diff --git a/plugins/planning/shared/web/proto-pin.js b/plugins/planning/shared/web/proto-pin.js index 57ab5e1f53a..1d040421987 100644 --- a/plugins/planning/shared/web/proto-pin.js +++ b/plugins/planning/shared/web/proto-pin.js @@ -632,6 +632,7 @@ else if (m.type === "name") names(m.targets); else if (m.type === "set") setControls(m.values); else if (m.type === "press" && !mode) replay([m.step]); + else if (m.type === "copy-out") post({ type: "chosen", text: copyOut() }); else if (m.type === "focus") { const p = pins.find(x => x.n === m.n); if (!p) return; @@ -640,9 +641,20 @@ else scrollTo({ top: Math.max(0, at.y - innerHeight / 3), behavior }); } }); + /** The page's copy-out terminator text, from the function its own terminator calls; null when it has none. */ + function copyOut() { + try { + const t = typeof window.uiFeedbackCopyOut === "function" ? window.uiFeedbackCopyOut() : null; + return typeof t === "string" ? t : null; + } catch (err) { + console.error("ui-feedback: the page's uiFeedbackCopyOut threw", err); + return null; + } + } const marks = [...document.querySelectorAll("[data-data-control]")].map(stepOf).filter(Boolean); post({ type: "ready", + copyOut: typeof window.uiFeedbackCopyOut === "function", controls: window.uiFeedbackControls?.manifest() ?? null, data: [...new Map(marks.map(m => [JSON.stringify(m), m])).values()], content: document.querySelector('[data-content-set="demo"]') && document.querySelector('[data-content-set="worst"]') ? root.dataset.vsContent || null : null, diff --git a/plugins/prototype/notes-bridge/frame-channel.mjs b/plugins/prototype/notes-bridge/frame-channel.mjs index 06e7f4c3249..da470892ab0 100644 --- a/plugins/prototype/notes-bridge/frame-channel.mjs +++ b/plugins/prototype/notes-bridge/frame-channel.mjs @@ -50,6 +50,21 @@ export function namesFrom(m) { return out; } +/** The most code points a chosen design keeps: two note texts (note.schema.json's text maxLength is 4000). */ +const CHOSEN_MAX = 8000; +const MARKUP = /<[A-Za-z!/?]/; +const CONTROL = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/; + +/** + * The text of the frame's chosen-design reply (the mockup's copy-out terminator text), whole and as sent, or null when + * the message is not a `chosen` one, its text is not a non-empty string, runs past 8000 code points, or holds a tag, + * comment or processing instruction, or a control character other than tab and line breaks. + */ +export function chosenFrom(m) { + const t = m?.type === "chosen" && typeof m.text === "string" ? m.text : ""; + return t.trim() && [...t].length <= CHOSEN_MAX && !MARKUP.test(t) && !CONTROL.test(t) ? t : null; +} + /** * Calls `onBlocked` unless the returned function is called first, within `ms`. On a frame a CSP * blocks, Firefox fires no load event and Chrome fires one diff --git a/plugins/prototype/notes-bridge/host.html b/plugins/prototype/notes-bridge/host.html index 90dfc82d74a..4160b3666eb 100644 --- a/plugins/prototype/notes-bridge/host.html +++ b/plugins/prototype/notes-bridge/host.html @@ -228,6 +228,7 @@ diff --git a/plugins/prototype/notes-bridge/host.mjs b/plugins/prototype/notes-bridge/host.mjs index fb0511da394..810b5fadf04 100644 --- a/plugins/prototype/notes-bridge/host.mjs +++ b/plugins/prototype/notes-bridge/host.mjs @@ -1,7 +1,7 @@ // GENERATED from lib/ui-feedback/host.mjs by scripts/sync-shared-copies.sh. Do not edit this copy: // edit the canonical source, then rerun the script. import { draftStore, problems, readerName, use } from "/note-model.mjs"; -import { awaitReady, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "/frame-channel.mjs"; +import { awaitReady, chosenFrom, frameTarget, fromFrame, namesFrom, READY_MS, viewFrom } from "/frame-channel.mjs"; const $ = (id) => document.getElementById(id); const frame = $("page"), composer = $("composer"), text = $("text"); @@ -45,6 +45,7 @@ function takeControls(m) { : m.controls === false ? "The mockup's controls manifest is not JSON, so only its built-in controls are here." : m.controls == null ? "The mockup has no controls manifest." : `${controls.length} control(s) from the mockup's manifest.`; for (const b of [$("copy-config"), $("reset-controls"), $("copy-values")]) b.disabled = !controls.length; + $("copy-chosen").disabled = m.copyOut !== true; renderControls(); renderSteps(); } @@ -529,6 +530,29 @@ function copyAll() { else manual(); } +/** The mockup's copy-out terminator text, asked of the frame; only the one reply to an ask is copied, as text. */ +let wantChosen = false; +function askChosen() { + closeMenus(); + $("copy-button").focus(); + wantChosen = true; + toFrame({ type: "copy-out" }); +} +function copyChosen(m) { + wantChosen = false; + if ($("panel").hidden) setPanel(true); + selectTab(tabs[0], false); + const text = chosenFrom(m); + if (text === null) return say("The mockup's chosen design is not plain text of at most 8000 characters, so nothing was copied."); + $("block").value = text; + $("copyout").hidden = false; + $("block").select(); + const done = () => say("Copied the chosen design. Paste it to Claude."); + const manual = () => say("Select the text below and copy it, then paste it to Claude."); + if (navigator.clipboard) navigator.clipboard.writeText(text).then(done, manual); + else manual(); +} + function render() { const listening = noSession ? "No session: the notes server is not answering. Your notes stay on this page; Copy all notes makes a block to paste to Claude." @@ -664,6 +688,7 @@ addEventListener("message", (e) => { else if (m.type === "shown" && m.found === false && chosen) say("That note's place is not on the mockup now, so no box is drawn."); else if (m.type === "content" && fits(m.name, schema.properties.content)) { content = m.name; renderControls(); } else if (m.type === "want-text") askText(); + else if (m.type === "chosen" && wantChosen) copyChosen(m); else if (m.type === "key" && FRAME_KEYS.has(m.key)) shortcut(m.key); else if (m.type === "pinned" && picking === "element") { const note = noteFrom(m, "element"); @@ -701,6 +726,7 @@ $("dock").addEventListener("click", () => setPanel($("panel").hidden)); $("markers").addEventListener("click", () => setMarkers(!markersShown)); $("cancel").addEventListener("click", closeComposer); $("copy").addEventListener("click", copyAll); +$("copy-chosen").addEventListener("click", askChosen); $("copy-config").addEventListener("click", copyConfig); $("copy-values").addEventListener("click", () => { closeMenus(); $("copy-button").focus(); if ($("panel").hidden) setPanel(true); selectTab(tabs[1], false); copyConfig(); }); $("side").addEventListener("click", () => setSide($("panel").dataset.side === "start" ? "end" : "start")); @@ -776,7 +802,7 @@ try { if (loads > 1) { ready = false; picking = null; - for (const b of [...Object.values(buttons), $("quote"), $("controls-fields"), $("copy-config"), $("reset-controls"), $("copy-values"), $("vprev"), $("vnext")]) b.disabled = true; + for (const b of [...Object.values(buttons), $("quote"), $("controls-fields"), $("copy-config"), $("reset-controls"), $("copy-values"), $("copy-chosen"), $("vprev"), $("vnext")]) b.disabled = true; for (const b of $("data-list").children) b.disabled = true; say("The mockup loaded another page in its frame, so this page stopped listening to it. Reload to start again."); $("controls-status").textContent = "The mockup loaded another page in its frame, so these controls no longer reach it. Reload to start again."; diff --git a/plugins/prototype/notes-bridge/proto-pin.js b/plugins/prototype/notes-bridge/proto-pin.js index 57ab5e1f53a..1d040421987 100644 --- a/plugins/prototype/notes-bridge/proto-pin.js +++ b/plugins/prototype/notes-bridge/proto-pin.js @@ -632,6 +632,7 @@ else if (m.type === "name") names(m.targets); else if (m.type === "set") setControls(m.values); else if (m.type === "press" && !mode) replay([m.step]); + else if (m.type === "copy-out") post({ type: "chosen", text: copyOut() }); else if (m.type === "focus") { const p = pins.find(x => x.n === m.n); if (!p) return; @@ -640,9 +641,20 @@ else scrollTo({ top: Math.max(0, at.y - innerHeight / 3), behavior }); } }); + /** The page's copy-out terminator text, from the function its own terminator calls; null when it has none. */ + function copyOut() { + try { + const t = typeof window.uiFeedbackCopyOut === "function" ? window.uiFeedbackCopyOut() : null; + return typeof t === "string" ? t : null; + } catch (err) { + console.error("ui-feedback: the page's uiFeedbackCopyOut threw", err); + return null; + } + } const marks = [...document.querySelectorAll("[data-data-control]")].map(stepOf).filter(Boolean); post({ type: "ready", + copyOut: typeof window.uiFeedbackCopyOut === "function", controls: window.uiFeedbackControls?.manifest() ?? null, data: [...new Map(marks.map(m => [JSON.stringify(m), m])).values()], content: document.querySelector('[data-content-set="demo"]') && document.querySelector('[data-content-set="worst"]') ? root.dataset.vsContent || null : null, diff --git a/plugins/prototype/skills/explore-directions/SKILL.md b/plugins/prototype/skills/explore-directions/SKILL.md index 91d58c8b0a0..81d2d3280cd 100644 --- a/plugins/prototype/skills/explore-directions/SKILL.md +++ b/plugins/prototype/skills/explore-directions/SKILL.md @@ -169,7 +169,10 @@ page with synthetic data and an in-page switcher. Assemble one per task: 3. **A copy-out terminator**, a small control that lifts the winning-variant key, notes and the proposed test ids back out as text you can paste into your durable answer. It lists the test ids per variant, read from the page's `data-testid` attributes rather than typed out, so the - list matches the markup. + list matches the markup. Build the text in one inline function, `window.uiFeedbackCopyOut`, + that returns it as a string, and have the terminator call it. The notes host page's Copy + chosen design calls the same function through its frame helper, so both give the same text. + Keep the text plain (no tags) and at most 8000 characters, or the host page copies nothing. Constraints: diff --git a/plugins/prototype/skills/explore-directions/assets/variant-switcher.html b/plugins/prototype/skills/explore-directions/assets/variant-switcher.html index cc1101acf1b..90636caf5c7 100644 --- a/plugins/prototype/skills/explore-directions/assets/variant-switcher.html +++ b/plugins/prototype/skills/explore-directions/assets/variant-switcher.html @@ -26,6 +26,8 @@ elements inside it are lost: wire variant interactions with listeners delegated from document. Chrome, not a contestant: leave its look alone. It takes the notes host page's light and dark tokens, and it hides when that page frames the mockup, whose command bar steps the variants. + Under that bar it also hides every element marked data-harness-chrome, such as the page's data + bar, whose controls the bar's Sample data menu presses. -->