Repository navigation
Closed
Description
Context
Issue 15 built the Agents list and the detail/edit view. This issue completes the master-detail UI: the agent's run history list, the run detail view, the report view, and the actions around them — Run now, Approve / Reject for preview mode, Cancel, and a capacity warning before running near a subscription limit.
Run detail deliberately links to the underlying tasks (/tasks/<reportTaskId> and /tasks/<actionTaskId>) instead of re-implementing live logs: the report and acting steps are ordinary tasks, so the existing TaskDetails view already shows their timeline, live output, cost and logs.
Requirements
propr-ui/src/components/Agents/AgentRunHistory.tsx: in the agent's Runs tab; newest first; columns: started (relative time), trigger (Run now / Schedule / API / MCP / CLI + source tooltip), state badge, duration, one-line report preview (first non-empty line, loaded lazily on hover or from the detail); "Load more" usingnextOffset;ListSkeletonwhile loading. Clicking a row navigates to/agents/:definitionId/runs/:runId. Back from a run returns to the history ("← Runs").propr-ui/src/components/Agents/AgentRunDetail.tsx:- Header: state badge, trigger + source, timestamps (created, reported, finished), autonomy mode used by this run.
- Skip/defer/failure reason in a
SystemAlertwhen present (shows cost-gate messages verbatim). - Report view: the report rendered with
MarkdownRenderer(no raw HTML), a "Copy" button and a "Report truncated — full output in the task log" note whenreportTruncated. - Awaiting approval state: an approval panel with an optional note textarea (≤2,000 chars), Approve and act and Reject buttons (confirm dialogs), explaining what the acting agent can do (ProPR tools on the agent's repositories; cannot merge or change settings).
- Acting/completed: "What the acting agent did" section rendering
actionSummarywithMarkdownRenderer. - Links: "Open report task" →
/tasks/<reportTaskId>, "Open acting task" →/tasks/<actionTaskId>. - Cancel button while
queued,deferred,running,awaiting_approvaloracting. - While non-terminal, refresh every 10 s (and immediately on socket
task:updateevents for its task ids viauseSocket().onTaskUpdate), stop when terminal.
- Run now button in the agent header (issue 15's
AgentDetail): callstriggerAgentRun, then navigates to the new run. Before triggering, fetchgetAgentCapacity; whennear_limit, show a confirm dialog "Claude is at 94% of its session window (pause threshold 90%). Run anyway?" — attended runs are allowed to proceed, but the user decides knowingly. Disabled when the agent is disabled or in demo mode. - List badges: the Agents list (issue 15) shows the last run's state; an
awaiting_approvalrun shows a "Needs review" badge so preview-mode work is discoverable. - Tests:
AgentRunDetail.test.tsx(report rendering, approve flow with note, reject, polling stops at terminal),AgentRunHistory.test.tsx(paging, row navigation), Run now capacity confirmation test.
Implementation Specification
- Shared
AgentRunStateBadgecomponent maps eachAgentRunStateto label + color (gray queued/deferred, teal running/acting, amber awaiting_approval, green completed, red failed, slate skipped/rejected/cancelled). - Reports are untrusted model output: rely on
MarkdownRenderer(react-markdown, norehype-raw) and keep linksrel="noopener noreferrer". - Use the
useDocumentTitlehook: "Run · ".
Acceptance Criteria
- A completed run shows its Markdown report, with copy and links to its task.
- A preview-mode run in
awaiting_approvalcan be approved with a note (POST body contains the note) or rejected; buttons disappear after the transition. - A skipped run shows the cost-gate reason.
- Run now near the limit asks for confirmation; cancelling the dialog sends no request.
- Polling stops once the run is terminal (verified with fake timers).
Created by ProPR AI Planner
Activity
propr-dev commentedon Oct 6, 2026
Suggested Implementation:
Implementation Approach
The run views are read-mostly projections of the
agent_runsreceipt plus links into the existing task views. We intentionally do not duplicate live logs, cost or timeline rendering — the report and acting steps are normal tasks andTaskDetailsalready renders them; this keeps the UI change small and consistent with "reuse, don't reinvent".Polling every 10 s while non-terminal, nudged by existing
task:updatesocket events for the run's task ids, is enough for a run that takes minutes; a dedicated agent-run socket channel is unnecessary in v1.File:
propr-ui/src/components/Agents/AgentRunStateBadge.tsx(new file)Why this file: One mapping from run state to label/color used by the list, history and detail.
File:
propr-ui/src/components/Agents/AgentRunDetail.tsx(new file)Why this file: Run detail + report view + the human half of preview autonomy.
File:
propr-ui/src/components/Agents/AgentRunHistory.tsx(new file)Why this file: The per-agent run history list.
File:
propr-ui/src/components/Agents/RunNowButton.tsx(new file)Why this file: Attended runs bypass the cost gate, so the UI is where the user is warned before spending near a limit.
Wire into
AgentDetail(issue 15): header rendersRunNowButton; whenrunIdis present the right pane rendersAgentRunDetailinstead of the tabs; the Runs tab rendersAgentRunHistory. The list (AgentList) receives each definition's last run state from an addedlastRunfield on the list endpoint (listAgentDefinitionsjoins the newestagent_runsrow per definition — small server change inagentDefinitionStore.listAgentDefinitions).File:
propr-ui/src/components/Agents/AgentRunDetail.test.tsx(new file)Why this file: Covers the approval flow and the stop-polling rule.
I've added the eight agent MCP tools for issue #2812 in a new `packag…
I've added the eight agent MCP tools for issue #2812 in a new `packag…
propr-dev commentedon Oct 7, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-52815/claude-opus-5-5-agents-v1-16-17-web-ui-ru-20261007-1500-60s2800-epic-agents-v1-y7tissue-2815-20261007-1500-claude-opus-5-5-60s🔍 Track Task Execution
I've built the run history, run detail with report view, approve/reje…
I've built the run history, run detail with report view, approve/reje…