name: frontend-pages-router description: Change or review the Next.js frontend in this repository. Use when work touches frontend/pages, frontend/components, frontend/services, auth UX, article detail flows, sitewide chat UI, browser-only state, or Pages Router behavior.
Frontend Pages Router
Preserve client-side behavior before refactoring structure.
Follow This Workflow
- Identify the route or component that owns the behavior.
- Check for browser-only dependencies such as
localStorage, cookies,window, and shallow routing. - Preserve query syncing and debounce behavior on
/home. - Preserve article detail flows across favorites, comments, ratings, related content, bias analysis, and chat.
- Validate with
cd frontend && npm run lint; add Playwright when the change affects route behavior or interactions.
Use The References
- Read
references/frontend-map.mdfor high-risk routes and components. - Read
references/chat-ui.mdwhen the task touches the sitewide chat page.