diff --git a/web/PARITY.md b/web/PARITY.md
index fc168e3a..eeb3f75f 100644
--- a/web/PARITY.md
+++ b/web/PARITY.md
@@ -397,6 +397,7 @@ browser capture (no live runs were authorized).
| R12 | Cancel run | `cancel_run` | done — `src/actions.js` `canCancel` offers a `Cancel run` action only while the run is `executing`; the confirm dialog is the Android copy verbatim (title `Cancel run {id}?`, `This asks the server to stop the active run.`, confirm `Cancel run`, dismiss `Keep`), and the request is exactly `{type:'cancel_run',run_id}` followed by a silent `get_run` refresh (unit-tested in `test/repository.test.mjs`). Captured `captures/40-run-459-cancel-confirm.png` on the executing run present at capture time. **Shown, not executed**: the only candidate was another live pipeline's executing run, so the dialog was shown and dismissed with `Keep` — no `cancel_run` was sent (a real cancel is only safe against a run started in a scratch workspace, which this stage did not do) |
| R13 | Retry failed stage (resume) / restart from start | `retry_run` | done — `canRetry` is true only for a loaded, non-executing, `failed` run; the Retry confirm is the Android copy verbatim (title `Retry run {id}?`, `Only failed runs can be retried. The server starts a new run from the same input.`, confirm `Retry`, dismiss `Keep`) and the default send carries only `run_id` + a fresh `request_key` (**no** `retry_mode`, so the server's `resume` default applies exactly like the Android client's mode-less call; unit-tested). Captured `captures/35-run-440-run-actions.png` (failed run 440 offers Retry and no Cancel) and `captures/36-run-440-retry-confirm.png`. **Divergence from the Android UI, stated here**: Android exposes resume only while the protocol has both modes, so the browser adds a clearly-labelled secondary `Restart from start` confirm that states it `replays the whole pipeline from the start instead of resuming the failed stage` and sends `retry_mode:"restart"` (`captures/37-run-440-restart-confirm.png`). Both dialogs were shown and dismissed with `Keep`; no run was started |
| R14 | Rename a run | `set_run_title` | done — an inline field on the Summary title row (pre-filled with the current title, `Rename` / `Save` / `Cancel`) sending exactly `{type:'set_run_title',run_id,title}` and then refreshing the run and the runs-list row (unit-tested). Captured `captures/38-run-440-rename-field.png`. The one shared `Action failed` dialog was exercised by a real refused rename: `captures/39-run-440-action-failed.png` shows the live server's exact reason `a title with usable text is required` (a blank title mutates nothing). **Divergence from the Android UI, stated here**: Android does not surface `set_run_title` at all (its README records the deliberate omission), so this control is browser-only |
+| R16 | Copy original run prompt | client-side clipboard | partial — the run detail offers a native **Copy prompt** button only for a string in the original `input.prompt` (empty strings are preserved); success, missing Clipboard API and rejected writes have polite status feedback. Isolated real-browser fixture `test/run-copy-prompt-browser.mjs` checks exact whitespace, non-fallback title/output, missing prompt, keyboard activation, no requests, >=44px target and no horizontal overflow at 390/420/1100px. Captures and geometry: `/Users/alan/.local/share/pipelines/data/artifacts/20/public/copy-prompt-captures/`. Fixture-only evidence; live-server acceptance is not claimed |
| R15 | Attention / "Needs you" surface: counts, open, individual dismiss, clear all | derived from `list_runs` + run events | done — the pure `src/attention.js` model mirrors `ui/Attention.kt` and feeds a bell action in the Runs list heading (badge only when non-empty; accessible name `Notifications` / `Notifications, {n} needing attention`) and a bottom sheet titled `Needs you` in `src/app.js`. The bell itself is a monochrome 20px outline drawn as decorative inline SVG stroked with `currentColor` (two unfilled paths, no emoji, no asset request or icon font), and its badge is absolutely positioned so the count appearing or clearing never shifts the Runs heading. Because the shell has no global top bar, the same count is mirrored as a badge on the Runs destination in the rail/dock, so an operator on Pipelines, Chat or Settings can still see that something needs attention without opening Runs; the bell itself stays the Runs-local entry point. Only a `waiting` run (kind Decision, rank 0) and a `failed` run (kind Failed, rank 1) qualify; order is kind rank, then recency descending (`finished_at` else `created_at`), then run id descending. Rows carry a status icon, the trimmed-title-else-pipeline label, the exact `{pipeline} · {detail}` line (`Waiting for your decision`, or the trimmed diagnostic else `Run failed`) and a trailing `Dismiss`; tapping a row opens the run, dismissing a Failed row first while a Decision row is left for its answer. Clear all acts only on the snapshot taken when the sheet opened; dismissals persist as one JSON array of `{runId}:{kind}` identities under `pipelines.web.attention.v1` with no expiry (blank/unreadable storage decodes to empty and never throws). Entries are derived from `list_runs` here; R10 will feed the same pure model the pushed `run_event` summaries, with no wording or ordering change. Captured 2026-10-19: `captures/35-attention-bell.png` (bell + badge on the Runs list), `captures/36-attention-sheet.png` (the open sheet), `captures/37-attention-dismissed.png` (one entry individually dismissed, badge 171→170), `captures/38-attention-cleared.png` (Clear all: the empty copy, no Clear all, badge gone). The same glyph is captured 2026-10-20 at the narrow width in `captures/35a-attention-bell-narrow-420x900.png` and at zero (no badge, `Notifications`, still the same SVG) in `captures/38a-attention-bell-zero-1440x900.png` and `captures/38b-attention-bell-zero-420x900.png`. No run was parked in `waiting` on the live server at capture time, so the sheet is exercised with real failed runs and the decision-open path is unit-tested |
Two wording decisions in R3's stage pane, recorded here as the app-authoritative
diff --git a/web/dialogs.css b/web/dialogs.css
index 6545cfe4..b6a79f6a 100644
--- a/web/dialogs.css
+++ b/web/dialogs.css
@@ -175,6 +175,10 @@
.run-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.run-action { padding: 4px 12px; font-size: 12px; }
+.run-action.copy-prompt { min-height: var(--density-touch-target); }
+.run-action-status { flex: 1 0 100%; min-width: 0; font-size: 12px; }
+.run-action-status[data-state="success"] { color: var(--ok); }
+.run-action-status[data-state="error"] { color: var(--bad); }
.run-action.cancel-run { border-color: var(--warn); color: var(--warn); }
.run-action.retry-run { border-color: var(--accent); color: var(--accent); }
diff --git a/web/src/runDetail.js b/web/src/runDetail.js
index 1c86bd71..6e409c38 100644
--- a/web/src/runDetail.js
+++ b/web/src/runDetail.js
@@ -66,6 +66,11 @@ export const EMPTY_OUTPUT_MESSAGE = "No output recorded.";
export const EMPTY_TIMELINE_MESSAGE = "No visits recorded.";
export const NO_STAGE_DETAILS_MESSAGE = "No details recorded for this node.";
+/** The original run prompt, without display formatting or a fallback source. */
+export function originalRunPrompt(run) {
+ return typeof run?.input?.prompt === "string" ? run.input.prompt : undefined;
+}
+
/** The stage-pane section titles (Android StageDetailPane constants). */
export const STAGE_ARTIFACTS_TITLE = "Artifacts";
export const STAGE_SESSION_TITLE = "Session";
diff --git a/web/src/views/runDetail.js b/web/src/views/runDetail.js
index bb4ad1df..0ec02a84 100644
--- a/web/src/views/runDetail.js
+++ b/web/src/views/runDetail.js
@@ -17,6 +17,7 @@ import {
EMPTY_OUTPUT_MESSAGE,
EMPTY_TIMELINE_MESSAGE,
NO_STAGE_DETAILS_MESSAGE,
+ originalRunPrompt,
fieldSections,
summaryRows,
runIdentityLine,
@@ -974,6 +975,46 @@ function renderDecisionCard(decision) {
/** Run controls plus an independent schedule seeded from the original RunInfo. */
function renderRunActions(d) {
const buttons = [];
+ let status = null;
+ const prompt = originalRunPrompt(d);
+ if (prompt !== undefined) {
+ status = h("span", {
+ class: "run-action-status",
+ role: "status",
+ "aria-live": "polite",
+ "aria-atomic": "true",
+ hidden: true,
+ });
+ const report = (message, tone) => {
+ status.textContent = message;
+ status.dataset.state = tone;
+ status.hidden = false;
+ };
+ const copy = h("button", {
+ class: "run-action copy-prompt",
+ type: "button",
+ text: "Copy prompt",
+ "aria-label": "Copy prompt",
+ });
+ copy.addEventListener("click", async () => {
+ const clipboard = typeof navigator === "undefined" ? null : navigator.clipboard;
+ if (typeof clipboard?.writeText !== "function") {
+ report("Clipboard is unavailable in this browser.", "error");
+ return;
+ }
+ copy.disabled = true;
+ report("Copying prompt…", "pending");
+ try {
+ await clipboard.writeText(prompt);
+ report("Prompt copied to clipboard.", "success");
+ } catch {
+ report("Could not copy prompt to clipboard.", "error");
+ } finally {
+ copy.disabled = false;
+ }
+ });
+ buttons.push(copy);
+ }
if (rt.views?.schedules && Number(d.pipeline_id) > 0 && Number(d.version) > 0) {
buttons.push(h("button", {
class: "run-action schedule-run",
@@ -1013,6 +1054,7 @@ function renderRunActions(d) {
}),
);
}
+ if (status) buttons.push(status);
if (!buttons.length) return null;
return h("div", { class: "run-actions" }, ...buttons);
}
diff --git a/web/test/run-copy-prompt-browser.mjs b/web/test/run-copy-prompt-browser.mjs
new file mode 100644
index 00000000..3ac92b0e
--- /dev/null
+++ b/web/test/run-copy-prompt-browser.mjs
@@ -0,0 +1,209 @@
+// Copy-prompt UI regression: real run-detail view with isolated fixture data.
+import assert from "node:assert/strict";
+import { createServer } from "node:http";
+import { mkdir, readFile, writeFile } from "node:fs/promises";
+import { resolve, extname, dirname } from "node:path";
+import { fileURLToPath } from "node:url";
+import { launchChrome } from "./browser.mjs";
+
+const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
+const out = resolve(process.argv[2] ?? "captures-copy-prompt");
+await mkdir(out, { recursive: true });
+const prompt = "\n Review the recorded prompt.\nKeep every line and both trailing spaces. \n";
+const html = `
+${["design/tokens/tokens", "base", "shell", "lists", "run-detail", "dialogs"].map((name) => ``).join("")}
+
+`;
+const server = createServer(async (request, response) => {
+ try {
+ const pathname = new URL(request.url, "http://fixture").pathname;
+ if (pathname === "/") {
+ response.setHeader("Content-Type", "text/html");
+ response.end(html);
+ return;
+ }
+ const file = resolve(root, `.${pathname}`);
+ if (!file.startsWith(`${root}/`)) throw new Error("outside fixture root");
+ response.setHeader("Content-Type", extname(file) === ".css" ? "text/css" : "text/javascript");
+ response.end(await readFile(file));
+ } catch {
+ response.writeHead(404);
+ response.end();
+ }
+});
+await new Promise((resolveListen) => server.listen(0, "127.0.0.1", resolveListen));
+
+let browser;
+let page;
+const measurements = [];
+async function capture(name) {
+ await page.screenshot(resolve(out, `${name}.png`));
+}
+
+try {
+ browser = await launchChrome();
+ page = await browser.openPage(`http://127.0.0.1:${server.address().port}/`);
+ await page.waitForSelector(".run-actions .copy-prompt");
+
+ for (const width of [390, 420, 1100]) {
+ await page.resize(width, 844);
+ await page.evaluate('setRunInput({ prompt: basePrompt }); setClipboard("success")');
+ await page.waitForSelector('.run-actions .copy-prompt');
+ const geometry = await page.evaluate(`(() => {
+ const button = document.querySelector('.copy-prompt');
+ const rect = button.getBoundingClientRect();
+ const schedule = document.querySelector('.schedule-run');
+ return {
+ width: innerWidth,
+ button: { x: rect.x, y: rect.y, width: rect.width, height: rect.height },
+ scheduleY: schedule.getBoundingClientRect().y,
+ statusAfterActions: document.querySelector('.run-actions').lastElementChild === document.querySelector('.run-action-status'),
+ overflow: document.documentElement.scrollWidth > innerWidth,
+ buttonLabel: button.getAttribute('aria-label'),
+ statusRole: document.querySelector('.run-action-status').getAttribute('role'),
+ statusLive: document.querySelector('.run-action-status').getAttribute('aria-live'),
+ scheduleText: document.querySelector('.schedule-run')?.textContent,
+ scheduleTitle: document.querySelector('.schedule-run')?.title,
+ };
+ })()`);
+ measurements.push(geometry);
+ assert.ok(geometry.button.height >= 44, `${width}px Copy prompt target is at least 44px`);
+ assert.equal(geometry.overflow, false, `${width}px has no horizontal overflow`);
+ assert.equal(geometry.buttonLabel, "Copy prompt");
+ assert.equal(geometry.statusRole, "status");
+ assert.equal(geometry.statusLive, "polite");
+ assert.equal(geometry.statusAfterActions, true, "feedback follows the action buttons");
+ assert.equal(geometry.scheduleText, "Schedule this run");
+ assert.match(geometry.scheduleTitle, /independent timer/);
+
+ // Reach the native button by ordinary Tab navigation and activate with Enter.
+ await page.evaluate('document.querySelector(".run-detail-title").focus()');
+ await page.pressKey("Tab");
+ assert.equal(await page.evaluate('document.activeElement.classList.contains("copy-prompt")'), true);
+ assert.notEqual(await page.evaluate('getComputedStyle(document.activeElement).outlineStyle'), "none", "keyboard focus has the shared focus ring");
+ await page.pressKey("Enter");
+ await page.waitForText("Prompt copied to clipboard.");
+ assert.equal(await page.evaluate('document.querySelector(".schedule-run").getBoundingClientRect().y'), geometry.scheduleY,
+ "clipboard feedback does not move Schedule this run");
+ assert.deepEqual(await page.evaluate("clipboardWrites"), [prompt]);
+ assert.equal(await page.evaluate('document.querySelector(".run-action-status").dataset.state'), "success");
+ assert.deepEqual(await page.evaluate("calls.repo"), [], "copying makes no repository/run/schedule calls");
+ assert.deepEqual(await page.evaluate("calls.fetch"), [], "copying makes no fetch requests");
+ assert.match(await page.text(), /TITLE MUST NOT BE COPIED/);
+ assert.equal(await page.evaluate("state.runDetail.output.markdown"), "OUTPUT MUST NOT BE COPIED");
+ await capture(`copy-prompt-success-${width}`);
+ }
+
+ await page.resize(390, 844);
+ await page.evaluate('setRunInput({ prompt: basePrompt }); setClipboard("missing")');
+ await page.click(".copy-prompt");
+ await page.waitForText("Clipboard is unavailable in this browser.");
+ assert.equal(await page.evaluate('document.querySelector(".copy-prompt").disabled'), false);
+ assert.equal(await page.evaluate('document.querySelector(".run-action-status").dataset.state'), "error");
+ await capture("copy-prompt-clipboard-unavailable-390");
+
+ await page.evaluate('setRunInput({ prompt: basePrompt }); setClipboard("reject")');
+ await page.click(".copy-prompt");
+ await page.waitForText("Could not copy prompt to clipboard.");
+ assert.equal(await page.evaluate('document.querySelector(".copy-prompt").disabled'), false);
+ assert.equal(await page.evaluate('document.querySelector(".run-action-status").dataset.state'), "error");
+ assert.deepEqual(await page.evaluate("clipboardWrites"), [prompt]);
+ await capture("copy-prompt-write-rejected-390");
+
+ await page.resize(420, 844);
+ await page.evaluate('setRunInput({ prompt: basePrompt }); setClipboard("pending")');
+ await page.click(".copy-prompt");
+ await page.waitForText("Copying prompt…");
+ assert.equal(await page.evaluate('document.querySelector(".copy-prompt").disabled'), true, "button disables during clipboard write");
+ await capture("copy-prompt-writing-420");
+ await page.evaluate("finishClipboardWrite()");
+ await page.waitForText("Prompt copied to clipboard.");
+ assert.equal(await page.evaluate('document.querySelector(".copy-prompt").disabled'), false, "button re-enables after clipboard write");
+
+ await page.resize(1100, 844);
+ await page.evaluate('setRunInput({ prompt: "" }); setClipboard("success")');
+ assert.equal(await page.evaluate('!!document.querySelector(".copy-prompt")'), true, "empty prompt is present");
+ await page.click(".copy-prompt");
+ await page.waitForText("Prompt copied to clipboard.");
+ assert.deepEqual(await page.evaluate("clipboardWrites"), [""], "empty prompt is copied unchanged");
+ await capture("copy-prompt-empty-1100");
+
+ await page.evaluate('setRunInput({}); setClipboard("success")');
+ assert.equal(await page.evaluate('!!document.querySelector(".copy-prompt")'), false, "absent prompt has no copy control");
+ await capture("copy-prompt-absent-1100");
+ assert.deepEqual(await page.evaluate("calls.repo"), [], "copy path made no repository calls");
+ assert.deepEqual(await page.evaluate("calls.fetch"), [], "copy path made no network requests");
+
+ // The pre-existing Schedule this run action still opens its editor through the
+ // same pinned definition read; this mock never sends a schedule/run request.
+ await page.evaluate('setRunInput({ prompt: basePrompt })');
+ await page.click(".schedule-run");
+ await page.waitForSelector(".copy-prompt");
+ assert.deepEqual(await page.evaluate("calls.repo"), [{ method: "getPipeline", id: 8, version: 2 }]);
+ assert.equal(await page.evaluate("calls.scheduleEditor.length"), 1);
+ assert.deepEqual(await page.evaluate("fixtureErrors"), []);
+ await writeFile(resolve(out, "geometry.json"), `${JSON.stringify(measurements, null, 2)}\n`);
+ console.log(`PASS: exact original/empty prompt copies, missing and rejected clipboard feedback, absent prompt, keyboard use, preserved schedule editor and 390/420/1100px geometry. Captures: ${out}`);
+} catch (error) {
+ if (page) {
+ await page.screenshot(resolve(out, "failure.png"));
+ console.error(await page.evaluate('JSON.stringify({ errors: fixtureErrors, text: document.body.innerText, writes: clipboardWrites, calls })'));
+ }
+ throw error;
+} finally {
+ await browser?.close();
+ await new Promise((resolveClose) => server.close(resolveClose));
+}
diff --git a/web/test/runDetail.test.mjs b/web/test/runDetail.test.mjs
index b5b72aa3..c46eaefd 100644
--- a/web/test/runDetail.test.mjs
+++ b/web/test/runDetail.test.mjs
@@ -14,6 +14,7 @@ import {
EMPTY_OUTPUT_MESSAGE,
EMPTY_TIMELINE_MESSAGE,
NO_STAGE_DETAILS_MESSAGE,
+ originalRunPrompt,
STAGE_SESSION_TITLE,
STAGE_EVIDENCE_TITLE,
STAGE_DEFINITION_TITLE,
@@ -99,6 +100,19 @@ test("the empty-state strings are exactly the app's wording", () => {
assert.equal(STAGE_DEFINITION_TITLE, "Stage definition");
});
+test("originalRunPrompt returns only the recorded string, including an empty prompt", () => {
+ const prompt = "\n original prompt\nwith lines \n";
+ assert.equal(originalRunPrompt({
+ input: { prompt },
+ title: "different title",
+ output: { markdown: "different output" },
+ }), prompt);
+ assert.equal(originalRunPrompt({ input: { prompt: "" }, title: "not a prompt" }), "");
+ assert.equal(originalRunPrompt({ input: {}, title: "not a prompt", output: { prompt: "also not" } }), undefined);
+ assert.equal(originalRunPrompt({ title: "not a prompt" }), undefined);
+ assert.equal(originalRunPrompt({ input: { prompt: null } }), undefined);
+});
+
// ---------------------------------------------------------------------------
// Field display text
// ---------------------------------------------------------------------------