Skip to content

feat(web): read agent run results from the operations board - #96

Merged
jusso-dev merged 1 commit into
mainfrom
feat/os-agent-run-results
Jul 30, 2026
Merged

feat(web): read agent run results from the operations board#96
jusso-dev merged 1 commit into
mainfrom
feat/os-agent-run-results

Conversation

@jusso-dev

Copy link
Copy Markdown
Owner

Phase 1 of 6. Closes the loop opened by 9531f9a.

You could dispatch a task to an agent and watch it reach run completed — then nothing. No result rendered anywhere, and nothing in the app linked to /agent-runs/[id], which existed and worked but was orphaned. The only ways to read an answer were Slack or the API.

Changes

  • components/os/agent-run-result.tsx (new) — renders one run's outcome. Narrative fields (summary, headline, rationale, impact, title) surface as text; everything else stays in a collapsed, height-capped Raw result. Failed and cancelled runs show error/cancellationReason. Links to /agent-runs/<runId>.
  • Operations drawer now renders it between the metadata list and the handoff timeline.
  • Run status now prefers task.run.status over task.agentRunStatus. The gateway settles the run row, so the task's copy can lag.
  • useTasks polls at 20s. Without it a dispatched run's result never appeared at all: settlement happens in the gateway, not the browser, and nothing invalidated the query.

Field precedence deliberately matches lib/agent-handoff-domain.ts, so one run reads the same way wherever the OS shows it.

Framing

Agent output is rendered as evidence, never instruction — consistent with how this codebase treats connector and agent output everywhere else. The footer says so, and nothing in the panel is actionable.

Arbitrary agent JSON is capped at 20,000 characters inside a max-h-56 scroll region, so a verbose result cannot set the drawer's height.

Reviewer notes — agent-run-view.tsx is fit to link to, but thin

Verified before linking: it resolves real data off agent_runs joined to agent_definitions, and board run ids resolve there. No placeholders. But:

  1. It never shows error or cancellationReason — a failed run renders as status failed plus "No typed result is available yet". The board drawer now says more about a failure than the run detail page does.
  2. It never calls /api/v1/agent-runs/<id>/timeline despite the route existing. The link is worded "Open full run", not "timeline", to avoid promising what it doesn't deliver.
  3. It still uses legacy OpsShell and hand-rolled padding rather than CompanyOsShell + PageBody, so it looks off from the rest of the OS.

Follow-up

components/tasks-view.tsx (legacy) already subscribes to /api/v1/tasks/<id>/events over SSE for live settlement. The board polls instead. If sub-second feedback on the board matters, that stream is the existing mechanism to adopt rather than tightening the poll.

🤖 Generated with Claude Code

Dispatching a task from the board produced a run id and nothing else: the
drawer showed a status word, no result, and no route to the run detail page
that already existed at /agent-runs/<id>.

RawTask now models the run object the tasks API already returns, and
BoardItem carries its structured output, error, cancellation reason, and
output hash. A new AgentRunResult component renders the readable text fields
first — summary, headline, rationale, impact, title, the same precedence the
handoff summariser uses so a run reads the same way everywhere — and keeps
arbitrary agent JSON in a collapsed, character-bounded, scrollable block so
it can never stretch the drawer. Failed and cancelled runs show their
recorded reason instead.

The run row settles in the agent gateway, so board status now prefers the
run's own status over the task's copy, and useTasks polls like the other
governed views. Run output is framed as evidence to judge, never as an
instruction to act on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jusso-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f1bcbcdf-1f3b-4d32-aacd-157ba55a9735

📥 Commits

Reviewing files that changed from the base of the PR and between cdc2060 and 6ad12a7.

📒 Files selected for processing (4)
  • apps/web/components/os/agent-run-result.tsx
  • apps/web/features/operations/operations-view.test.ts
  • apps/web/features/operations/operations-view.tsx
  • apps/web/lib/queries/hooks.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jusso-dev
jusso-dev merged commit e7a0a78 into main Jul 30, 2026
8 checks passed
@jusso-dev
jusso-dev deleted the feat/os-agent-run-results branch July 30, 2026 04:35
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.

1 participant