Files
pipelines/web/PARITY.md
T
alan 9456f8a319 web: workflow graph rendering in the pipeline detail (P6)
Close P6 of web/PARITY.md: the pipeline detail's Graph tab now renders the
pipeline's workflow graph — stage nodes in declaration order, labelled outcome
edges, and the #failure/#success terminals on a shared lower row — plus a
definition pane opened from a node.

- src/graph.js (new): reusable `mount(container, graph, options) -> { unmount }`
  plus the pure helpers it is built from (layout, edges, `error*`, lanes,
  fit/clamp/zoom, hit-test, stage-definition fields). Definition view only, so
  the run-detail Graph tab (R5) can reuse it. Mirrors WorkflowGraph.kt,
  GraphPalette.kt, GraphSemantics.kt, StageDetailPane.kt and RunGraphTab.kt.
- src/app.js: wiring only — mount the graph in the Graph tab, drop the previous
  mount on every re-render.
- styles.css: the .graph-* styles in the app's dark palette.
- test/graph.test.mjs (new): focused unit tests for the pure helpers, no DOM.
- test/ui-smoke.mjs: open "Plan and land", switch to Graph, capture the graph,
  a stage pane and the expanded view, and assert the zoom/pan clamps and the
  empty-pane wording against the live server.
- PARITY.md: P6 done with the 2026-10-19 captures; P3 notes the Graph tab now
  renders the graph; R5 stays todo.

Checks: node --check on all five touched JS/MJS files; `node --test test/`
137 pass / 0 fail; `node test/ui-smoke.mjs --out ../captures` UI SMOKE PASS
against ws://127.0.0.1:8080/connect.
2026-10-19 03:26:50 +01:00

