mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-19 16:29:42 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - People reach the app from links written outside it: onboarding emails and docs pages > - A link written outside the app cannot know the company prefix of the reader, so it must use a path without a prefix > - The app forwards a path without a prefix to the company of the reader for Tasks, Agents, Skills, Routines and other pages > - Four core pages are not on that list: Dashboard, Connectors, Chat and Inbox. A link to `/apps` shows "Not found" > - This pull request adds those pages to the list, with the same redirect component and no new logic > - The benefit is that an email or a docs page can link to Connectors, Chat, Inbox or the Dashboard with one fixed path ## Linked Issues or Issue Description Related: #17858 does the same for approval links. **What happened** A link to `/apps` on an instance shows the "Not found" page. The router reads `apps` as a company prefix. The same occurs for `/chats`, `/inbox` and `/dashboard`. An onboarding email that tells a person to set up a connector cannot link to the Connectors page. **Expected behavior** A link without a company prefix opens the same page in the company of the reader. `/issues`, `/agents`, `/skills` and `/routines` do this today. **Steps to reproduce** 1. Sign in to an instance that has one company. 2. Open `/issues`. The app goes to `/<PREFIX>/issues`. 3. Open `/apps`. The app shows "Not found". **Version or commit** `323504e41e` on `master`. **Deployment mode** All modes. I found it on a Paperclip Cloud instance. ## What Changed - `ui/src/App.tsx`: add `dashboard`, `apps`, `apps/connect`, `chats` and `inbox` to the routes that use `UnprefixedBoardRedirect`. - `ui/src/App.deep-link-routing.test.tsx`: add a test that renders the real `<App>` route table. It checks each new path. It checks that a connect link keeps its query string and opens the connect page. It checks that a connect link with no connector goes to the Connectors list. It checks that a path that is not registered stays unresolved. ## Verification - `pnpm --filter @paperclipai/ui exec vitest run src/App.deep-link-routing.test.tsx` passes. Seven tests. - The same file fails when the change to `App.tsx` is removed. - `pnpm --filter @paperclipai/ui exec vitest run src/App.test.tsx src/App.activity-routing.test.tsx src/App.cases-routing.test.tsx src/App.onboarding-launcher.test.tsx src/App.deep-link-routing.test.tsx` passes. Forty-four tests. - `pnpm --filter @paperclipai/ui typecheck` passes. - I did not run the full `pnpm test:run` and `pnpm build`. The change is five route lines and one test file. - Manual check after deploy: open `/apps`, `/apps/connect?source=notion`, `/chats`, `/inbox` and `/dashboard` on an instance. Each one opens under the company prefix. ## Risks Low risk. - The change adds routes only. It uses the redirect component that Tasks and Agents use. It adds no server route, no API call and no permission. - The redirect is a client-side `Navigate` to the same path under the company prefix. All access checks stay on the prefixed route. The connect page keeps its own entry policy. - Before this change, each of these five paths showed "Not found". No working link changes behavior. - `dashboard`, `apps`, `chats` and `inbox` are reserved route roots in `ui/src/lib/company-routes.ts`. They cannot be a company prefix. - A person with more than one company lands in the selected company, or the first one. This is the existing behavior for `/issues`. - I kept the scope narrow on purpose. There is no `apps/*` wildcard. Settings paths are not in this change: `/settings` forwards today through a different redirect that filters hidden settings, and I did not add a second way in. - Out of scope: the Paperclip Cloud entry address forwards a person into their workspace and drops the path. That code is not in this repository. A fixed link for every reader needs that change too. ## Model Used Claude Fable 5.2 (`claude-fable-5-2`) from Anthropic, in Claude Code. It used tool use, code execution and extended thinking. It wrote the change, the test and this description. Michael Nguyen directed the work and reviewed it. ## 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 — *No doc lists these paths. I did not add one.* - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green — *Pending on this pull request.* - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups — *Pending.* - [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 Fable 5.2 <noreply@anthropic.com>