Commit Graph

82 Commits

Author SHA1 Message Date
alan 1e4654381e feat(web): manage independent schedules and restore recorded stage navigation 2026-10-21 02:06:15 +01:00
alan ca78b24f47 fix(audit): expose verified visit exports and export-only recovery 2026-10-20 21:20:06 +01:00
alan 6841cdd2a4 web: unify mobile back and audit controls and link pipeline run history 2026-10-20 16:25:07 +01:00
alan 1d9cb80cdb web: keep mobile composition stable across keyboard and Back navigation 2026-10-20 16:04:09 +01:00
alan 422db96c95 web: open reasoning in the tool-style popup 2026-10-20 15:14:39 +01:00
alan 9f29f387ba web: filter the chat model picker
Add a search field that narrows models by name, id or provider in place, keeps
focus while typing, and reports when nothing matches.
2026-10-20 15:04:10 +01:00
alan 75150c4253 web: attach the attention bell to the Runs runtime
The Runs view is created before the attention view is destructured, so its
toolbar callback was undefined and selecting Runs threw before rendering. Attach
the function after destructuring.
2026-10-20 15:01:25 +01:00
alan 4b20be6ea3 web: add chat model picker, agent badges and a preloaded brief
Show the current model under the chat title with an OpenCode-backed picker,
put an agent mark on the right of every chat row, simplify the tool summary to
'N tools', and give the reasoning and tool controls one symmetric hover box.
New chats preload an editable behavior brief, and the activity spinner remains
the turn's single live progress indicator.
2026-10-20 14:58:26 +01:00
alan 3799d37d7c web: one chat activity line, clearer groups and paste attachments
Replace the reasoning, tool and bottom thinking rows with one stable activity
line and refresh Stop on the step frame. Make directory and Closed bands share
an elevated square surface, centred text and a collapse toggle. Read pasted
files into the composer attachment path and show sent files in user bubbles.
2026-10-20 14:30:57 +01:00
alan 0d7e81362f web: run pipelines from the browser and quiet background chat
Add the Run pipeline dialog with prompt, server directory and a per-run
notification choice; add --notify auto/on/off to run and retry; move the live
tool call onto the tool-count line and tick the reasoning duration; stop chat
frames from repainting a different screen.
2026-10-20 12:56:47 +01:00
alan f7a3a49f94 chat: add the Codex backend
Store a chat's harness with its operator session, expose chat_backends and a
backend choice in New chat, and route each session through a manager. The Codex
adapter uses the App Server's Unix WebSocket for threads, turns, history,
questions and interrupt; OpenCode remains the default and Claude is not
advertised until its sidecar and login are wired.
2026-10-20 12:10:39 +01:00
alan 3f8eefe06e web: unify detail headers, queue follow-ups, move thinking outside bubbles
Every detail screen now owns one 44px chevron Back control beside its title.
Sending appends the user's message immediately and keeps Send available beside
Stop so a follow-up can be queued. Reasoning renders above the answer bubble
rather than inside it.
2026-10-20 10:37:57 +01:00
alan c291327610 web: give chat details a real back route
Opening a chat now pushes /chat/:id, so Android/browser Back returns to the
chat list rather than the previous destination. The conversation header owns a
compact Back to chats control matching the create pane, replacing the
full-width Back to list row on phones.
2026-10-20 03:25:31 +01:00
alan 526c19fc21 web: shared chat stars, pipeline mini graphs and agent questions
- Persist chat stars in the operator-session registry (chat_star) so every
  browser/device shows the same Starred group; migrate old local stars once.
- Add a compact pipeline graph shape to list responses and draw a lightweight
  list miniature; replace the cryptic id/version line with the stage count.
- Surface OpenCode form questions as a chat card (chat_answer), replay a
  pending form to late subscribers, and notify for background questions.
- Make the mobile dock's Search cell equal to every destination, keep the
  tab row visible with 100svh, and let Source use the full pane height.
- Let a fresh sign-in auto-connect to its own origin; use a Lax session cookie
  with Expires so Remember me survives app/link launches.
- Keep shipped starters and the skill agnostic: no repository paths, project
  areas or personal device commands; add Diagnose/Fix and Research starters.
- Refresh the installed skill and document the new browser conventions.
2026-10-20 03:11:37 +01:00
alan ebf02c3bed web: gated access, anchored viewers, mobile tabs and chat colour
- serve.mjs requires a signed session cookie for every page, artifact and the
  WebSocket, with a password file, 30-day sessions, login throttling and public
  brand assets for the sign-in page.
