--- issue: "009" title: "archiveConversation uses PUT but backend only accepts PATCH" severity: major domain: chat labels: [frontend, bug] status: open created: 2026-05-29 source: Doc vs Code Audit 2026-05-29 --- # 🟠 archiveConversation uses PUT but backend only accepts PATCH **Severity:** major **Domain:** chat **Labels:** frontend, bug ## Description `frontend/src/actions/chat.ts` (line ~289) calls `axiosInstance.put(endpoints.chat.archive, ...)`. The backend registers this route as `PATCH /api/chat/:id/archive`. Express treats PUT and PATCH as distinct methods; PUT will not match the PATCH handler and returns 404/405. ## Current Behavior Attempting to archive a conversation from the UI sends `PUT /api/chat/:id/archive` → 404. The chat is not archived. ## Expected Behavior `archiveConversation` should use `axiosInstance.patch(...)` to match the backend's PATCH registration. The endpoint also has toggle semantics — calling it on an archived chat unarchives it. ## Affected Files - `frontend/src/actions/chat.ts` — `archiveConversation` method verb (`put` → `patch`) ## References - [Doc vs Code Audit Report](../09%20-%20Audits/Doc%20vs%20Code%20Audit%20Report%20-%202026-05-29.md) — Finding C20