Worker for the floor-plan read-only occupancy viewer, including React UI, state wiring, and regression tests
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use this skill for features that touch the floor-plan experience in src/components/features/seating/**, the related App Router entrypoints under src/app/app/(app)/floor-plan and src/app/app/(app)/seating/**, supporting floor-plan hooks/helpers, and the regression tests that prove the read-only contract.
vercel-react-best-practices — invoke before editing React/Next.js components so the implementation follows current React/Next.js performance and composition guidance.agent-browser — invoke for manual browser verification after implementation. Use the authenticated /floor-plan route first and the dev harness only if auth/bootstrap is blocked.Read the assignment carefully.
AGENTS.md, the mission AGENTS.md, and .factory/library/architecture.md.Understand the current behavior.
FloorPlanPage, FloorCanvas, TableInspector, useFloorPlanTables, and any touched route files.Write tests first (RED).
tests/ops/useFloorPlanTables.test.tsx or the relevant test file.Implement the feature (GREEN).
src/components/ui.FloorPlanPage orchestration-only; avoid reintroducing navigation-side effects.src/components/features/seating/floor-plan/lib/status.ts.Make tests pass.
Run validators.
.factory/services.yaml..factory/services.yaml.pnpm typecheck.Manual verification with agent-browser.
http://app.localhost:3000/auth/signin using the validator credentials documented in .factory/library/user-testing.md.http://localhost:3000/dev/ops-floor-plan and document the fallback.Commit and hand off.
{
"salientSummary": "Removed booking CTAs from FloorPlanPage and TableInspector, introduced a read-only context header and idle panel copy, and added component tests proving no mutation controls remain. Ran targeted vitest in red/green order, then passed the mission lint/typecheck/test commands and verified the authenticated /floor-plan route on desktop and mobile.",
"whatWasImplemented": "Refactored the floor-plan shell into a read-only orchestration surface: dropped router-driven booking actions, replaced action-oriented header/inspector copy with passive read-only messaging, preserved zone/date/search/time controls, and kept route redirects unchanged. Added regression tests covering CTA removal, idle-state copy, and selection-driven detail rendering.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "npx vitest run tests/components/floor-plan/FloorPlanPage.test.tsx --reporter=verbose",
"exitCode": 1,
"observation": "RED: new assertions failed because New booking/Browse bookings buttons were still rendered."
},
{
"command": "npx vitest run tests/components/floor-plan/FloorPlanPage.test.tsx --reporter=verbose",
"exitCode": 0,
"observation": "GREEN: updated shell and inspector tests all passed."
},
{
"command": "npx vitest run --maxWorkers=9",
"exitCode": 0,
"observation": "Mission test command passed."
},
{
"command": "npx eslint \"src/components/features/seating/**/*.{ts,tsx}\" \"src/app/app/(app)/floor-plan/page.tsx\" \"src/app/app/(app)/seating/page.tsx\" \"src/app/app/(app)/seating/floor-plan/page.tsx\" \"src/app/(public)/dev/ops-floor-plan/**/*.{ts,tsx}\" \"tests/**/*.{ts,tsx}\"",
"exitCode": 0,
"observation": "Mission lint command passed."
},
{
"command": "pnpm typecheck",
"exitCode": 0,
"observation": "TypeScript passed with no new errors."
}
],
"interactiveChecks": [
{
"action": "Logged in at http://app.localhost:3000/auth/signin, opened /floor-plan on desktop, and confirmed the header showed only read-only context with no booking buttons.",
"observed": "No New booking/Browse bookings actions remained and the route stayed on /floor-plan."
},
{
"action": "Selected a table on desktop, then opened the same flow on a mobile viewport.",
"observed": "Desktop panel and mobile sheet showed the same read-only fields and no action buttons."
}
]
},
"tests": {
"added": [
{
"file": "tests/components/floor-plan/FloorPlanPage.test.tsx",
"cases": [
{
"name": "renders no booking CTAs in the shell",
"verifies": "The read-only redesign removes booking-navigation and assignment controls."
},
{
"name": "opens passive table details on selection",
"verifies": "Selecting a table shows the expected read-only fields only."
}
]
}
]
},
"discoveredIssues": []
}