Agent cancellation support and improve agent feedback ui/ux - #1314
Conversation
…end stack Add CANCELLED status to JobStatus enum and DB constraints in commons. Introduce cancellation detection helper that walks exception cause chains for CancelledError/asyncio.CancelledError (Python 3.13 compatible). Propagate cancellation through Temporal workflows, interceptor, and DB activities. Add POST /repository-agent-run/cancel endpoint with Temporal RPC error handling. Persist workflow_id upfront for cancel lifecycle ops. Expose is_cancellable metadata in flow-bridge parent workflow job responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…erations UI Add cancelRepositoryAgentRun API client and CANCELLED to JobStatus union. Implement cancel button with mutation in GenerateAgentsDialog, gated by is_cancellable flag and operation type. Refactor dialog to tabbed progress/statistics layout. Add ERROR and CANCELLED status icons, badge variants, and filter options to job status and submitted jobs data tables. Add .task/ to .gitignore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add task-12 (cancel workflow action) and task-12.1 (prevent duplicate runs) - Mark completed tasks as Done (task-1.x, task-3.x, task-4.1, task-6–10.x) - Delete superseded task-6 (Dockerfile fix) - Update app_interfaces.md for cancel endpoint and cancellability metadata Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ign preview Migrate agent feedback from Sheet+emoji rating to Dialog+thumbs up/down. Add scrollable layout, sticky header/footer, soft/card toggle variants to UI primitives. Redesign GenerateAgentsPreview with tech stack badges, copy-all action, and proper dialog footer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Connected to Huly®: UNOPL-1461 |
|
Claude finished @JayGhiya's task —— View job PR Review: Agent Cancellation Support and UI/UX ImprovementsThis is a substantial PR implementing two key features: workflow cancellation for agent operations and UI/UX improvements to agent feedback. I've conducted a comprehensive review across code quality, potential bugs, performance, security, and test coverage. ✅ StrengthsExcellent Architecture & Safety
Solid UI/UX Design
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9640f562c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| __table_args__ = ( | ||
| CheckConstraint( | ||
| "status IN ('SUBMITTED','RUNNING','FAILED','TIMED_OUT','COMPLETED','RETRYING','ERROR')", | ||
| "status IN ('SUBMITTED','RUNNING','FAILED','TIMED_OUT','COMPLETED','RETRYING','ERROR','CANCELLED')", |
There was a problem hiding this comment.
Add DB migration before writing CANCELLED workflow states
This change extends the ORM check constraint to include CANCELLED, but there is no accompanying schema migration for existing databases; startup uses SQLBase.metadata.create_all (query-engine main.py), which does not alter existing check constraints. As soon as cancellation paths persist JobStatus.CANCELLED, upgraded environments with the old status_check/codebase_status_check constraints will reject the update at the DB layer, leaving runs in incorrect states and making cancel appear broken.
Useful? React with 👍 / 👎.
| existing.repository_workflow_id, | ||
| workflow_id, | ||
| ) | ||
| existing.repository_workflow_id = workflow_id |
There was a problem hiding this comment.
Keep parent repository_workflow_id immutable on status updates
Blindly rewriting existing.repository_workflow_id from each envelope can corrupt parent workflow identity because codebase failure cascade updates currently send ParentWorkflowDbActivityEnvelope with the child workflow ID (agent_workflow_interceptor.py in _handle_codebase_workflow). With this assignment, a parent run row can be rewritten to a child Temporal ID, so lifecycle actions keyed off repository_workflow_id can target the wrong workflow and stale incorrect IDs may persist if parent finalization does not complete.
Useful? React with 👍 / 👎.
Agent cancellation support and improve agent feedback ui/ux
No description provided.