Commit Graph

551 Commits

Author SHA1 Message Date
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 caae8a8038 web: remember-me on the sign-in page
Checked (the default) issues a 30-day persistent cookie; unchecked keeps a
browser-session cookie and a 12-hour token. The sign-in card also links the
public favicon/apple icon and uses the app mark.
2026-10-20 02:22:36 +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 5faae8f896 Merge branch 'main' into web-lists-shell 2026-10-20 01:36:45 +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 20c49e2186 Merge branch 'main' into web-bell-icon 2026-10-20 01:28:22 +01:00
alan 4813840c95 web: draw the attention bell as one monochrome svg
Replace the yellow emoji in the Runs heading with a 20px inline-SVG outline
bell that inherits currentColor. The badge, count model, accessible name,
click behaviour, in-place refresh and Escape focus return are unchanged.

Cover the glyph in ui-smoke: tag/viewBox/paths, 20px size, no emoji or glyph
class, badge text/count/label, badge position:absolute with a no-shift rect
measurement at 1440x900 and 420x900, glyph survival across a count change,
and the zero state at both widths. R15 records the new captures.
2026-10-20 01:28:19 +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 2a8a5bf334 web: show the turn files in the audit, with raw and rendered views
- The audit Input/Output/Memory tabs fetch the actual input.md/output.md/
  memory.md, so the outcome section is visible and each document has a
  Rendered/Raw switch plus an Open raw file link. The Session tab renders the
  exported HTML in place with the same link.
- The audit's selected tab uses the normal selected surface, not the accent tint.
- The run Summary no longer carries an Audit & debug section; the stage pane's
  Audit & debug button is the one door.
- Search results all lead with one 56px tile: image thumbnails, artifact type
  tiles, or a kind glyph (pipeline/version/run/step/field); no text kind labels.
- Chat star and more sit on the row's top-right and bottom-right corners, revealed
  on hover/focus, and the row menu opens below them without losing clicks.
- The chat spinner starts at the wall-clock animation phase, so frequent
  streaming re-renders no longer snap it back to the animation start.
