fix(ui): add goal owner picker and delete action to Goals UI (#8822) - #11089
Open
wakqasahmed wants to merge 2 commits into
Open
fix(ui): add goal owner picker and delete action to Goals UI (#8822)#11089wakqasahmed wants to merge 2 commits into
wakqasahmed wants to merge 2 commits into
Conversation
|
Hey @wakqasahmed! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
…ction Adversarial review of PR paperclipai#11089 (goal owner picker + delete action) found two real gaps and a test-coverage hole, all fixed here: - Delete and owner-reassignment mutations (GoalDetail.tsx, Goals.tsx) had no onError handler. A failed delete (e.g. a goal still referenced by linked issues/child goals, which the DB rejects via FK constraint since there is no cascade) or a failed owner update silently left the user with no feedback. Both mutations now track and render an inline error message next to their confirm controls, matching the existing actionError pattern used elsewhere in the UI (see AgentDetail.tsx). - The new icon-only delete button in GoalTree.tsx only had a title attribute. Per this codebase's existing convention for icon-only controls (AgentActionButtons, AgentCapsule, etc.), added an aria-label so it announces correctly to assistive tech. - Added interaction tests for GoalProperties (delete confirm/cancel/ pending/error states, owner reassignment to an agent and to none) and for the Goals list delete flow (confirm/decline/error surfaced), none of which had coverage before. Verified server-side write-path membership checks (viewer/inactive member rejection on PATCH/DELETE /goals/:id) already exist and are covered by write-path-membership.test.ts — no backend change needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8822
Summary
The Goals UI previously lacked controls to (1) assign or change a goal's owner agent, and (2) delete a goal, even though both operations are supported by the backend REST API (
PATCH /api/goals/:idwithownerAgentIdandDELETE /api/goals/:id).Fix
ui/src/components/GoalProperties.tsx):AgentOwnerPickerto select an owner agent or clear ownership ("None").ui/src/pages/GoalDetail.tsx):DELETE /api/goals/:idmutation, redirecting to/goalson deletion.ui/src/components/GoalTree.tsx&ui/src/pages/Goals.tsx):ui/src/components/NewGoalDialog.tsx):ui/src/components/GoalProperties.test.tsx):GoalPropertiesowner selector and delete rendering.