- The diff viewer is a fixed-height top-anchored panel whose toolbar (modes,
  copy, previous, next, close as icons) is its first row; the artifact viewer is
  likewise a fixed frame so its navigation never moves.
- The audit's selected tab uses the app's normal selected surface and bottom
  accent. Sessions that were not recorded say so plainly.
- Chat code blocks are syntax-coloured; graph pinch-zoom works with two fingers
  while a single pointer still pans and clicks nodes.
- Phones always keep the destination bar (pane collapse is wide-only), with the
  destinations spread evenly and Search on the right; the list default width is
  narrower; the theme colour matches the app.
- Code-format and layout tests, plus the full browser suite, pass.
2026-10-20 02:21:51 +01:00
alan d7763ec466 web: motion across panes and rows, and the last polish
- Panes fade in on a destination/tab/selection change only; list rows FLIP when
  they move (sort, star, filter) and fade in when they appear; removals close the
  gap through the same move. Reduced-motion users get none of it.
- Modal panels (audit, viewers, diff, tool calls, confirmations) arrive with a
  short scale/fade.
- A collapsed list hides its filter/sort toolbars; the Refresh tooltip is stamped
  as soon as a populated list first paints.
- The smoke settles after a sort before measuring a row for a click.
2026-10-20 01:41:51 +01:00
alan 3314f8405b web: one status glyph, a compact settings button and collapsible panes
- Run and pipeline rows use one coloured status glyph with the word in its
  tooltip; the run version sits at the right of the title line; the usage
  metrics row is gone.
- Settings is an icon beside the connection status (rail and dock), not a
  destination tab; the destinations keep a roving tab even while Settings is
  open.
- The rail and every list pane collapse to a narrow strip from an icon at their
  top-right (remembered per device). A collapsed runs list shows the status
  glyph, pipelines their flow glyph, chats their status word.
- Tool calls open in a modal (rendered/expanded rows in place) instead of an
  inline popover; the chip stays a quiet line beside the message.
- Refresh tooltips show the last data arrival (manual or socket) per
  destination.
2026-10-20 01:36:38 +01:00
alan 9a450e0ebb web: installable app, diff viewer history, calmer chat
- The diff viewer is a centered panel over a dim scrim (clicking outside closes),
  and the browser Back button closes the open viewer/audit/artifact viewer via a
  modal history entry. Transient sheets opt out (they must never undo an
  in-app navigation on close).
- The page is installable: web app manifest, 192/512/maskable icons, apple
  meta, and a shell service worker that never caches the socket or artifacts.
- Chat: operator bubbles are accent-tinted, agent bubbles neutral with an accent
  edge; the tool summary is a quiet line outside the message; the star and more
  controls are compact 20px corner icons inside the row.
- The Refresh button's tooltip shows the last data arrival (manual or socket),
  per destination.
2026-10-20 01:26:20 +01:00
alan d130615fae web: put the work first and the audit evidence behind a door
- Turn files (input/memory/output/session) are system artifacts now: they are
  never tiles in the run or stage galleries. Shared public files are attributed
  to the visit that first recorded them, so a run counts 3 stage artifacts, not
  one copy of each per later stage.
- Audit & debug opens a dialog with vertical Input / Output / Memory / Session /
  Definition tabs, for a visit from the stage pane or the run Summary.
- Run tabs are Summary / Graph / Timeline; Input and Output are Summary sections
  with Artifacts, Files changed and Audit. Each stage pane gains Files changed.
- Artifacts gain a gallery/list switch (remembered) and full-name wrapping; the
  copy/share actions are hover-or-focus icon buttons.
- Status badge above the run title; no live badges on the run surfaces. The runs
  list leads with the pipeline name and the stored task title beneath it.
- Chat rows: title + coloured status word only, then directory, then model; no
  operator or closed chips, no dot. The more/star cluster is a hover/focus
  overlay so the title uses the row's width, and an open menu stacks above rows.
  Closed chats collapse behind a chevron. Sessions can be starred locally and
  sort in a Starred group. The chat header no longer repeats status/dir/model.
- A visible rail divider separates Search from the destinations; the page has a
  real favicon/apple-touch icon and the rail brand wears it.
- Smoke updated: no live badges, 3 detail tabs, field hits open Summary sections,
  closed chats expand for checks, the fixture viewer uses shot.png/missing.txt
  and the audit for markdown.
