Files
PaperClipAI/tests
scotttongandScott Tong 17f9105a23 fix(ui): open agent chat from the task transcript (#23004)
## Thinking Path

> - People use Paperclip to manage AI agents and their work.
> - A task shows the agent's name and avatar beside its run status.
> - People can use that identity to follow up with the agent.
> - The link opened the agent's settings. This added a second step to
reach the conversation.
> - This change opens the agent's existing one-on-one chat directly from
the task.

## Linked Issues or Issue Description

**What happened?**

Clicking an agent's name beside its run status in a task opened the
agent overview.

**Expected behavior**

The link should open that agent's chat in the same company.

**Steps to reproduce**

Open a task with an agent run. Click the avatar or name beside the run
status. Check the destination and use browser Back to return to the
task.

**Paperclip version or commit**

Reproduced on e18fe61c8f.

Related work: #13283 introduced the shared task and agent chat surface.

## What Changed

- Use the task's agent roster to build the company-scoped chat link. Use
the agent ID for a missing or terminated roster member.
- Keep the link to the agent overview inside direct chat.
- Add a regression test for task and direct chat links.

## Verification

- The Chromium end-to-end test passed against the built UI. It clicks
the company-scoped agent link in the task, opens the saved conversation,
and checks the overview link inside direct chat.

- The focused task thread suite passed 434 tests and skipped one: `pnpm
exec vitest run ui/src/components/TaskChatThread.test.tsx`.
- In Chrome, clicked the named link beside a native run. Verified the
company, agent, existing conversation, and Back navigation. Verified
keyboard activation, the assignee menu, and the settings link from
direct chat.
- All 224 selected UI test files passed locally before adding the
regression test. Three CLI worktree tests could not start their embedded
PostgreSQL instances because the machine was out of shared-memory slots.

## Risks

The task and direct chat share the identity component. The test checks
both destinations to guard against a self-link inside direct chat.

## Model Used

OpenAI GPT-6 via Codex, with local code execution and browser testing.

## 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
- [ ] 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
- [ ] 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

---------

Co-authored-by: Scott Tong <scott@scotts-mbp-m5-max.local>
2026-11-26 00:23:21 +00:00
..
…