Commit Graph

25 Commits

Author SHA1 Message Date
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 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 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 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 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 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 266916f92a Runs: multi-select delete, run sizes and Largest-first sort
- Select mode (bar Select or long-press): per-row checkboxes, per-day
  Select all/Deselect all over finished runs only, "N selected" with the
  selection size, Delete and Done. Active runs get a disabled checkbox
  whose semantics give the reason.
- Native destructive confirmation, then delete_runs {run_ids} (batched by
  1000); the nested runs_deleted reply removes deleted rows and reports
  "Deleted N runs, freed X" plus refusals verbatim. runs_removed pushes
  remove rows and close an open detail; a deleted open run closes too.
  Delete run in the row and detail menus.
- size_bytes shown compactly in rows (0/absent = unknown, nothing shown),
  updated from run_event frames that carry it; Largest first sort (flat,
  unknowns last); the sort choice persists.
- Shared AppListRow gains selectionControl and onLongPress.
- Browser probe tool/runs_delete_probe.mjs; fixture server implements
  delete_runs/runs_removed.
2026-10-31 22:19:36 +00:00
alan e43cc867f9 Sheets, decision options, usage, settings and artifact errors: review r2 batches H and L
Shared AppSheetHeader (title + Done) for the Runs filter/sort and Needs you
sheets; Runs filter single-choice groups as check rows and statuses in
sentence case; Cupertino decision options as a check list; run action sheet
titled with the run; usage page without the duplicate title and with honest
empty states; Settings Reconnect wording, compact notifications row and a
tinted Cupertino Save workspace; friendly artifact preview failures with
Retry.
2026-10-31 12:13:34 +00:00
alan 9d61ce1406 feat(app): run detail's pipeline name opens that pipeline; Retry moves into the more menu 2026-10-23 16:27:20 +01:00
alan 13d293eb47 feat(app): Rename and Schedule this run move into the run detail's more menu 2026-10-23 16:10:20 +01:00
alan 2eda713014 fix(app): an in-flight session export repair stays pending across remounts, as the web 2026-10-23 14:32:04 +01:00
alan 7ad183cf89 fix(app): run actions share one compact native style, as the web's run-action buttons 2026-10-23 12:47:05 +01:00
alan 9344e6d3c0 feat(app): open a run's decision prompt from its URL
A /runs/:id?action=decide route now opens the landed decision prompt once the named detail loads, and only when that detail genuinely awaits a person. A non-waiting run consumes the request without inventing a prompt, and dismissing the prompt leaves the loaded detail. The route flag is forwarded through the existing destination seam; submission, refusal wording and the bounded re-read are shared with the detail's Decide button.
2026-10-22 11:52:22 +01:00
alan 776afcacea fix(app): offer the session export repair only where the web does
Suppress the export-only repair for a legacy session.html with no recorded
evidence, narrow the identity check to the web's own, and keep the stricter
partial rule for an unverified complete status. Fix the analyzer findings,
add gating/legacy/Cupertino coverage, format, and correct the parity docs.
2026-10-22 10:52:36 +01:00
alan d78712aa77 feat(app): send the recorded session export-only repair 2026-10-22 10:12:45 +01:00
alan 53a8f668ca feat(app): start a pipeline from the detail view
Native Run action opens the web's prompt/workspace/notify dialog, sends the exact run_pipeline body against the pinned resolved version with one request key per confirmed attempt, keeps refusals in the dialog, reconciles a lost reply by key, and opens only the server-named run through the existing run route with one fresh Runs list read.

Adds a shared failure-reason helper so operators never see Dart runtime prefixes, and records the slice boundary in notes/P3-run.md.
2026-10-22 02:07:49 +01:00
alan c53dedc544 feat(app): wire retry and restart into the native run detail
Render Retry beside Rename on a stopped failed run under both native
hosts, send only {run_id, request_key} for resume and add
retry_mode=restart for a fresh start, and open the run the accepted
reply names. Keep hidden actions out of the Wrap so native 8/4 dp
spacing is not doubled, and use a literal 2^32 entropy bound because
dart2js evaluates 1 << 32 as 0.

Adds wiring, guard and layout tests, a browser-only key regression and
the retry probe; notes/R2c-wire.md records the checks and limits.
2026-10-21 22:49:26 +01:00
alan 56f3e12183 merge(app): bring main into flutter/r2-retry candidate 2026-10-21 15:16:22 +01:00
alan f2643a0ff4 feat(app): add native rename-run action
Native Material/Cupertino prompt seeded from the run's stored title. Only
Save sends set_run_title {run_id, title} with the text untrimmed; typing and
Cancel send nothing, refusals stay verbatim with the draft kept, and only the
accepted run_detail is delivered once.
2026-10-21 15:14:44 +01:00
alan 178f22aec2 feat(app): add native retry and restart action 2026-10-21 15:13:00 +01:00
alan 54493704c1 fix(app): show run action refusals before resyncing 2026-10-21 14:47:59 +01:00
alan faa5866410 feat(app): add deliberate run cancellation action
Port the browser's canCancel rule and cancel_run request into a native
Material/Cupertino confirmation. Opening the prompt or choosing Keep sends
nothing; a refusal stays visible with the server's words and the run is
re-read so the owner always receives server truth. Includes eligibility,
double-submit, disposal and narrow 2x-text tests plus R2b evidence.
2026-10-21 14:41:33 +01:00
alan 42b21b86cd feat(app): add deliberate human-decision action for run detail
Adds HumanDecisionAction plus its native prompt, wording constants and
tests. The action renders only while pendingDecision() reports a genuine
human wait, sends decide_run only after an option is chosen and Confirm
pressed, sends the pending stage/trimmed option/optional feedback, blocks
double submits, shows server refusals verbatim with the draft intact, and
re-reads the run so the owner always receives server truth.
2026-10-21 14:22:29 +01:00