2026-10-20 01:00:01 +01:00
alan 053bbe68a1 web: keep section focus on the visible tab; make the smoke honest on a fresh history
The section strip moved to the detail's top on wide screens, but arrow-key
selection still focused the hidden rail copy, dropping focus to the body; it now
focuses whichever mount is visible. The browser suite no longer assumes the old
curated run fixtures (runs 428/430/438/440/442/449/450), discovers a failed run
and the pipeline's own stage key, and skips the removed fixture groups with a
clear note instead of timing out. The live chat transcript's inline-code check is
advisory, like its table check.
2026-10-19 23:20:50 +01:00
alan 3335c4596f web: a gear for Settings, Search leading the rail, real tabs
Settings drew a sun because the sprite was a circle with rays; it is a cog now.
Search is a modal, so it leads the rail (and the narrow dock) instead of sitting
under the destinations, which leaves Settings last. The section strip reads as a
tab bar: flush cells on a bar, the selected tab filled with the panel surface and
underlined, no chip borders.
2026-10-19 22:31:05 +01:00
alan b00b434c5d web: clearer workflow graph labels, routes and kinds
- Gaps between stages are sized from the widest straight-route label, so a chip
  never reaches into either box; a source's forward routes fan across its side
  instead of sharing a 20px band.
- A label prefers the widest horizontal run that can hold it; when only a stub
  exists the chip moves onto the edge's longest run and sits beside a vertical
  one, keeping clear of both the box and the neighbouring label.
