Commit Graph

201 Commits

Author SHA1 Message Date
alan 672d1f95cc Merge main (findings ledger, loop continuation) into usage-limit branch
Keeps the findings ledger, extra visits and on_exhausted=decide alongside the
run budget, failure classes, quota parking and error-loop backoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:35:54 +00:00
alan b3c9575fde Runs park on usage limits; failure classes, harness error policy, run budgets
- A stage refused for a Claude usage limit no longer fails its run: the
  runner tries the chats' Claude account auto-switch (per-home setting) and
  reruns the visit, else parks the run in the new waiting_quota status
  (persisted, with reset/resume time in run summaries, details and events)
  and resumes the same visit at reset + 1 min, also after a restart.
  resume_run / `pipelines resume` resumes now; cancel works on parked runs.
  The rerun visit gets a "# Previous attempt" interruption note. Subscription
  limits no longer say "top up the provider account".
- run/retry into an account known to be limited are deferred (quota_policy
  defer/refuse/now; CLI refuses under --json/--yes unless --defer or --now).
- failure_class on runs (quota, loop_exhausted, timeout, permission_denied,
  harness_error, blocked, environment, canceled, interrupted, budget,
  check_failed, other) in RunSummary/RunDetail/events, CLI inspect/runs/wait/
  stats and the app failure line.
- Claude permission denials (permission_denials / refused tool results) fail
  a blocked visit with permission_denied naming the tool use.
- Harness failures are classified transient vs deterministic; deterministic
  ones (and a repeated empty readback) skip error self-loops; transient
  self-loops back off 15 s, 1 min, 4 min.
- Whole-run USD budget: run --budget, server default (run-budget /
  get/set_run_settings); 80% warning notification, stop with class budget.
- App: waiting_quota status/filter with resume time, Resume now and Cancel,
  failure class wording. Docs and skill references updated.

