# Add a Watchlist Page to a Nuxt App from a Linear Issue

An agent adds a localStorage watchlist and a /watchlist page to a Nuxt movie app, reusing its media card, with 11 new tests and a clean build.

[Run this on Rush](https://cloud.getrush.ai/run/add-watchlist/nuxt/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent read the detail page `app/pages/[type]/[id].vue`, `app/components/media/Card.vue`, the `Media` type and the existing Nuxt tests. `MediaCard` took a full `Media`, so it narrowed the prop to a `Pick` of the six fields the card draws, which lets a stored entry render through the same card.

`app/composables/watchlist.ts` is the one state path, a Nuxt `useState` keyed `type:id` so movie 10 and TV show 10 stay apart. The server and first client render start empty and not ready; the list is read from `movies:watchlist:v1` after mount and synced across tabs. On `app/pages/watchlist.vue` each remove button sits beside the card's link, not inside it.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "A Linear issue labeled agent asks for a visitor watchlist in our Nuxt movie app: add/remove movies, persist the list in localStorage and render /watchlist using the existing media card. Read the media detail page, card, shared Media type and existing Nuxt tests. Keep a single shared watchlist state path with stable movie identity and duplicate prevention. Avoid browser storage during SSR, define hydration behavior and provide an empty state and accessible remove action without nesting buttons inside the card's NuxtLink. Do not add accounts or a backend. Test add/remove, repeat clicks, reload restoration and a server render without localStorage. Run pnpm test:unit --run, pnpm lint, pnpm typecheck and pnpm build using the repository's declared runtime. Open a pull request linking the supplied Linear issue and list actual test/build results, including external-service limits.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

Tried on nuxt/movies at 4d05739: 10 files changed, 354 insertions(+), 5 deletions(-). The issue was described in the request, written for the trial; the run was given no Linear issue, so there is no link. The sandbox had Node 22, so the agent installed Node v24.22.2 and pnpm 11.1.2, as `package.json` declares. `pnpm test:unit --run` went from 80 to 91 passed (1 skipped), and lint, typecheck and `pnpm build` (`Build complete in 9.87s!`) exited 0. The built server answered `curl /watchlist` with 200 and no empty-state text. No pull request was opened.

For the reviewer: entries store a snapshot (title, poster, rating), which needs no network but can go stale, and new strings exist only in `en.json`. There is no Nuxt-level SSR test, and Playwright and TMDB were not run.

## Run it on every Linear issue labelled frontend

An automation with a `linear` trigger on `linear.issue.labeled` and the label `frontend` runs the recipe's saved prompt with the issue as context. An issue that keeps storage local to the browser, as this one did, keeps accounts and a backend out of the change.

## Why run it on Rush?

The tricky part of a localStorage feature in Nuxt is the first render. This run made the server and the first client render agree on an empty, not-ready list, showed a placeholder instead of flashing the empty state, and checked the built server's `/watchlist` HTML for it.

## Frequently asked questions

### Why is there no watchlist button on the home page hero?

The home and list pages wrap `MediaHero` in a `NuxtLink`, and the request rules out a button nested inside a link. The hero takes an optional `type` prop that only the detail page passes, which turns the button on.

### What does the noise in the unit test output mean?

A `[NUXT_B7021]` client build manifest message prints in the unit tests before and after the change, with exit 0. It came with the repository, not the watchlist.

## More Nuxt jobs

- [Debug a Front-End Bug in a Nuxt App Together](https://getrush.ai/run/debug-together-in-browser/nuxt/)
- [Dockerize a Nuxt App](https://getrush.ai/run/dockerize-app/nuxt/)
- [Fix Mobile Layout Bugs in a Nuxt App](https://getrush.ai/run/fix-mobile-layout/nuxt/)

## More jobs like this: Turn a Linear label into a PR

- [Add Webmentions to an Eleventy Blog](https://getrush.ai/run/add-webmentions/eleventy/)
- [Add WebSockets to a Leptos App](https://getrush.ai/run/add-websockets/leptos/)
- [Add a WebSocket Endpoint to a Vapor App from a Linear Issue](https://getrush.ai/run/add-websockets/vapor/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