- Hovering a wire or its chip highlights the route and dims the rest.
- System-added routes (the parser's implicit error fallback) draw dotted with a
  legend entry, distinct from declared routes and executed state.
- Lanes are 34px apart, so a dense definition no longer doubles the canvas height.
- The graph opens expanded by default and remembers a collapse (graphPrefs.js).
2026-10-19 22:23:58 +01:00
alan bc80c27511 Merge branch 'main' into web-modal-focus 2026-10-19 20:46:15 +01:00
alan b1e9400d6e web: shared modal focus controller (M1/M2) — work in progress 2026-10-19 20:46:15 +01:00
alan ff45c0ec86 web: sticky sections, spotlight search, and live sync for other clients' prompts
- Sticky sections: a run/pipeline/template keeps the section you chose when you
  open another one, and the choice persists across reloads (localStorage per
  destination). A stage deep link still opens the Graph.
- Search is a Spotlight: a modal overlay opened with Ctrl+/ (Cmd+/ too), arrow keys
  move the selected result, Enter opens it, the query/kind/sort/selection resume on
  the next open, and an artifact result opens the artifact itself (media in the
  viewer, anything else in a tab) instead of the run's visit pane.
- Live sync: the server only emits a user frame for prompts sent through it, so a
  message typed in the OpenCode UI appeared only after a refresh. When a frame for
  an unknown turn arrives, the open conversation now reads the newest history once,
  which brings the user message in live.
2026-10-19 20:45:39 +01:00
alan 72f00cd871 web: restore focus to a row's real control
The a11y work made the chat row a container with its control inside, so Back
focused a non-focusable div and keyboard focus fell to the body. Focus the first
focusable descendant instead (generic for chat, runs, pipelines and templates).
2026-10-19 20:10:28 +01:00
alan 84e136436c web: app shell — left destination rail, settings-hosted connection, viewport panes
The layout item's work plus the two defects its review found:
- the wide grid sized the list track from its MAX, so at 600-759px the detail pane
  was clipped to 40-199px; cap the list below 900px and narrow the rail there
  (measured now: detail 232px at 600, 332 at 700, 340 at 900, 880 at 1440);
- the shell said 'Not connected' on a fresh page because the prefilled proxy URL
  validated; the status now reflects a SAVED endpoint ('Not configured' until then)
  and refreshes as the draft changes.

Includes the rail + bottom dock, connection moved into Settings, viewport-only
scrolling with panes that scroll themselves, tab semantics, skip link, h1 per
route, and the design tokens.
2026-10-19 20:03:56 +01:00
alan 007d22eb83 web: split app.js into view modules
Pure move, behaviour unchanged: app.js is now the shell (boot, state, client wiring, connection/banner, navigation and routes, render dispatch, header). Views live under src/views with shared DOM and format helpers. client.js stays DOM-free; no circular imports; every server-derived string still uses textContent.
2026-10-19 16:37:31 +01:00
alan fe9dadd2c7 web: finish L6 after merging R10's live-run work
Integration fixes found by the full suite:
- drop the dead 1 Hz run poll helpers still referencing R10-removed state (they
  threw on every route apply, so the first connection never rendered a list);
- keep this tab's ephemeral verification chats across a reload (sessionStorage),
  so a chat the server intentionally hides stays usable in the tab that made it;
- the smoke marks only the throwaway ephemeral, clears the marker after /new, and
  tolerates a stale page banner plus a re-rendered row menu;
- the nav no longer claims a false Pipelines (0) before that list has loaded, and
  the Runs destination preloads it once per connection.
Full suite: 580 unit tests green, UI SMOKE PASS.
2026-10-19 15:58:40 +01:00
alan 046f20db0b Merge branch 'main' into web-routes
Reconcile L6 with R10's live-run watch: onConnected waits for the connection's
watch on the first connect too, and the reconnect path uses R10's
loadCurrentView(runsFresh) call while keeping L6's detail re-hydration. The
selectRun catch keeps L6's stale-selection and server-refusal guards.
2026-10-19 15:00:10 +01:00
alan c0dc525135 web: finish L6 routes against the integrated shell
Fixes found by running the full suite after merging main, not by the route
model itself:
- start the run-alert watch on the FIRST connection too: L6's early return for a
  pending deep link skipped it, so no subscribe was sent (R10 broke silently);
- an ephemeral /new chat no longer refreshes the session list (the server
  intentionally omits it), which had replaced the open conversation and dropped
  its local notice;
- the chat row menu flips above the row when it would fall off the window, so the
  last rows' items are hit-testable (a real defect, not clipping);
- smoke robustness for drifted live data: the C2 closed-row assertion opens C13's
  menu, the C13 hide step opens a conversation when none is left open, the
  timeline empty-state capture is skipped when no empty run exists, and the last
  row is scrolled into view.
Full suite: 551 unit tests green, UI SMOKE PASS.
2026-10-19 14:59:06 +01:00
alan 9c2b50df44 Merge branch 'main' into web-routes
Resolve the L6 routes against the newer C2/C13/L5/R10 shell: keep both sides
(single client imports, the run-alert watch inside the reconnect path, the boot
route + popstate wiring alongside loadNotifyAsked, main's L5 row and L6 done).
2026-10-19 14:47:49 +01:00
alan 0d3093ac27 Merge branch 'main' into web-run-live
# Conflicts:
#	web/test/ui-smoke.mjs
2026-10-19 14:47:34 +01:00
alan 895ed9d8b7 web: URL routes, deep links and history navigation (L6) 2026-10-19 14:45:57 +01:00
alan d3e354383b Merge branch 'main' into web-run-live
# Conflicts:
#	web/src/app.js
#	web/src/protocol.js
#	web/src/repository.js
#	web/test/ui-smoke.mjs
2026-10-19 14:33:51 +01:00
alan f3f800c02c Merge branch 'main' into web-chat-create
# Conflicts:
#	web/PARITY.md
#	web/src/app.js
#	web/test/chat.test.mjs
#	web/test/ui-smoke.mjs
2026-10-19 14:31:08 +01:00
alan a7872c3f31 web: create a chat through the directory picker (C2) 2026-10-19 14:25:42 +01:00
alan 21a6ee3c4d web: live run updates over a single app-wide watch (R10) 2026-10-19 14:22:53 +01:00
alan ef5185fd87 Merge branch 'main' into web-notify 2026-10-19 14:11:46 +01:00
alan 878b1e0bf3 web: notify failed and waiting runs from the browser Notification API (L5) 2026-10-19 14:11:31 +01:00
alan e514083cda Merge branch 'main' into web-chat-local
Resolve the C11/C12 vs C13 overlap in the chat work:
- PARITY: keep main's done C11/C12 rows and this branch's done C13 row.
- app.js/chat tests: keep both import/helper sets (notices and overrides/seen).
- ui-smoke: keep main's C11 background-task bar, C12 notice checks and the
  shared composer throwaway, and C13's row-menu rename/hide/seen checks.
  The composer throwaway stays a listed server session: C12 switches away
  and back to it and C13 reads its row, which an ephemeral create (2fe6301)
  deliberately hides from chat_sessions. The live-run graph halo check is
  best effort as its own comment says, so a run with no stage in flight at
  capture time skips instead of failing the whole smoke.
2026-10-19 14:07:28 +01:00
alan 3d7ad54e68 web: local rename/hide, seen markers and per-device persistence (C13) 2026-10-19 13:50:13 +01:00
alan 2fe63012f9 chat: a verification chat can never appear in the operator's list
The operator's chat list showed ~99 stray "New chat" entries. The listing
was already fail-closed (registry-only); the fault was what got recorded: an
automated UI check drives the real page, so its throwaway chat was recorded as
an operator chat exactly like a manually created one and stayed in the list for
ever (each run added one).

Server: chat_create takes an optional ephemeral flag. The session is created,
bootstrapped, usable, closable and reopenable exactly like any other, but its
registry row is hidden, so chat_sessions never lists it. operator_sessions gains
an ephemeral column (idempotent migration, existing rows default to listed) and
the list query filters it; the single-row lookup does not, so close/reopen keep
working. RecordVerificationSession is the hidden recorder.

Web: the page marks a create ephemeral only when automation asks for it
(__pipelinesEphemeralChat, set by the UI smoke for its throwaway chat), so the
smoke's own runs stop polluting while a manual create is unchanged.

Tests: a hidden row is never listed yet is still looked up and closable; a
normal re-record of the same id lists it again; a pre-ephemeral database
migrates with every existing chat still listed. Live data pruned separately
(107 -> 8 registry rows, backed up).
2026-10-19 13:15:08 +01:00
alan 9231236f83 web: local command notices in chat, individually dismissible (C12) 2026-10-19 11:58:55 +01:00
alan 64f90d1c4f Merge branch 'main' into web-settings 2026-10-19 11:31:45 +01:00
alan 597151cdd1 web: settings destination with connection, workspace and templates (L1)
Completes the item: the Settings view, its pure helpers and the client's
socket-replacement path, plus the fix the review required (a header-side URL
correction clears the Settings field's own error) and a smoke check for it.
2026-10-19 11:30:19 +01:00
alan c2db3e4966 Merge branch 'main' into web-chat-approvals
Resolve C10 vs C11 in the shared shell:
- keep both send hooks in the smoke's WebSocket shim (recording +
  scripted replies + synthetic approval acknowledgement) instead of the
  second assignment overwriting the first;
- close the .chat-approval CSS rule so the C11 background-task rules are
  not swallowed by it (the list lost its 3-row cap and scrolling);
- assert the folding invariant directly (no adjacent agent bubbles)
  instead of 'agent bubbles <= user prompts', which the growing operator
  session now legitimately breaks;
- exercise the resource clamp by scroll overflow instead of a clone
  measurement that the clamped frame makes unreliable.
2026-10-19 11:26:26 +01:00
alan 5eb13968e3 web: approval cards for chat permission requests (C10)
Completes the item the pipeline could not land: the C10 diff its own
implementer and probe assertions already verified is committed as-is.
The resource block is a padding-free six-line clamp inside a padded frame
(the app's maxLines = 6 + ellipsis) and the primary control is filled.
2026-10-19 11:08:53 +01:00
alan 8e5ce8494b web: background-tasks bar — running shells, capped list, bounded output (C11)
Add the background-tasks bar to an open conversation: heading
"Background tasks" plus "{n} running", shown only while at least one
shell is running. Rows are capped at 3 (BACKGROUND_TASK_VISIBLE_ROWS)
and the list scrolls beyond; each row is a play glyph, "Running", a
one-line shellCommandSummary and "Details" while selected. Tapping a
row toggles its detail pane ("Command"/"Task identity"/"Status:
running" plus the bounded output: spinner, error + "Retry",
"Output unavailable for this task.", "No output yet.", or the
monospace output and "Output is bounded to 64 KiB." with "Refresh").

Fold shell frames without ever marking the turn running, merge a blank
command from the previous frame, list only running shells (an exited
shell is never a task) and drop/relearn shells on reconnect via
chat_shells. Refresh always rereads the bounded 64 KiB page from cursor
0. Update PARITY.md C11 with its captures and the replayed-vs-real note.

Checks: node --check on every touched file; cd web && node --test test/
(456 pass).
2026-10-19 08:22:16 +01:00
alan 672c988136 Merge branch 'main' into web-chat-composer
# Conflicts:
#	web/src/app.js
#	web/src/client.js
#	web/src/protocol.js
#	web/test/chat.test.mjs
#	web/test/repository.test.mjs
#	web/test/ui-smoke.mjs
2026-10-19 07:33:49 +01:00