Files
PaperClipAI/ui
Devin FoleyandPaperclip d71d039ad7 fix(ui): link routine projects by ID (#23332)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Routines assign repeated work to an agent and an optional project.
> - A routine stores its project ID, but its detail page links to the
project's name-derived URL key.
> - A cached name can stop identifying that project after a rename.
> - This pull request uses the project ID in that link.
> - The link stays attached to the selected project when its name
changes.

## Linked Issues or Issue Description

**What happened?**

The routine detail page prefers a project's name-derived URL key over
its ID. A cached routine page can link to an old project name after a
rename. If another project takes that name, the old link can resolve to
the other project. Saved routine associations, filters, and scheduler
joins already use project IDs.

**Expected behavior**

The project link should identify the routine's selected project by ID.

**Steps to reproduce**

1. Open a routine attached to a project named Operations.
2. Rename the project while the routine page retains its cached project
data.
3. Inspect the routine's project link. Before this change, it uses
`/projects/operations`. After this change, it uses
`/projects/<project-id>`.

## What Changed

- Use the project ID for the project link on the routine detail page.
- Add rendered-link regression tests for a rename, same-name projects,
and an unassigned routine.

## Verification

- Confirmed that the rename and same-name link tests fail before the
fix.
- All 24 focused tests pass across routine page, routine form, routine
list filtering, routine row selection, and company link routing.
- `pnpm --filter @paperclipai/ui typecheck`: passed after building the
fresh worktree's shared and plugin SDK dependencies.
- `node scripts/check-test-budget.mjs --files
ui/src/components/routine-page/RoutinePage.test.tsx`: passed.
- `pnpm verify`: passed on final head
`989dad85d8fc6dfe45cc4490e798dd8da1fb1ff1`. All 309 selected files
passed: 4,012 UI tests and 537 CLI tests passed, with one UI test
skipped. Environment: macOS arm64, Node 25.6.1, pnpm 9.15.4.
- Earlier attempts exposed missing Postgres package library symlinks in
the fresh worktree, then a run invalidated by changed setup inputs. Ran
the dependency's own symlink hydration script and repeated verification
on the stable final checkout. Those earlier attempts are not counted as
passes.
- CI
[typecheck](https://github.com/paperclipai/paperclip/actions/runs/46527285069/job/142231921191),
[build](https://github.com/paperclipai/paperclip/actions/runs/46527285069/job/142231921278),
and
[policy](https://github.com/paperclipai/paperclip/actions/runs/46527285069/job/142231921302)
passed on the final head. All selected test and browser shards passed.
The final [verify
gate](https://github.com/paperclipai/paperclip/actions/runs/46527285069/job/142233704075)
and [e2e
gate](https://github.com/paperclipai/paperclip/actions/runs/46527285069/job/142233695844)
passed on the same head.
- [Greptile
review](https://github.com/paperclipai/paperclip/pull/23332#issuecomment-7293910180):
5/5 on the final head, with no findings.
- No live tenant, deployment, or browser acceptance test was run. This
change only changes a link target.
- Reviewed the complete diff locally for secrets, personal data, and run
artifacts.

## Risks

Low risk. The project page already accepts project IDs and applies its
existing authorization and canonical URL handling. The link's visible
label stays the project name. There is no schema or API change. Revert
the link change to restore the former behavior.

## Model Used

OpenAI Codex, `gpt-6.1-sol`, with xhigh reasoning effort and local 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
- [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: Paperclip <noreply@paperclip.ing>
2026-11-30 14:35:46 -08:00
..
…

@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.