Merges main (check stage, delivery gate, Claude stage restart survival,
schedule changes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:34:53 +00:00
alan ea858804b8 Merge main into the engine loop improvements
Keep both intents: check stages, allow_workspace_changes, outcome repair
counts and Claude stage re-adoption from main beside the findings gate,
resume_session, applyLimitOn and exhaustion decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:24:27 +00:00
alan 87016ef5dc Engine: check stages, harness-agnostic delivery, read-only enforcement, complete captures
- New `type=check` stage: the server runs a `commands` block (sh -c, per
  command_timeout, workspace env) and routes on pass/fail; per-command status,
  exit code, duration and bounded output are recorded and the failing output is
  the handoff. With delivery=true it is the landing gate (commit leftovers,
  merge moved main, checks in a fresh candidate worktree, fast-forward main).
  Parser/registry, lint (silent guards), format docs, CLI inspect, app graph and
  run detail rendering.
- delivery=true is accepted on every harness (and on check stages).
- permissions.shell on claude stages maps to Bash(cmd) / Bash(prefix:*) rules
  instead of a bare Bash allow; stages without edit that change the workspace
  fail the visit with the changed files listed (allow_workspace_changes=true
  opts out; artifacts, public and harness state dirs are ignored).
- File-change capture: symlinks compared by target, untouched protected files no
  longer make captures partial, untracked caches/dependency/build output left
  out, lockfiles listed without patch, huge files compared by metadata, raised
  patch/line limits. Outcome repair follow-ups are logged and counted on the
  step (control.outcome_repairs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:52:16 +00:00
alan ebe79ebed0 App: findings ledger tab, retry extra visits and exhaustion decisions
Run detail gains a Findings tab (open-count badge) listing the server's
findings ledger with status and minimum-severity filters and expandable
event history; visit grants show as an Extra visits summary fact. The
resume retry prompt can grant 1-5 extra visits to the exhausted stage or a
chosen graph stage (never sent on restart), suggested when the run failed
on a visit limit. A loop-exhaustion decision waiting on a model stage is
now decidable from its recorded options, with readable labels, targets and
the visit count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:45:51 +00:00
alan dd86454657 Merge branch 'worktree-agent-a717651aa412e3b7c'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 01:00:02 +00:00
alan a6db4ba20e App: run tabs under the header on wide layouts, stable Artifacts tab, spelled-out pipeline status, shared list selection, code block header and edge fades
- Run detail: on a wide window (>= 840, pane >= 600) the tabs are Material
  segments under the run header; phones keep the floating bottom bar.
  Artifacts is always a tab, badged with its count and disabled with 0 (its
  tooltip says why), so Changes never moves.
- Pipelines list: 'Failed · last run 19 Oct' beside the status dot; facts on
  the next line; compact rows keep 'Failed · 19 Oct'.
- Settings: Disconnect is outlined beside a tonal Reconnect.
- Lists: one selection style (tonal fill plus one leading accent bar) for
  runs, pipelines and chats; chat's border, fill and pointer removed.
- Transcript: overflowing blocks fade at the edge with a chevron instead of
  a 'Scroll horizontally' line (semantics hint kept); code blocks get a
  header strip with language and Copy; lighter light-mode code fill.
- Runs list: rows under a day heading show only the time of day.
- Artifact search reveal re-centres once the lazy list's extent settles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:55:50 +00:00
alan 84028a5f24 Merge branch 'worktree-agent-a85504335ecc45672' into worktree-agent-a717651aa412e3b7c 2026-12-03 00:49:51 +00:00
alan 12c7642e35 Chat quick switcher MRU, Closed section and markers; Alt+N, Alt+J and run tab keys
Ctrl+K lists open chats most recently used first (tracked on open and pane
focus, persisted per server) and preselects the previous chat, so Ctrl+K,
Enter returns to it. Rows mark needs you / working / unread; a query also
lists matching closed chats under Closed, and choosing one reopens it.
Alt+N (Option+N) starts a new chat and Alt+J (Option+J) opens the next chat
waiting for you, unread or failed, cycling; the terminal keeps both. In run
detail, bare 1-4 switch tabs when not typing. Cheatsheet entries added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:49:36 +00:00
alan 072db8f749 Runs: failure banner actions, immediate run menu; pipeline rows get Run
- "Why it failed" banner offers Retry (the retry prompt), Run again… (New
  run form pre-filled; now allowed for failed runs from the banner) and
  Open in chat (the run's existing send-to-chat flow).
- The run ⋮ menu shows while the detail loads: items listed from the run's
  list row, disabled until get_run answers (the loading placeholder had no
  actions, so the menu waited for the full detail).
- Pipelines list rows: Run… in the row menu (not for archived pipelines)
  and a trailing Run button when the list sits beside its detail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:32:57 +00:00
alan 545291e04a App: run failure reasons, Run again, labelled tabs, actionable errors, nav fixes
- Run rows show a failed run's reason (else its diagnostic's first line,
  full text in a tooltip) or a short result preview; the Summary leads
  with "Why it failed".
- Run again for succeeded/canceled/interrupted runs opens the New run form
  pre-filled (prompt, workspace, report format) at the latest version with
  the original offered.
- Run detail and stage tabs show their names; touch shows captions on the
  Runs header and artifact viewer actions (desktop keeps tooltips).
- ErrorNotice maps not connected / server too old / permission / timeout
  to what to do, raw detail behind Details (Schedules, create chat, Runs,
  Pipelines banners).
- Settings has no Back arrow; Schedules keeps the rail on wide windows;
  phone Settings leads with Connection and Notifications and has a
  Jump to topic menu.
- Walkthrough: Open Connection (skipped when connected), labelled Copy.
- Pluralised counts; no duplicate status/rail names for screen readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 20:16:22 +00:00
alan 85a7284fba Stages: optional skills block loading pinned library skills per visit
A model stage may declare a skills block (name or name@N per line).
Drafts and publications are validated against the server skill library;
human/ntfy stages reject the block. Each run resolves unpinned names to the
latest version at admission and records name@N per stage (run
stage_skills, step skills); retry reuses the recorded versions. Every visit
gets a private read-only copy of exactly those bundles under the run's
artifact tree, and the harness loads only them: Claude via a session
plugin (--plugin-dir, Skill tool with per-skill allow rules, bundled skills
off, ambient loads fail the visit), Pi via --skill under --no-skills, and
OpenCode via per-session instruction entries (V2 only). The app shows the
block in the stage definition and the resolved versions on each visit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:17:16 +00:00
alan 5425001d82 Send artifacts, runs and pipelines to a new or existing chat
One picker offers a new chat (the saved Open in chat harness and model)
or any open chat. An existing chat gets the reference appended to its
draft and focused, never sent. Artifacts gain the action in their viewer
and gallery; the run and pipeline item becomes Send to chat.
2026-11-13 18:43:14 +00:00
alan b561e250e6 Icons for every run menu action; omit an unknown pipeline version 2026-11-13 12:44:47 +00:00
alan e5403ae257 Open a run or pipeline in a new chat
The run and pipeline More menus offer Open in chat: a new chat in the
run's (or the pipeline's latest run's) workspace opens on the Chat tab
with a draft naming the run or pipeline and how to inspect or change it.
2026-11-13 12:38:27 +00:00
alan a733a927f3 Finalize reviewed destination and skill changes
Preserve Settings as an independent navigation destination while landing the reviewed notification and skill-management updates. Keep the server and CLI skill contracts versioned and validated so the merged tree can be verified by the delivery gate.
2026-11-12 11:30:17 +00:00
alan 26bb583f10 Refine Settings destination shell integration
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
2026-11-12 11:21:26 +00:00
alan 92b3f47d92 Hide phone navigation on run details
Keep pushed run detail and placeholder views consistent with the phone navigation behavior by hiding the shell bar. Add regression coverage and preserve the floating-bar motion test at its intended breakpoint.
2026-11-12 03:17:44 +00:00
alan 22af093eda Expand run detail output by default
Make run and visit output sections open when details are viewed while preserving user collapse behavior. Add coverage and implementation notes for the updated interaction.
2026-11-12 01:56:41 +00:00
alan dbd525a7b1 Clarify empty server states
Show calm, actionable empty states for pipelines, runs, and chats while keeping filtered and failed loads distinct. Add focused widget coverage and document the remaining verification limits.
2026-11-12 01:02:31 +00:00
alan fa95c2fcae Remove the Runs error counter for now
Keep the running indicator and Needs you flow, but remove the failed-count badge and its tab count plumbing until unseen-state behavior is addressed. Preserve the unfinished seen-state work separately. Verify application, Runs, attention and shell regressions.
2026-11-11 23:18:30 +00:00
alan efca56e4e4 Show running and failed run counts independently
Give the Runs tab separate activity and failure indicators so neither suppresses the other. Reuse known summaries and pushed updates, keep failed states separate from decisions and dismissal counts, and update across tabs even when total attention is unchanged.
2026-11-11 22:10:37 +00:00
alan 9551eceaed Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
2026-11-11 21:55:39 +00:00
alan 16f4e43ddc Format shared Material primitive integration 2026-11-11 21:17:32 +00:00
alan 16dab6d74e Merge branch 'main' into pipelines/run-20261111-1951-material-cleanup-shared-ui-primitives-65fb
# Conflicts:
#	app/test/features/runs/ui/run_path_mini_test.dart
2026-11-11 21:16:36 +00:00
alan 7cb95471cb Format integrated runs and pipelines cleanup 2026-11-11 21:13:38 +00:00
alan b771f3813a Remove Cupertino remnants from runs and pipelines
Keep the assigned runs and pipelines UI Material-only by removing alternate icons, host branches, and Cupertino color usage while preserving compatibility parameters needed by other callers. Update mirrored tests and record focused verification for the cleanup.
2026-11-11 21:12:40 +00:00
alan 83fd56ba19 Merge commit '551e403d48d51e4904387d2c299dcfd9ec62dbf9' into pipelines/run-20261111-1951-material-cleanup-shared-ui-primitives-65fb 2026-11-11 20:56:34 +00:00
alan ba198d144a Use desktop dialogs for remaining sheets
Keep the audited runs filter, chat colour picker, and Needs you flows as Material bottom sheets on narrow or touch layouts while presenting bounded desktop dialogs on wide layouts. Remove obsolete Cupertino flags and add focused route regressions and notes.
2026-11-11 20:06:27 +00:00
alan 5c80f75211 Remove Cupertino UI branches from shared primitives
Keep the existing Material rendering, semantics, and interaction paths while removing obsolete Cupertino imports, alternate widgets, and dynamic-color dependencies. Record focused verification and remaining fixture limitations for final integration.
2026-11-11 20:05:58 +00:00
alan 4b4628f35c Remove Cupertino branches from runs UI
Keep the public cupertino parameters for compatibility while retaining only the Material rendering paths. Remove Cupertino-only widgets, routes, styling, and tests because the application runs under Material hosts.
2026-11-11 16:06:54 +00:00
alan 75929a0a41 Remove Cupertino branches from runs UI
Keep the Material-only run detail implementation while preserving public parameters for callers. Narrow the corresponding widget tests to the supported Material host and remove unused Cupertino-only code.
2026-11-11 05:11:26 +00:00
alan 364fd5b538 Remove Cupertino run action branches
Keep the Material-only run action behavior while preserving public Cupertino parameters for callers that will be cleaned up separately. Narrow the related tests to the supported Material path.
2026-11-11 04:18:26 +00:00
alan 42a2378ecb Anchor desktop Files and Runs menus
Use Material popup menus for file actions and anchor Runs sorting choices to the sort button while retaining the phone fallback. Update callers, tests, and implementation notes to match the desktop behavior.
2026-11-10 22:14:29 +00:00
alan 4c57c50a0f Label machine provenance and choose server before chat harness 2026-11-08 16:46:23 +00:00
alan 7287ba35c9 Refresh runs from nested wire events and foreground resume 2026-11-07 23:46:02 +00:00
alan 5423f1e839 Show definition and run warnings in app summaries 2026-11-05 14:23:36 +00:00
alan fc615c69e7 Merge branch 'main' into worktree-agent-a35ac03e196ffae50
# Conflicts:
#	app/lib/features/runs/ui/run_detail_content.dart
#	app/lib/features/runs/ui/run_list_row.dart
#	app/tool/search_selection_probe_entry.dart
2026-11-04 17:44:29 +00:00
alan e7d00b85ff Runs: running run and stage durations tick live
One shared ElapsedClock (single timer, only while a visible running item
is watched and the app is visible; cadence follows formatDuration
precision) and a LiveElapsedBuilder that repaints only its own text.
Running list rows, the Summary Duration and running timeline visits
tick. A stage start re-reads the open detail, since step deltas carry
no started_at. Fixture ?running=1 for captures.
2026-11-04 17:43:29 +00:00
alan d3a2369d1f Stage rows show cached share and cost; Changes explain no_patch_reason
Timeline stage rows add the cached share (when cache_known) and a positive
cost: 20.1M tokens · 97% cached · $1.42. The file viewer words each server
no_patch_reason, keeping the old truncated/binary text as the fallback.
2026-11-04 17:26:31 +00:00
alan 3227d61caf Token usage: keep cache/reasoning split, count only recorded steps, cost only when positive; captures fixture, docs and notes 2026-11-03 22:16:49 +00:00
alan aa948bdfe4 Runs list carries per-run token usage; app shows tokens beside size, Most tokens sort, Summary and stage tokens 2026-11-03 22:04:55 +00:00
alan a40a6e2e1c Narrow list panes: readable bar title, More overflow menu, rows keep status and actions
The floating bar keeps the title at its own width (up to half the bar) and
moves overflowable actions into one More menu instead of squeezing them
below their touch targets. List rows keep their leading status avatar and
More actions at any list-pane width; the time moves under the subtitle.
2026-11-03 18:04:10 +00:00
alan d34185b56c Merge: chat colours, Ctrl+1-9, starred chats alphabetical
# Conflicts:
#	app/lib/features/chat/conversation/chat_thread_view.dart
#	app/tool/perf/perf_fixture.dart
#	internal/protocol/chat.go
#	internal/server/chat_close.go
#	internal/server/chat_sessions.go
2026-11-03 11:22:50 +00:00
alan f7b5958d64 App: chat colours, Ctrl+1-9 opens the Nth list item, starred chats alphabetical
A chat's colour is picked from its row menu (Colour...), a long-press or
the chat information sheet. The list shows it as a leading bar, a faint
row tint and a coloured avatar; the open chat shows a faint wash under its
top bar. Shades are Cupertino's dynamic system colours and Material
swatches tuned per brightness. Changes from other devices apply live.

Ctrl+1...Ctrl+9 open the Nth item of the open tab's list (chats, runs,
pipelines) in on-screen order, also while typing. Starred chats are sorted
by name, case-insensitively, as one alphabetical group.
2026-11-03 11:05:38 +00:00
alan 8d2ca95057 Open Search artifact hits in the viewer over the run's Artifacts tab
On a phone-width window the open run is its own page pushed on the app
navigator, so RunDetailTabs was not a descendant of the shell's
RunSearchSelectionScope (which wraps only the Runs tab body). The field or
artifact selection was never seen and the run opened at its plain Summary.
The previous widget tests injected the scope directly above RunDetailView at
900 px, where the detail is an inline pane, so they could not catch it.

- RunsScreen relays the shell's search scope into the detail it builds, so
  the pushed page sees the selection too (also fixes field hits on phones).
- An artifact hit now opens the run's Artifacts tab and the gallery opens
  that artifact exactly as a tap there does: selected, scrolled into view
  (ArtifactVisitReveal) and in the viewer. Back returns to the tab with the
  artifact highlighted. An unknown URL leaves the tab open with the existing
  "That artifact is no longer available." notice.
- New test/application/search_artifact_open_test.dart drives the real Search
  tab -> typed query -> result tap -> run read -> viewer on a 390x844 phone,
  Material and Cupertino; it fails without the scope relay.
2026-11-02 18:39:43 +00:00
alan f1ac647125 perf: build unshown run-detail tabs after the route transition; interaction bench
FadeThroughStack(lazy: true) builds only the shown page first and the rest
one per frame once no animation runs. Opening a run detail no longer lays out
Timeline, Artifacts and Changes offstage during the route transition
(transition build 62-103 ms -> 38-59 ms); first tab switches are unchanged.

Adds tool/perf/interaction_bench.mjs (FrameTiming per interaction over the
full-app fixture, CPU profiles mapped to Dart files), fixture options for
hits/chats/graph, and notes/perf-round3.md with the survey.
2026-11-02 13:54:56 +00:00
alan 629c8c6091 Search artifact hit: clear the pending visit flag; tests for opening
After opening an artifact from search the pending flag was never cleared, so
later visit selections stopped syncing. It is cleared once the visit page is
installed. Adds widget tests: the hit opens the viewer on that artifact, Back
lands on its visit and another visit still opens, and a missing artifact shows
the notice. Finishes run #231.
2026-11-02 00:40:38 +00:00
alan 7e00cedd00 Merge main 2026-11-02 00:36:49 +00:00
alan 41492df436 WIP: search artifact hit opens the viewer (run #231) 2026-11-02 00:35:23 +00:00