3.5 KiB
3.5 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 10-review-surface-controls | Review changes control, run status, findings overview, step editor | pending | 7 |
|
plan.md | ../../specs/agents/requirements/native-code-review.md |
Task 10: Review surface controls
The trigger, the run status, the findings overview, and the workflow step setting.
Inputs
- Spec What, the
review_agent_unavailablescenario, and the run State machine for the states the control must show. components/review/review-top-bar.tsx— where the control goes;ReviewWalkthroughButtonshows the disabled-tooltip pattern (apps/web/AGENTS.mdrequires the focusable-span wrapper on a disabledButton).components/review/review-comments-overview.tsx— the overview layout to mirror.components/task/{changes-panel-header.tsx,changes-top-bar.tsx}— the Changes-panel toolbar.apps/web/AGENTS.md→ self-documenting settings and settings-save-coordination rules for the step editor.
Work
components/review/review-run-button.tsx— Review changes action with states: idle; running (spinner + Cancel); completed (open-finding count badge); failed (error affordance). Onreview_agent_unavailableit renders an inline message naming Settings → Utility Agents with a link, not a bare toast. Onreview_no_changesit shows a muted "No changes to review".components/review/review-top-bar.tsx— mount the control and the findings count; keep the file under 600 lines by extracting rather than inlining.components/review/review-findings-overview.tsx— findings grouped by repository then file, severity-sorted, each row selecting + scrolling to the anchored finding; separate sections for open, resolved/dismissed, and "not in current changes".components/review/{review-diff-list.tsx,review-file-tree.tsx}— per-file open-finding badge beside the existing comment badge, keyed byreviewFileKey.components/task/{changes-panel-header.tsx,changes-top-bar.tsx}— the same control on the Changes panel, sharingreview-run-button.tsx.- Workflow step editor (under
components/settings/workflows/) — a Run code review on entry control plus an optional agent-profile picker, with visible copy stating that the review runs against the task's changed files, that the chosen profile's model does the reviewing, that findings are advisory, and that a failed review does not block the step. Register throughuseSettingsSaveContributor/SettingsPageTemplate; no page-local save button.
Acceptance
- The control reflects every run state and offers Cancel only while running.
- With no capable agent, the inline Settings message appears and no run is created.
- The overview groups per repository and navigating a row scrolls to that finding.
- The step editor persists the action through the shared save coordinator and round-trips on reload.
Verification
cd apps/web && pnpm vitest run components/review components/task/changes-panel-header.test.tsx components/settings/workflows
cd apps/web && pnpm run typecheck && pnpm lint
Files likely touched
components/review/{review-run-button.tsx,review-findings-overview.tsx,review-top-bar.tsx,review-diff-list.tsx,review-file-tree.tsx}, components/task/{changes-panel-header.tsx,changes-top-bar.tsx}, components/settings/workflows/*, plus tests.
Output contract
Summary, files changed, tests run with results, blockers, risks, status: done, plan checkbox.