From b88904c360f46f18964911911293cd718bf46db6 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Mon, 19 Oct 2026 13:32:54 +0100 Subject: [PATCH 1/2] web: let concurrent ui-smoke runs pick their own port Every run defaulted to 8091, so two parallel pipeline items running the UI check collided with EADDRINUSE. An explicit --port/WEB_UI_PORT still wins; otherwise the OS assigns a free port. Verified with two simultaneous --scratch runs (60540/60541), both PASS. --- web/test/ui-smoke.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web/test/ui-smoke.mjs b/web/test/ui-smoke.mjs index 474e4f06..8d2b49e1 100644 --- a/web/test/ui-smoke.mjs +++ b/web/test/ui-smoke.mjs @@ -2,7 +2,9 @@ // Chrome, connect to a running Pipelines server through the page's own proxy, // and capture what actually rendered. // -// node test/ui-smoke.mjs [--port 8091] [--pipelines 127.0.0.1:8080] [--out DIR] [--scratch] +// node test/ui-smoke.mjs [--port PORT] [--pipelines 127.0.0.1:8080] [--out DIR] [--scratch] +// +// Without --port the OS picks a free port, so concurrent checks do not collide. // // This is the UI evidence a review stage produces: real screenshots of the // rendered client, not a claim. It needs a running Pipelines server (the live one @@ -51,7 +53,12 @@ function flag(argv, name, fallback) { return i !== -1 && argv[i + 1] ? argv[i + 1] : fallback; } -const port = Number(flag(process.argv, "--port", process.env.WEB_UI_PORT ?? 8091)); +// No fixed default port: an explicit --port/WEB_UI_PORT still wins, but otherwise +// each run asks the OS for a free one. Concurrent checks (parallel pipeline items) +// therefore never collide on 8091 — the earlier fixed default made a second +// simultaneous UI stage fail with EADDRINUSE. +const explicitPort = flag(process.argv, "--port", process.env.WEB_UI_PORT); +const port = explicitPort ? Number(explicitPort) : await freePort(); const pipelines = flag(process.argv, "--pipelines", process.env.PIPELINES_TARGET ?? "127.0.0.1:8080"); const out = resolve( flag(process.argv, "--out", process.env.WEB_UI_OUT ?? join(tmpdir(), "pipelines-web-ui")), From 3d7ad54e689eb764232f7a13a54c390a5522c411 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Mon, 19 Oct 2026 13:50:13 +0100 Subject: [PATCH 2/2] web: local rename/hide, seen markers and per-device persistence (C13) --- web/PARITY.md | 13 +- web/src/app.js | 493 +++++++++++++++++++++++++++++++++++++---- web/src/chat.js | 262 ++++++++++++++++++++++ web/styles.css | 66 +++++- web/test/chat.test.mjs | 191 ++++++++++++++++ web/test/ui-smoke.mjs | 403 +++++++++++++++++++++++++++++---- 6 files changed, 1336 insertions(+), 92 deletions(-) diff --git a/web/PARITY.md b/web/PARITY.md index 67d64de9..cb4ead14 100644 --- a/web/PARITY.md +++ b/web/PARITY.md @@ -96,11 +96,11 @@ the pipeline list already carries — rather than a pluralised verb. | C6 | Reasoning block + tool calls with name/input for the whole lifecycle | `chat_event` | done — the assistant turn draws, in order, its one collapsible reasoning block and its one tool-call chip (then the answer). Reasoning labels match the app: `Thinking…` / `Reasoning` for a single step and `Thinking · {N} steps` / `Reasoning · {N} steps` for several, with ` · {duration}` appended when the parts' timing gives a settled span (earliest start → latest completed), through chevrons named `Show reasoning` / `Hide reasoning`. The chip reads `1 tool called` / `{N} tools called`, announces `… expand for details`, wears the shared spinner while a call is in flight and an error tint once one failed, and opens a fixed overlay panel under the chip (flipped above / clamped into the viewport when there is no room) with the same count, a `Close tool calls` control and an internally scrolling, independently-expandable row per call: the name (else `tool`), the first of `description`/`command`/`filePath`/`file_path`/`path`/`pattern`/`query`/`url` collapsed and elided to 72 characters, the `+N -M` edit stat when present, the `formatToolDuration` value (`340ms`/`1.2s`/`2m 3s`), and `Expand {name}`/`Collapse {name}`; a failed row is marked `Failed tool call`. An expanded row shows INPUT (pretty-printed JSON, or the raw partial string), the LCS edit diff (at most 200 rendered lines with the remaining `… {N} more changed line(s) not shown`), then ERROR (the server's `error.message`, else the output) or OUTPUT (`(no output)` when settled and empty, nothing while in flight). Lifecycle words `streaming`/`running` are in flight and `completed`/`error` settled; a settled call never spins or wears the ` · long` mark. Because the panel is a fixed overlay, opening or closing it never re-flows the transcript nor moves its scroll (C14). Captured 2026-10-19 against `ses_eae413f50ffeLQDExlg8cYnscN` (one folded turn, 80 reasoning steps, 122 tool calls): `captures/51-chat-reasoning-collapsed.png`, `captures/52-chat-reasoning-expanded.png`, `captures/53-chat-tool-chip.png`, `captures/54-chat-tool-panel.png` (an opened `read` row showing INPUT + OUTPUT) and `captures/55-chat-edit-diff-sample.png`. The live history carries no failed or edit-family call, so that capture renders a labelled page-rendered sample — a `shell` row marked `Failed tool call` with INPUT + ERROR and an `edit` row with a `+2 -1` diff — through the page's own row builder; the transcript stayed put across open/close (top 43065 → 43065). **Live arrival over `chat_event` is C5**: the renderer is built from the same part shapes (`ChatPart{type,name,state{status,input,content,error},time}`) and takes a `streaming` flag plus a live elapsed source so C5 can drive in-flight calls; the chip's in-flight spinner, the ` · long` 60s mark, the panel flip-above and an edit-family call are not reachable against the live server, so they are unit-tested (`test/chat.test.mjs`) rather than claimed as captured | | C7 | Markdown rendering + code blocks | — | done — captured 2026-10-19: `captures/45-chat-transcript-newest.png` (opened at the newest content: bold, bullet lists, a `|` table with its `---` delimiter row and inline code spans from the live assistant answer), `captures/47b-chat-markdown-code.png` (a rendered fenced code block — label `js`, the pre body `const answer = 42;` — drawn in the live browser by the page's own `renderMarkdown`, the same function that renders the answer) and `captures/47-chat-reasoning-code.png`. The subset is exactly `Markdown.kt`: paragraphs, `#`–`######` headings, fenced code (```/~~~, the language label else `code`), block quotes, bullet/ordered lists, `|` tables with a `---` delimiter row, thematic rules, inline code, bold, italic (underscore only at word boundaries, so `snake_case` stays plain), `[label](url)` links and bare http(s) autolinks; HTML entities are decoded first in one pass, and HTML, reference links, strikethrough and nested lists render as plain text and are never dropped. **Code-block caveat, stated plainly**: the live assistant answer carries **no** fenced block — its four fences live in the reasoning transcript, which the app draws as plain text, not as markdown (`captures/47-chat-reasoning-code.png` shows one such fence as muted plain text; that is C6 material, not the markdown path). So the rendered `
` code block is captured from a labelled sample through the page's real renderer (`47b`), and the same path plus its `code`-else-language label is unit-tested in `test/markdown.test.mjs`. Only `http(s)` link targets become clickable — the transcript is untrusted model output, so a `javascript:`/`data:` target renders as its label, never as a live link |
 | C8 | Composer: send, stop, attachments, draft | `chat_prompt`, `chat_interrupt` | done — the composer at the foot of an open conversation: a growing 1–6-row `