Review: Appointment booking and calendar

review-1795-2026-07-06-r3 Review

review approved

Verdict: APPROVED

Re-review (r3) after body fixes. All 4 issues from review-1795-2026-07-06-r2 have been resolved.

R2 Issues Resolved

  • [x] [BODY] Added app/models/lead.rb to File Targets — now lists has_many :appointments association
  • [x] [BODY] Added app/controllers/leads_controller.rb to File Targets — now specifies redirect change and placeholder removal
  • [x] [BODY] Added app/views/leads/booking.html.erb to File Targets — marked for deletion
  • [x] [BODY] Specified lead_id flow in Context — stateless via new_appointment_path(lead_id: @lead.id) redirect, hidden field in booking form

Template Completeness

  • [x] Type
  • [x] Lineage
  • [x] Repo
  • [x] User Story
  • [x] Context
  • [x] File Targets
  • [x] Feature Flag
  • [x] Acceptance Criteria
  • [x] Test Expectations
  • [x] Constraints
  • [x] Checklist
  • [x] Related
All required sections for the Feature template are present.

Traceability

  • [x] story:registration label — Epic 1 (US-1.2–1.4), Role: Visitor/Lead
  • [x] story note verified — found in project-iss user-stories section (row: "registration", backing "Epic 1 (US-1.2–1.4)")
  • [x] arch:rails label — Rails application component
  • [ ] arch note MISSING — [SCOPE] Create architecture note arch-rails for the Rails component in pal-e-docs (carried forward from r2; platform-level gap, not a ticket body issue)
  • [x] Forgejo issue — ldraney/intelligentstaffingsystems#15, open

File Targets

  • [x] app/models/appointment.rb — verified: does not exist, to be created. Architecture.md confirms Appointment entity
  • [x] app/models/lead.rb — verified: exists (line 4 has has_many :messages, no appointments yet). Correctly targeted for adding has_many :appointments
  • [x] db/migrate/xxx_create_appointments.rb — verified: no appointments table in schema.rb, migration needed
  • [x] app/controllers/appointments_controller.rb — verified: does not exist, to be created. security.md documents this controller as skipping auth
  • [x] app/controllers/leads_controller.rb — verified: exists, has placeholder booking action (line 23) and redirect to booking_path (line 16). Both correctly targeted for update/removal
  • [x] app/views/appointments/new.html.erb — verified: directory does not exist, to be created
  • [x] app/views/appointments/create.html.erb — verified: to be created
  • [x] app/views/leads/booking.html.erb — verified: exists (placeholder "coming soon" view). Correctly targeted for deletion
  • [x] app/assets/stylesheets/appointments.css — verified: does not exist, to be created
  • [x] config/routes.rb — verified: exists, has placeholder booking route at line 7. Must be replaced with appointments routes
  • [x] test/models/appointment_test.rb — verified: does not exist, to be created
  • [x] test/controllers/appointments_controller_test.rb — verified: does not exist, to be created
  • [x] docs/user-stories.md — verified: exists, Open Questions #1 (line 315) documents "Calendly embed vs custom booking" — needs update to record custom scheduling decision

Repo Placement

OK — issue filed on ldraney/intelligentstaffingsystems, all file targets are in the same repo. Single-repo ticket.

Dependencies

  • Depends on #8 (Lead model, migration, registration form) — board item #1788 is in validation column. Dependency satisfied.
  • Email deferred to #16 (Postmark integration) — documented in Constraints and Context. No blocking issue.
  • No undocumented blockers found on the board.

Acceptance Criteria

10 ACs — all are clear and testable by an agent. The lead_id flow is now fully specified (stateless via URL param + hidden field). Placeholder cleanup is covered by AC #8. Docs update covered by ACs #9 and #10.

Blast Radius

  • docs/security.md already documents AppointmentsController as skipping auth (lines 50, 108, 183) — good alignment.
  • docs/testing-strategy.md already has a #15 row (line 181) — good alignment.
  • Landing page CTAs link to #book anchor (not a route) — no change needed.
  • Dashboard view has an "Appointments" heading (line 65 of dashboard/show.html.erb) — placeholder, may need wiring in a future ticket.
  • Rate limiting for unauthenticated writes (security.md line 195) — not blocking, follow-up concern.

Decomposition Assessment

13 file targets in 1 repo, 10 ACs. Exceeds the >5 AC threshold, but the work is a cohesive single-feature CRUD flow (model + controller + views + tests + placeholder cleanup). Decomposition would fragment a natural unit. Estimated agent work: ~4 minutes. No decomposition needed.

Recommendations

  • [SCOPE] Create architecture note arch-rails for the Rails component in pal-e-docs (carried forward from r2 — platform-level gap affecting multiple tickets, not specific to this one)
No body or label fixes needed. Ticket is ready for implementation.