91 lines
7.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Web client — parity checklist
The browser client's acceptance gate. **The target is the Android app's feature
set** (`android/`), rendered for the web. A row is only `done` when the feature
works in the browser against a live server **and** a review stage captured the
rendered result through `test/ui-smoke.mjs` (or an extension of it). A green unit
test, or a code change without a capture, is `partial` at best.
Status legend: `todo` · `partial` (some of it works) · `done` (working + captured).
## Transport and connection
| # | Feature (Android counterpart) | Protocol | Status |
| --- | --- | --- | --- |
| T1 | Server-URL entry + validation rules (`data/transport/ServerUrl.kt`) | — | done |
| T2 | One reused socket, id matching, request timeout, not-connected guard (`PipelinesClient.kt`) | — | done |
| T3 | Connect / disconnect / manual reconnect | `ping` | partial (connect works; no reconnect UI) |
| T4 | Backoff recovery + foreground reconnect after sleep/blur (`ConnectionRecovery.kt`, `ForegroundReconnector.kt`) | — | todo |
| T5 | Connection banner + live badge; build/protocol mismatch warning | `pong` build/protocol | todo |
| T6 | Artifact URL resolution against the configured server (`resolveArtifactUrl`) | `GET /artifacts/…` | done (URL only) |
## Pipelines
| # | Feature | Protocol | Status |
| --- | --- | --- | --- |
| P1 | Pipeline list | `list_pipelines` | done — row: name; `id {id} · v{version} · {N stages}`; `updated d MMM HH:mm`; last-run line joined from `list_runs` (status chip + `{ago} · {duration} · run {id}`, or `no runs recorded`) |
| P2 | Filter + sort (status/name/updated) | client-side | done — Filter menu (name contains, Runs Any/Has runs/No runs, Last run status over the 7 server states, Clear filters) + Sort menu (Server order default, Name A–Z/Z–A, Most recent run, Fewest/Most stages, Reset); server order preserved |
| P3 | Pipeline detail: stages, graph, versions, last run, content hash | `get_pipeline` | done — Summary/Graph/Source tabs; Summary shows content hash (monospace), latest version (`v{n}` or blank), created/updated, and a collapsed-by-default Versions section. Graph tab shows the browser guidance note plus the rendered workflow graph (P6) |
| P4 | Templates gallery + template detail | `list_templates`, `validate` | done |
| P5 | Create pipeline from a template (validate then submit) | `validate`, `submit` | todo |
| P6 | Workflow graph rendering (nodes, edges, stage panes) | `get_pipeline` | done (captured 2026-10-19: nodes + labelled outcome edges + success/failure terminals, an opened stage definition pane and the expanded view — `captures/08-pipeline-graph.png`, `captures/08a-pipeline-graph-stage-pane.png`, `captures/08b-pipeline-graph-expanded.png`). Reusable `src/graph.js` (`mount` + pure helpers: layout, edges, `error*`, lanes, fit/clamp/zoom, hit-test, stage-definition fields); definition view only, so R5's run-detail Graph tab stays todo. Pane labels match the app's own vocabulary (`Outcomes`, `Tools`) rather than the checklist's category words |
## Runs
| # | Feature | Protocol | Status |
| --- | --- | --- | --- |
| R1 | Run history list with status roll-up | `list_runs` | done |
| R2 | Filter by status, sort, "needs you" markers | client-side | partial (status/pipeline/time filter + sort implemented and captured; the per-row "needs you" mark has no Android counterpart and its wording is deferred to R15, still todo) |
| R3 | Run detail: run fields, steps/visits, targets, sessions | `get_run` | partial (fields + steps) |
| R4 | Summary tab incl. collapsible **Changes** viewer (raw + rendered diff) | `get_run` file changes | todo |
| R5 | Graph tab (per-stage panes, verdicts) | `get_run` | todo |
| R6 | Input / Output field sections per stage | `get_run` | todo |
| R7 | Timeline | `get_run` | todo |
| R8 | Artifacts gallery + full-screen viewer (images inline, others download/open) | `GET /artifacts/…` | done (captured 2026-10-19: `captures/04-run-430-artifacts.png`, `captures/05-artifact-viewer.png`) |
| R9 | Session export link (read-only `session.html`) | `GET /artifacts/…` | done (captured 2026-10-19: `captures/06-session-export-link.png`) |
| R10 | Live run updates: subscribe/unsubscribe + event fold | `subscribe`, `unsubscribe`, `run_event` | todo |
| R11 | Human decision sheet: prompt, options, feedback | `decide_run` | todo |
| R12 | Cancel run | `cancel_run` | todo |
| R13 | Retry failed stage (resume) / restart from start | `retry_run` | todo |
| R14 | Rename a run | `set_run_title` | todo |
| R15 | Attention / "Needs you" surface: counts, open, individual dismiss, clear all | derived from `list_runs` + run events | todo |
## Search
| # | Feature | Protocol | Status |
| --- | --- | --- | --- |
| S1 | Omni-search across pipelines, versions, runs, steps, fields, artifacts | `search` | todo |
| S2 | Result routing (open the pipeline, run, stage, artifact) | — | todo |
## Chat
| # | Feature | Protocol | Status |
| --- | --- | --- | --- |
| C1 | Session list (operator sessions, closed grouped as history) | `chat_sessions` | todo |
| C2 | Create a chat (directory picker) | `chat_directories`, `chat_create` | todo |
| C3 | Open / close / reopen a session | `chat_close`, `chat_reopen` | todo |
| C4 | History with paging / "load older" | `chat_messages` | todo |
| C5 | Live transcript: user/assistant text, one reply = one turn | `chat_subscribe`, `chat_event` | todo |
| C6 | Reasoning block + tool calls with name/input for the whole lifecycle | `chat_event` | todo |
| C7 | Markdown rendering + code blocks | — | todo |
| C8 | Composer: send, stop, attachments, draft | `chat_prompt`, `chat_interrupt` | todo |
| C9 | Slash commands | client-side | todo |
| C10 | Permission/approval cards (allow once/always/reject) | `chat_permission`, `chat_reply` | todo |
| C11 | Background tasks bar: running shells only, capped + scrollable, bounded output page | `chat_shells`, `chat_shell_output` | todo |
| C12 | Human-decision notices inside chat + dismiss | `chat_event` | todo |
| C13 | Local rename/hide, seen state, persistence to `localStorage` | client-side | todo |
| C14 | Scroll behaviour: follow newest, "jump to newest", restored position | client-side | todo |
## Settings, layout, platform
| # | Feature | Protocol | Status |
| --- | --- | --- | --- |
| L1 | Settings: server URL, workspace | — | todo |
| L2 | Wide layout: left rail + two panes | client-side | todo |
| L3 | Narrow layout: bottom section strip + bottom navigation | client-side | todo |
| L4 | Responsive switch by viewport width (no hardcoded device) | `WindowSize.kt` analogue | todo |
| L5 | Notifications for failed/waiting runs (browser Notification API; HTTPS/localhost only) | derived | todo |
| L6 | Deep links to a run (`pipelines://run/…` analogue → URL route) | — | todo |
| L7 | Accessibility: focus order, labels, keyboard operation | — | todo |
## Deliberately out of scope
- **Operator-only transport** — `inspect_resource`, `reconcile_resource`,
`inspect_resource_pool`, `configure_resource_pool` are loopback-only and must
not be exposed by a browser client.
- **Device/ADB features** — the Android app's device work is the UI reviewer's
lease-based work, not a client feature.