{"agent":"claude","input":"Move this app's Zustand auth store from hand-written cookie persistence to the persist middleware. Read package.json, pnpm-lock.yaml (the zustand version), vite.config.ts, eslint.config.js, .github/workflows/ci.yml, src/stores/auth-store.ts, src/lib/cookies.ts and its test, src/test-utils/cookies.ts, src/main.tsx, and the sign-in form and sign-out dialog with their tests first. Wrap the store in persist from zustand/middleware with: the existing cookie name; createJSONStorage over a StateStorage adapter built on getCookie, setCookie and removeCookie that URI-encodes values, so the token stays in a cookie with the same max-age; partialize that keeps only auth.user and auth.accessToken; and a merge function that spreads the saved fields into the current auth object so its actions survive rehydration. Remove the manual cookie calls from the actions. Existing visitors have a cookie holding a bare JSON string token under the same name: keep them signed in by converting that value in the adapter's getItem, and test it. In merge, drop a restored user whose exp is in the past, along with the token. Add src/stores/auth-store.test.ts in the project's browser mode covering: the stored shape, a reload that restores user and token with working actions, what the default shallow merge would have done, an old-format cookie, a malformed cookie, a token containing a semicolon, an expired user, reset, and persist.clearStorage(); use persist.rehydrate() to reread the cookie between steps. Do not change the component tests that mock the store. Run pnpm install --frozen-lockfile, pnpm test:browser:install, pnpm test, pnpm lint, pnpm format:check and pnpm build, paste the output, and open a pull request that explains each persist option and what breaks without it.","resources":[{"url":"https://github.com/your-org/your-app"}]}