Skip to content

fix(ui): wiring audit — drop fix_review title, guard soft-stop, expose bulk-approve - #157

Merged
xmiksay merged 1 commit into
masterfrom
153-ui-wiring-audit-fix_review-title-dropped-silent-st
Jul 3, 2026
Merged

xmiksay merged 1 commit into
masterfrom
153-ui-wiring-audit-fix_review-title-dropped-silent-st

Conversation

@xmiksay

@xmiksay xmiksay Bot commented Jul 3, 2026

Copy link
Copy Markdown

Addresses the minor items from the UI wiring audit (#153). Wiring was otherwise complete and healthy — these are the four flagged gaps.

U1 — fix_review title dropped silently

The New Task modal sent a title for fix_review that the backend FixReview variant has no field for, so serde silently ignored it. Removed title from the fix_review trigger type + payload, hid the Title input for that variant, and trimmed the now-always-empty ": title" from its TriggerView headline.

U2 — stopAgent no-ops during a WS outage

stream.send no-ops when the socket is closed, so a Stop click during an outage did nothing with no feedback. stopAgent now guards on wsConnected and warns the operator to use Pause (hard REST kill) instead.

U3 — bulk-approve unexposed

POST /api/auth_requests/bulk_resolve accepts decision: "approve" but the queue only offered "Deny all". Added an Approve all button behind an explicit confirm (generalized denyAll → resolveAll(decision)).

U4 — cleanups

  • Removed the dead resolve() action from the authRequests store (no caller — the real path is AuthApprovalForm → authApi.resolve).
  • Added the created_at field the backend task_sessions::Model returns to the TaskResult frontend type.
  • tasks.kill() now reloads detail only when it's the task on screen, so a list-row pause doesn't clobber the shown task with an extra fetch.

Tests

  • New stores/tasks.test.ts: kill() reload scoping (shown task vs list-row vs no detail).
  • Two new useTaskDetail cases: stopAgent warns-and-no-ops when the WS is down, sends when connected.
  • npm run typecheck + full vitest suite (82) green.

Frontend + docs only; the architecture doc's bulk_resolve rows now mention Approve all.

Closes #153

…e bulk-approve

What:
- NewTaskModal/api types: remove the `title` field from the `fix_review`
  trigger; the input had no backend counterpart (serde dropped it silently).
  Hide the Title input for fix_review and trim the empty ": title" from its
  TriggerView headline.
- useTaskDetail.stopAgent: guard on `wsConnected` and warn via alert when the
  socket is down, instead of a dead Stop click that stream.send no-ops.
- AuthRequestsQueue: expose bulk "Approve all" alongside "Deny all", behind an
  explicit confirm (generalize denyAll → resolveAll(decision)).
- Cleanups: drop the dead `resolve()` action from the authRequests store; add
  the `created_at` field the backend returns to the `TaskResult` type; only
  reload `detail` in tasks.kill() when it's the task on screen.

Why:
- Operator filled a Title for fix_review that had no effect; a soft Stop during
  a WS outage silently did nothing; the bulk-approve capability was unexposed;
  and a list-row pause clobbered the shown task's detail with an extra fetch.

How:
- Frontend-only + docs. Tests: tasks.kill() reload scoping (new store test),
  stopAgent WS guard (two useTaskDetail cases). Architecture doc updated for the
  Approve-all wiring.

Closes #153
@xmiksay
xmiksay merged commit 090deaa into master Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI wiring audit: fix_review title dropped, silent stop on WS outage, unexposed bulk-approve + cleanups

1 participant