Files
PaperClipAI/ui/src/components/chat
597992d955 fix(ui): open the chat side drawer on the chat's task list (#23702)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Agent Chat lets a person talk to one agent. The chat header has a
button that toggles the right side drawer.
> - In a new chat, the button did nothing. The desktop panel did not
show content until the chat was saved by the first message.
> - In the coordinator workspace, the drawer opened on an empty
launcher. It did not show the tasks from the chat.
> - The user expects the button to open a list of the tasks that the
chat created or that its agent worked on.
> - This pull request makes the drawer open on that task list in both
cases.
> - The benefit is that the header button always does something useful
in a chat.

## Linked Issues or Issue Description

**What happened?**
In the chat view, the button in the top right toggles the right side
drawer. In a new chat, a click on the button does nothing. In the
coordinator workspace, the drawer opens empty.

**What did you expect to happen?**
The button opens the drawer with a list of the tasks that the chat
created or worked on.

**Steps to reproduce**
1. Turn on Agent Chat.
2. Open a chat with an agent that has no saved conversation.
3. Click the drawer button in the top right of the header.
4. The drawer does not open.

## What Changed

- `IssueDetail.tsx`: For an unsaved chat on desktop, the panel now shows
a read-only task list. The full side panel still needs a saved issue,
because its Properties tab writes to the issue.
- `AgentWorkPanels.tsx`: Add `AgentChatDraftTasksPanel`. It shows the
agent's tasks. In the coordinator workspace, it shows the empty list of
tasks from the conversation.
- `TaskSidePanel.tsx`: In the coordinator workspace, a saved chat now
opens on its Tasks tab ("Tasks from this conversation") and not on the
empty launcher. Other tasks keep the empty, on-demand panel.
- Add `IssueDetail.agentChatPanel.test.tsx` with four desktop tests: a
saved chat, an unsaved chat, a saved coordinator chat, and an unsaved
coordinator chat.

## Verification

- `cd ui && npx vitest run src/pages/IssueDetail.agentChatPanel.test.tsx
src/pages/IssueDetail.mobile.test.tsx`: 7 tests pass.
- Red-green: before the fix, the unsaved-chat test failed because the
drawer stayed hidden. The coordinator test failed when I removed the
`TaskSidePanel.tsx` change.
- `pnpm verify`: 4,214 tests pass in 260 of 261 selected files. One
test, `codemirror-single-instance.test.ts`, timed out at 5 s under load.
It walks `node_modules` and does not touch this change. It passes alone
(10/10).
- `npx tsc --noEmit -p ui`: no errors in changed files. The only errors
come from Storybook feature-map files that need generated indexes. Those
indexes are not in git.
- I did not do a manual browser check. The local preflight build did not
finish in time.

## Risks

- Low risk. The change applies only to Agent Chat routes.
- In the coordinator workspace, a chat's drawer now opens on Tasks and
not on the launcher. The user can still open other tabs from the
launcher.
- The unsaved-chat task list in the classic workspace shows all the
agent's tasks. That is the same list as the saved chat's default Tasks
tab.

## 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
- [ ] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] 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: devinfoley <139239+devinfoley@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:46:32 -08:00
..