Repository navigation
Closed
Description
Context
The UI follows the /tasks triage console: a list on the left and the selected item on the right on wide screens (TaskSplitWorkspace + react-resizable-panels), full-page navigation with "Back to list" on narrow screens. This issue builds the API client, the route, the sidebar entry, the Agents list, and the agent detail/edit form (scope, prompt + files, capabilities, model, schedule, autonomy). Run history, run detail and the report view come in issue 16.
Requirements
propr-ui/src/api/agentDefinitionsApi.ts— typed wrappers for every REST route of issues 5, 10 and 11 (listAgentDefinitions,getAgentDefinitionContract,createAgentDefinition,updateAgentDefinition(id, patch, expectedRevision),deleteAgentDefinition,uploadAgentAttachment,deleteAgentAttachment,triggerAgentRun,listAgentRuns,getAgentRun,approveAgentRun,rejectAgentRun,cancelAgentRun,getAgentCapacity) usingapiFetch/handleApiResponse.- Routes in
propr-ui/src/App.tsx(lazy chunk inrouteChunks.ts):/agents,/agents/new,/agents/:definitionId,/agents/:definitionId/runs/:runId. - Sidebar: add Agents to
CORE_NAVIGATIONinSidebarNavigation.tsxafter Goals (lucideWorkflowicon). The existing "Coding Agents" resource entry is unchanged. propr-ui/src/pages/AgentsPage.tsx:- ≥1280px (
TASK_SPLIT_QUERY): split panes —AgentListleft, selected agent right (selection in the URL path). - <1280px: list page, or the detail page with a "← Back to list" link.
- ≥1280px (
propr-ui/src/components/Agents/AgentList.tsx: rows with name, repositories (short names), model, schedule summary ("Daily 09:00 UTC · next in 3h" or "Manual"), autonomy badge (Dry run / Preview / Auto), last run state; search box (ListSearchInput); "New agent" button;ListSkeletonloading state (per UI guidelines); empty state explaining what an agent is.propr-ui/src/components/Agents/AgentEditor.tsx(create + edit):- Name, description.
- Repository scope: multi-select over enabled catalog repositories (
useDecoratedRepoOptions/fetchEnabledRepos), max 10. - Prompt textarea + input files (
AttachmentUploader-style drop zone posting to the attachments route; disabled until the agent is saved). - Previous reports: toggle + count (0-5).
- Model: agent + model from
getInstanceCatalog()(enabled agents only), reusingAgentModelSelector(single mode). - Capabilities: three independent toggles with one-line explanations;
propr_mcpdisabled with a hint when the selected agent type is not Claude/Codex; "best effort" hint for web on other runtimes. - Schedule: off / cron input with presets (Hourly, Daily 09:00, Weekdays 09:00, Weekly Mon 09:00), live "Next run: …" preview using
nextCronOccurrenceand inline validation viavalidateAgentSchedule(UTC label). - Autonomy: radio group Dry run / Preview + approve / Auto, each with a sentence describing what happens after the report.
- Save sends
expectedRevision; a 409 shows "Changed elsewhere — reload" (no silent overwrite). Client-side validation usesvalidateAgentDefinitionInputfrom@propr/sharedbefore sending. - Delete with confirmation (409 when a run is active is shown as an error).
- Tests (Vitest + Testing Library):
AgentsPage.test.tsx(split vs. navigation, back link),AgentEditor.test.tsx(validation, MCP toggle disabled for unsupported agent, cron preview, 409 handling).
Implementation Specification
- Follow
docs/ui-design-guidelines.md("Studio Aesthetic", monospace chips for repo/model, skeletons not spinners). - Demo mode: editor is read-only (
useDemoMode), Run/Save disabled. - Keep components small (<300 lines each); split the editor into
AgentScopeSection,AgentCapabilitiesSection,AgentScheduleSection,AgentAutonomySectionif it grows.
Acceptance Criteria
- At 1920px, clicking an agent opens it beside the list without leaving
/agents…; at 1024px it navigates and shows "Back to list". - Creating an agent with an invalid cron shows the shared validation message and sends no request.
-
propr_mcpcannot be enabled for an OpenCode agent. - Editing in two tabs: the second save shows the conflict message.
-
npm run lint -w propr-ui, typecheck and new tests pass.
Created by ProPR AI Planner
Activity
propr-dev commentedon Oct 6, 2026
Suggested Implementation:
Implementation Approach
We copy the
/tasksinteraction model so operators don't learn a second console: URL-addressable selection, split panes on wide viewports, full-page navigation with an explicit back link on narrow ones. The editor validates with the same shared functions the API uses (validateAgentDefinitionInput,validateAgentSchedule,nextCronOccurrence), so a user sees exactly the server's rules before submitting, and the "next run" preview matches the scheduler.The path segment (
/agents/:definitionId) is used for selection rather than a?task=query param because agents have nested routes (runs) that need their own deep links.File:
propr-ui/src/api/agentDefinitionsApi.ts(new file)Why this file: Single typed client for every Agents endpoint used by the UI.
File:
propr-ui/src/pages/AgentsPage.tsx(new file)Why this file: The master-detail shell, mirroring
TasksPage+TaskSplitWorkspace.AgentDetail(propr-ui/src/components/Agents/AgentDetail.tsx) loads the definition, renders tabs Settings (theAgentEditor) and Runs (issue 16), and a header with name, autonomy badge, "Run now" (issue 16) and the overflow menu (Delete)./agents/newrendersAgentEditorwith no definition; after create it navigates to/agents/<id>.File:
propr-ui/src/components/Agents/AgentEditor.tsx(new file — core excerpt)Why this file: The definition form; validation and next-run preview use the shared contract so client and server agree exactly.
File:
propr-ui/src/components/SidebarNavigation.tsxWhy this file: Agents are a core workflow destination, next to Tasks/Goals/Plans.
File:
propr-ui/src/App.tsx/propr-ui/src/routeChunks.tsAdd
export const AgentsPage = preloadable(() => import('./pages/AgentsPage'));(same helper as the other chunks) and import it inApp.tsx.AgentsPagetreatsdefinitionId === 'new'as the create form.File:
propr-ui/src/pages/AgentsPage.test.tsx(new file)Why this file: Guards the master-detail behavior, the most likely regression.
The REST API for Agents is in place. The new route tests pass (15 of …
The REST API for Agents is in place. The new route tests pass (15 of …
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-52814/claude-opus-5-5-agents-v1-15-17-web-ui-ag-20261007-1011-u0o2800-epic-agents-v1-y7tissue-2814-20261007-1011-claude-opus-5-5-u0o🔍 Track Task Execution
I've built the Agents section of the web UI for issue #2814: the API …
I've built the Agents section of the web UI for issue #2814: the API …
feat(ai): I've fixed all four findings. The 4 new regression tests fa…