2026-10-20 01:15:09 +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 ca28d08269 web: keep one chat clock across streaming re-renders
Every streamed delta re-rendered the conversation and restarted the indicator's
one-second ticker, so a busy turn cleared the timer before it fired and the chat
sat at "Thinking… · 0s" for the whole turn. The ticker is now kept while a turn
is in flight; a simulated silent turn ticks 0s→4s and clears on step end.
2026-10-20 00:24:05 +01:00
alan 5bb96cd4dc server: no invented verdict reason for a turn body
The one-line verdict summariser expects the old field map; given a turn's single
markdown body it treated the result as untrusted reference material and produced
a rationale unrelated to the work ("The text was treated as untrusted..."). Turn
outputs now keep the honest absent-reason state: the card still shows the option,
and no model call is spent inventing a reason.
2026-10-19 23:41:34 +01:00
alan 00252da8f8 turn: keep turn headings structural in memory
Turn bodies were embedded verbatim, so a body's own ## headings looked like
sibling turns and could even duplicate the system's "Files added to public/"
line. Body headings are now demoted two levels (capped at H6) outside fences;
fenced code is untouched.
2026-10-19 23:35:18 +01:00
alan 0219173327 stage: say that the shared public folder is the absolute path
A probe stage read "public/" in its task, created a workspace-relative public/
folder, and also copied to the run's shared path. The prompt now states that the
absolute path is the shared folder and a relative public/ is a different,
unshared directory.
2026-10-19 23:33:29 +01:00
alan 793b62f53e web: render a turn's input and output as their markdown bodies
The stage pane stringified the step's single-key {markdown} map, so a turn's
output appeared under a literal "markdown:" line inside a code card. The pane now
shows that body as the document it is, with "(no output)" for an empty turn; an
ordinary value map still shows its keys.
2026-10-19 23:32:51 +01:00
alan b1482b554b turn: keep the body written before a trailing outcome
ParseOutput returned only the text after the outcome value, so a stage that wrote
its result first and "# outcome" last handed the next stage "(no output)" — the
probe's Compose and Critique turns were both lost this way. The body is now the
whole document with just the outcome heading and value line removed, in order,
byte for byte. Tests cover a trailing and a mid-document outcome.
2026-10-19 23:31:06 +01:00
alan ccb97e424b web: a running chat reads Thinking… until a tool starts
The indicator called a silent turn "Waiting…" after 2.5s without a delta, so a
model reasoning for a minute looked idle. A running turn is now thinking for as
long as it is silent; Waiting… is reserved for a prompt queued behind the turn in
flight.
2026-10-19 23:22:33 +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 5682aadfaa web: open searched documents in the viewer and name the run's pipeline
A markdown/text artifact hit now opens the artifact viewer (with its Open run
action) instead of a raw browser tab, and the run Summary's Pipeline row shows
the pipeline's name beside its id and version, all in the link to the definition.
2026-10-19 23:10:13 +01:00
alan 13af293c53 web: show a turn's markdown output as the result
A turn run carries one markdown body. The Output tab now renders that body
directly instead of hiding it behind a collapsed field named "markdown"; legacy
field maps keep their collapsible sections.
2026-10-19 23:08:47 +01:00
alan cc452e575a web: keep the selected list row's surface on hover
Re-tinting a selected chat (or any list) row under the pointer read as an inner
highlight inside the selected state; the selected surface now wins.
2026-10-19 23:07:47 +01:00
alan 64e40f0b88 web: link artifacts and runs back to their sources
- The run Summary's Pipeline value is a button that opens that pipeline version.
- The artifact viewer carries an Open run button (the search viewer passes the
  artifact's run id), so the evidence always leads back to the run.
- Search artifact rows show the image itself as a thumbnail; other artifacts get
  a type tile (MD/TXT/JSON/CSV/GO/PDF/...), and every artifact row offers an
  Open run action next to its own navigation.
2026-10-19 23:07:04 +01:00
alan af1050b842 Merge branch 'main' into turn-integration 2026-10-19 22:35:42 +01:00
alan 217e11da1d Merge branch 'main' into turn-integration
# Conflicts:
#	internal/server/runner.go
#	internal/stage/model_prompt.go
#	internal/stage/model_run.go
#	internal/stage/model_test.go
2026-10-19 22:32:13 +01:00
alan 0c64feda05 Merge branch 'main' into web-shell-polish 2026-10-19 22:31:40 +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 19d7009510 stage: widen the timeout-reset test deadline
The successful retry in TestDefaultRetriesAndTimeoutResetEachAttempt was
racing its own 20ms deadline when the full suite ran in parallel. Keep the
two-attempt behavior and give the retry realistic headroom.
2026-10-19 22:30:34 +01:00
alan 6782e70105 Merge branch 'main' into turn-integration 2026-10-19 22:27:46 +01:00
alan e37b864c40 stage turns: replace JSON results with file-based markdown turns
Each model visit now gets <run>/stages/<seq>-<stage>/ with input.md,
memory.md, output.md, private/ and a shared run-level public/. The model
reads the two input files, follows the stage's instructions verbatim and
returns complete markdown; only the # outcome section is parsed.

- add internal/turn layout, render and output parsing
- write input.md/memory.md before a visit and output.md from the final
  message; inventory all turn files as stage artifacts
- accumulate completed turns and system-written public file additions in
  memory, including across retries and resume
- remove the JSON envelope, strict field validation, line format and the
  repair ladder for model stages
- republish pipeline authoring prompts and docs in the new style

Checks: go build ./..., go vet ./..., go test -count=1 ./..., gofmt -l .
2026-10-19 22:27:44 +01:00
alan e8f388075a Merge branch 'main' into remove-resources 2026-10-19 22:27:29 +01:00
alan 72aecd8b1f Remove resource pools, leases and wait queues
Drop the resource allocation feature end to end: store tables and migration, runner scheduling and cleanup, protocol types and commands, CLI commands, TUI screens, tests and docs. Existing databases open cleanly and definitions carrying a retired resources block still validate.
2026-10-19 22:27:27 +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 1eaedf5c53 web: move the detail sections into a tab row above the detail
The section list lived in the destination rail, next to Pipelines/Runs/Chat, which
read as navigation rather than as the current detail's view. On a wide screen the
sections are now a tab row at the top of the detail pane and the rail keeps only
destinations; narrow keeps the thumb-zone strip at the bottom.
2026-10-19 22:06:41 +01:00
alan a676b30ff0 web: label only the executed routes in a run graph
Every stage declares error/blocked/retry outcomes, so a run graph labelled all of
them and the chips buried the nodes. In run mode only routes that actually
happened are labelled; a pipeline definition (no run state) still labels every
route.
2026-10-19 21:56:12 +01:00
alan 6c0c813c2c web: render markdown stage bodies as prose
The turn protocol writes a markdown body; the run detail now renders a field as
markdown when it has markdown structure (heading, fence, list, table) and keeps
the honest monospace block for historical plain-text fields. Pure helper with
tests.
2026-10-19 21:41:41 +01:00
alan 94c99f36bb Merge branch 'main' into theme 2026-10-19 21:35:07 +01:00
alan 82d93f71c4 web: neutral charcoal theme and tighter spacing
Palette: bg #0a0a0b, surfaces #121214/#17171a, elevated #1d1d21, neutral borders,
text #e8e8ea, muted #9a9aa2, restrained cool accent (#8fa8c8) — the green cast is
gone; the run-status palette is unchanged. Contrast is AA or better (text 16.2:1,
muted 7.1:1, border 4.3:1). Padding tightened across lists, headers, settings,
tabs, chat, stage panels and artifact tiles on the 8px grid; radii 10/8.

The suite's run-history sections assumed older failures/day groups that the
operator has since wiped; those checks now skip honestly when the fixture history
is not there.
2026-10-19 21:34:59 +01:00
alan 359912f822 web: render stage-turn markdown in the artifact viewer
The full-screen viewer now opens markdown/text artifacts (text/markdown,
text/plain, .md/.markdown/.txt) through the resolved artifact URL and renders
them with the page's own DOM markdown renderer, with an honest failure message
and an external fallback. ArrowLeft/ArrowRight page the shared media+document
list, and a backdrop click closes the viewer while panel clicks do not.

The run gallery and per-visit artifacts present input.md, memory.md and
output.md as ordinary Document tiles with a drawn glyph and open the viewer.

Adds isMarkdownArtifact/isViewerArtifact with unit coverage, deterministic
viewer fixtures, and ui-smoke assertions/captures for rendered markdown,
keyboard paging, the honest 404 and backdrop dismissal.
2026-10-19 21:23:10 +01:00
alan b2fd614ba4 web: finish modal focus handling and two real fixes it exposed
- the attention sheet is managed imperatively, so closing it now tells the
  controller; without that it stayed on the stack and left the app root inert,
  which silently swallowed every real click (found by the suite: the Settings
  Templates card stopped working after the sheet had been used);
- the sheet returns focus to the bell after the repaint that replaces it;
- opening a chat row's menu at the bottom edge now scrolls the row into view, not
  just flips the panel, so the items are actually reachable.
2026-10-19 20:53:33 +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 a7991077d2 web: smoke — the run graph has no note and fills the tab
The layout smoke still asserted the guidance paragraph the operator asked to
remove; assert its absence and a graph viewport of at least half the window, and
keep the pipeline graph's own note check.
2026-10-19 20:16:48 +01:00
alan fdc41385bf Merge branch 'main' into web-run-polish 2026-10-19 20:11:08 +01:00
alan 09627f8d13 Merge branch 'main' into web-layout 2026-10-19 20:10:38 +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 d1f09f499f Merge branch 'main' into web-layout
Take main's newer smoke behaviour where they met: the binary capture is run 449
(opened through openRunDetail), and a running run must show no aggregate Changes
section. Keep the layout's shell-aware checks and its L2-L4 rows; L7 stays todo
with the view-level fixes recorded.
2026-10-19 20:06:25 +01:00
alan 7b6bd71dd8 turn: add file-based stage turn foundation 2026-10-19 20:06:18 +01:00
alan ff70b3796f web: run-detail polish — bigger graph, artifact counts, tighter stage pane
- the run Graph tab drops the guidance paragraph and the graph fills ~70vh;
- the Artifacts collapsible carries the visit's count in its title (the body keeps
  the reason line only when there is nothing to show);
- the stage panel's section padding and gaps are reduced.
2026-10-19 20:05:47 +01:00