Completes this feature's P1 MVP scope. Agent dashboard (US1) consumes
011-agent-ticket-queue's new endpoint with a distinct "no agent profile
linked" state, never conflated with a genuine empty list. Ticket
workbench (US2) covers messages (customer-visible vs internal notes),
status transitions, manual escalation, and the full investigation ->
root-cause -> solution -> implementation -> verification -> resolution
workflow, every stage surfacing the backend's own 409/400 rejection
verbatim rather than pre-validating order client-side. Support-org admin
(US3) covers team/agent/skill CRUD, linking an agent's account (011's
new PATCH field), and a hierarchy-node editor with real cycle-detection
error surfacing.
Two real backend-contract mismatches caught and fixed before shipping,
found by re-verifying schemas directly against the actual branch after
an isolated research agent (run in a worktree based on stale main,
missing the unmerged 009-problem-resolution branch) reported wrong
information: getTicketMessages was hitting the customer-safe endpoint
instead of the agent-facing one that includes internal notes, and
postMessage's body shape didn't match the real {type, body} schema.
Verified with 8 real Playwright E2E scenarios against a live, locally-
running supporthub-api (not mocks), plus 18 unit/integration tests.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Configures both previously-empty test runners (vitest.config.ts,
playwright.config.ts) and adds the typed lib/api client layer (axios +
interceptors), the session-cookie plumbing (lib/auth), TanStack Query
infrastructure (lib/query, providers), and a real sign-in flow consuming
supporthub-api's own login (010-identity-auth) - the true foundation
every other user story in this feature depends on.
Two structural fixes to the existing scaffold, both found only by
running the app rather than by inspection: middleware.ts belongs at
src/middleware.ts under this project's src/ layout, not the repo root;
and next.config.mjs's output:'export' is incompatible with Next.js
Middleware outright (the dev server refuses to start it), so this app
now runs as a standard Next.js server - confirmed with the user before
making that deployment-mode change.
Verified end-to-end with a real, locally-running supporthub-api: all 5
Playwright scenarios (unauthenticated redirect, sign-in, wrong-password
generic error, non-admin role gating, sign-out) pass against a live
backend, not a mock.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>