## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Agent Chat lets people discuss work and review the plans and documents it produces. > - A document link in Chat promises to open the sidebar. It currently moves the reader to Tasks. > - Readers need to see the document and the conversation together, even when the window is narrow. > - This pull request opens the document in Chat, frees space for reading, and gives readers a link to the source task. > - Readers can review the saved revision in context and open the task when they need its details. ## Linked Issues or Issue Description Refs #11226 for the document sidebar that this change builds on. **What happened?** Opening a saved plan from Agent Chat changed the route to Tasks. The document could show the same title twice. At narrow desktop widths, the chat list left too little space for the conversation beside the document. A task opened by UUID could still show a Chat header. **Expected behavior** The sidebar shows the saved revision beside the current conversation. It shows a matching title once. The chat list collapses when space is tight. The source link opens the standard task header with status, name, and ID. **Steps to reproduce** 1. Open an Agent Chat with a saved plan and select its sidebar link. 2. Use a narrow desktop window and inspect the conversation and plan. 3. Open the task that owns the plan and inspect the breadcrumb. **Paperclip version or commit** Reproduced on source commit `8285a81280`. **Deployment mode** Local trusted development instance with synthetic data. ## What Changed - Open sidebar document links on the current Chat route. Keep the requested revision and document owner, including links inside another task’s preview. Provide an **Open source task** link. - Show one title when the document title matches the opening Markdown heading. - Collapse the desktop chat list when an artifact tab would leave less than 420 px for the conversation. Keep **Browse chats** in the header with access to saved chat history. Restore the list when there is room. - Use the task breadcrumb on task URLs, with the short UUID for a conversation-backed task without a number. ## Verification - Ran 618 focused Vitest tests across 18 UI files on the published revision `2ff6c9e931`. All passed. - Ran `pnpm --filter @paperclipai/ui typecheck`. It passed. - Checked the synthetic demo in Chromium. Opened the plan in Chat, checked the title, resized the window, and followed **Open source task** to check its breadcrumb. Also verified a link inside a preview owned by another task. - Reproduced the chat navigation failure from the CI trace. The same Playwright test passed locally after limiting collapse to artifact tabs. - GitHub CI passed on `2ff6c9e931`, including build, typecheck, and all browser shards. The remaining jobs passed on a retry after runner shutdowns and a server handover test failure. The handover suite also passed locally (19 tests). [GitHub CI](https://github.com/paperclipai/paperclip/actions/runs/44423540581/attempts/2) - `pnpm verify` selected broader CI coverage because `doc/PRODUCT.md` changed. The full local suite was not run. ## Risks The chat list changes visibility when an artifact tab is active and the available width crosses the threshold. The list stays mounted to keep its search text. Document tabs use the existing read API and check the owning company. This change adds no database migration or API contract change. ## Model Used OpenAI Codex (GPT-6), with repository tools, shell execution, and Chromium. ## 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 linked existing issues or described the issue in-PR following the relevant issue template - [x] I have used public GitHub references for linked work - [x] My branch name describes the change and contains no internal Paperclip ticket ID - [x] I have run focused 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 - [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 --------- Co-authored-by: Scott Tong <1504818+scotttong@users.noreply.github.com> Co-authored-by: Paperclip <noreply@paperclip.ing>
@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.