mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-16 03:31:44 +01:00
## Thinking Path
> - Paperclip is the open source app people use to manage AI agents for
work
> - The QA Cloud plan-revise-accept journey checks that a person can
revise and approve an agent's Plan
> - It first checks that the saved Plan chip is visible, scoped to a
settled `task-chat-turn` so a live "Writing plan" chip cannot count
> - The Coordinator workspace renders the Plan chip directly in the chat
thread; there is no `task-chat-turn` element and no `data-settled`
attribute
> - So the journey never finds the chip and fails before the person
reviews the plan
> - This pull request also accepts the chip in the chat thread
> - The benefit is that the plan journey reaches the revision and
approval steps it exists to test
## Linked Issues or Issue Description
**What happened?**
On QA Cloud (build 5acf27bc), plan-revise-accept failed with
`journey_operation_failed`, no checks passed, one run. The agent saved a
correct two-step Plan and a revision-bound confirmation. The
confirmation stayed pending until cleanup closed the task, so the
browser never reached it.
**Steps to reproduce**
1. Open the failed journey task on QA (Coordinator workspace).
2. Query `[data-testid="task-chat-turn"][data-settled="true"]
[data-testid="task-chat-plan-preview"]`: 0 matches.
3. Query `[data-testid="task-chat-thread"]
[data-testid="task-chat-plan-preview"]`: 1 visible match, aria-label
"Open Plan revision 1 in task sidebar".
**Expected behavior**
The journey finds the saved Plan chip and continues to "Request
changes".
## What Changed
- `planStageRootSelector(native)`: native root is a settled task-chat
turn or the task chat thread. `expectPlanStageVisible` uses it. The
revision-name check from #21701 is unchanged.
Why this still detects the failure that matters:
`runPlanRevisionAcceptance` waits through the API until every task run
is terminal before this check, and the aria-label must name the exact
revision, which a live "Writing plan" chip does not.
## Verification
- On the live failed QA page: old scope finds 0 chips; new scope finds 1
visible chip whose label matches `planPreviewLabel(1)`.
- `tests/runner-e2e` plan-revision tests: 4 pass (new selector test
included).
- QA Cloud rerun of plan-revise-accept follows after merge and the
harness pin update.
## Risks
- Low risk: journey code only.
## 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>