Skip to content

fix(ui): add goal owner picker and delete action to Goals UI (#8822) - #11089

Open
wakqasahmed wants to merge 2 commits into
paperclipai:masterfrom
wakqasahmed:fix/goals-ui-owner-delete-8822
Open

fix(ui): add goal owner picker and delete action to Goals UI (#8822)#11089
wakqasahmed wants to merge 2 commits into
paperclipai:masterfrom
wakqasahmed:fix/goals-ui-owner-delete-8822

Conversation

@wakqasahmed

Copy link
Copy Markdown

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/:id with ownerAgentId and DELETE /api/goals/:id).

Fix

  1. Goal Properties Panel (ui/src/components/GoalProperties.tsx):
    • Added AgentOwnerPicker to select an owner agent or clear ownership ("None").
    • Added an inline confirmation delete section to delete goals from the detail properties view.
  2. Goal Detail View (ui/src/pages/GoalDetail.tsx):
    • Integrated DELETE /api/goals/:id mutation, redirecting to /goals on deletion.
    • Added a confirmation delete button in the header.
  3. Goal Tree & Goals Page (ui/src/components/GoalTree.tsx & ui/src/pages/Goals.tsx):
    • Added hover delete action on GoalTree nodes to allow deleting goals directly from the goals hierarchy tree view.
  4. New Goal Dialog (ui/src/components/NewGoalDialog.tsx):
    • Added owner agent selector chip to assign an owner when creating a goal.
  5. Unit Tests (ui/src/components/GoalProperties.test.tsx):
    • Added test coverage for GoalProperties owner selector and delete rendering.

@commitperclip

commitperclip Bot commented Aug 8, 2026

Copy link
Copy Markdown

Hey @wakqasahmed! Before this PR can be reviewed, a few things need attention:

Missing or incomplete:

  • Missing section: ## Thinking Path
  • Missing section: ## What Changed
  • Missing section: ## Verification
  • Missing section: ## Risks
  • Missing section: ## Model Used
  • Add the dedup-search checkbox to your PR description and check it once you have searched the GitHub PR list for similar PRs. See the PR template at .github/PULL_REQUEST_TEMPLATE.md and CONTRIBUTING.md → "Before You Start: Search First".

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>
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.

Goals UI: cannot set a goal's owner or delete a goal (both supported by the REST API)

1 participant