Files
PaperClipAI/ui
DottaandClaude Opus 5.5 f33db357f7 fix(ui): let Request changes on a plan always take a revision note (#21721)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - In planning work, an agent saves a Plan document and asks the person
to confirm it with a request_confirmation card
> - The card offers "Request changes"; it opens a revision note only
when the request sets rejectRequiresReason, allowDeclineReason or
declineReasonPlaceholder
> - Paperclip's own plan confirmations (runner plan approval) always set
rejectRequiresReason, but an agent that writes its own confirmation may
not
> - Then "Request changes" rejects the plan at once and the person
cannot say what should change
> - This pull request makes plan confirmations always open the revision
note; the note stays optional unless required
> - The benefit is that a plan can always be sent back with a reason,
and the QA plan journey can complete

## Linked Issues or Issue Description

**What happened?**
On the QA Cloud stack the plan-revise-accept journey failed. The agent
saved a correct two-step Plan and a confirmation bound to the latest
revision, with labels "Confirm" / "Request changes" and
`rejectRequiresReason: false`. Clicking "Request changes" rejected the
plan immediately; no revision note opened.

**Steps to reproduce**
1. Create a request_confirmation that targets the issue's `plan`
document without `rejectRequiresReason`.
2. Open the task chat and click "Request changes".
3. The plan is rejected with no note.

**Expected behavior**
"Request changes" opens the revision note so the person can describe the
change, as for Paperclip's own plan approvals.

## What Changed

- `TaskChatCompactInteractionCard`: `collectsRejectReason` is true for
any plan confirmation (issue_document target with key `plan`). The note
label shows "(optional)" when a reason is not required, and the reject
button stays enabled with an empty note.

## Verification

- Red/green: new `TaskChatInteractionCard.test.tsx` case "opens the
revision note for a plan even when the request does not require a
reason" fails on master (the click rejects) and passes with the change.
- `ui` vitest for `src/components/task-chat` and
`IssueThreadInteractionCard`: 68 files, 1119 tests pass. UI typecheck
clean.
- QA Cloud: the plan journey failed at this step in run 43671188287 (the
only failing product step in a 22/24 run). It will be rerun after
deploy.

## Risks

- Low risk. Only plan confirmations change: one extra step (the note
box) before a plan rejection. Non-plan confirmations are unchanged.

## Model Used

- Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use and
code execution.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 04:14:27 +00:00
..
…

@paperclipai/ui

Published static assets for the Paperclip board UI.

What gets published

The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.

Storybook

Storybook config, stories, and fixtures live under ui/storybook/.

pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook

Typical use

Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.

Editor dependency identity

Keep the root and workspace overrides for @codemirror/state, @codemirror/view, and @lezer/common aligned. CodeMirror requires shared extension identity, while Lezer parsers and syntax highlighters require shared NodeProp IDs. Multiple Lezer copies can crash code-block highlighting with tags is not iterable. src/lib/codemirror-single-instance.test.ts checks the installed dependency graph and highlights sample code through the editor's real language dependencies. GitHub Actions owns regeneration of pnpm-lock.yaml.