Review: Appointment scheduling: 24hr advance, text and attachments (re-review)

review-1824-2026-07-18-v2 Review

review approved

Verdict: APPROVED

Re-review after body refinements. All three [BODY] issues from review-1824-2026-07-18 are resolved.

Template Completeness

  • [x] ### Type — Feature
  • [x] ### Lineage — Related to #15
  • [x] ### Repo — ldraney/intelligentstaffingsystems
  • [x] ### User Story — As a lead or client...
  • [x] ### Context — Clear background on 24hr rule and scheduling flow
  • [x] ### File Targets — 7 files to create/modify, 2 files to remove, 1 exclusion
  • [x] ### Feature Flag — None (core workflow, acceptable)
  • [x] ### Acceptance Criteria — 10 items, all testable
  • [x] ### Test Expectations — 9 items + run command
  • [x] ### Constraints — 4 items (server-side enforcement, session-based lead_id, ActiveStorage, strong params)
  • [x] ### Checklist — Present
  • [x] ### Related — Present (project-iss, #15, #52)

Traceability

  • [x] story:communications label — present on board item
  • [ ] story note — "communications" not listed in project-iss user-stories section. Known gap (3 board items use this key, including done item #1822). [SCOPE] Register "communications" story key on project-iss or map to existing "messaging" (Epic 4).
  • [x] arch:rails label — present on board item
  • [ ] arch note — arch-rails note does not exist. Known systemic gap across ISS tickets. [SCOPE] Create architecture note arch-rails.
  • [x] Forgejo issue — #54, open

File Targets

  • [x] app/controllers/appointments_controller.rb — verified: does not exist, to be created
  • [x] app/views/appointments/new.html.erb — verified: does not exist, to be created
  • [x] app/views/appointments/_confirmation.html.erb — verified: does not exist, to be created
  • [x] app/models/appointment.rb — verified: does not exist, to be created. Lead model exists for FK reference.
  • [x] app/assets/stylesheets/appointments.css — verified: does not exist, to be created (matches existing convention)
  • [x] db/migrate/XXX_create_appointments.rb — verified: correctly specifies CREATE TABLE with lead_id, scheduled_at, topic, notes, status (previous review fix confirmed)
  • [x] config/routes.rb — verified: placeholder get "booking", to: "leads#booking" exists at line 7 (previous review fix confirmed — now in File Targets)
  • [x] app/controllers/leads_controller.rb — verified: booking action at line 31 (listed in "Files to remove")
  • [x] app/views/leads/booking.html.erb — verified: exists (listed in "Files to remove")
  • [x] app/controllers/communications_controller.rb — correctly excluded (button linking to booking_path already exists in _contact_cards.html.erb:50)

Repo Placement

OK — single-repo change in ldraney/intelligentstaffingsystems. All file targets are in this repo.

Dependencies

  • #52 (Communications tab, board item #1822) — DONE. The "Set an Appointment" button exists in _contact_cards.html.erb linking to booking_path. Dependency satisfied.
  • #15 (Appointment booking and calendar) — Lineage reference. This ticket implements what #15 originally scoped.
  • ActiveStorage — configured (migration 20260706183426_create_active_storage_tables exists). No blocker.
  • Lead model — exists at app/models/lead.rb. FK target confirmed.
  • No in_progress items block this ticket.

Acceptance Criteria

All 10 criteria are testable by an agent. Test expectations align well (9 test cases covering auth, validation, happy path, attachments). Run command is specific and correct.

Blast Radius

  • app/controllers/leads_controller.rb line 23 — redirects to booking_path after lead creation. Implementing agent should keep booking_path as a named route alias (e.g. get "booking", to: "appointments#new", as: :booking) or update this redirect.
  • app/views/communications/_contact_cards.html.erb line 50 — uses booking_path. Same route alias concern.
  • test/controllers/leads_controller_test.rb lines 32, 79-80 — tests booking redirect and placeholder. Need update/removal.
  • test/controllers/communications_controller_test.rb line 114 — tests appointment card links to booking_path.
  • Assessment: a route alias preserves backward compatibility. The implementing agent will naturally handle this when they see the codebase. Not a scope gap — standard Rails refactoring.

Decomposition Assessment

7 file targets + 2 removals in 1 repo. 10 acceptance criteria (exceeds 5 threshold). However, all work is cohesive (single controller + model + views + migration + route), user preference is inclusive tickets, and estimated agent time is under 5 minutes. No decomposition needed.

Recommendation

All [BODY] fixes from the previous review are confirmed resolved. Two [SCOPE] items remain as informational carry-forwards (systemic project-level gaps, not blockers):
  • [SCOPE] Register "communications" story key in project-iss user-stories section (3 board items use it; #1822 already shipped).
  • [SCOPE] Create architecture note arch-rails (systemic gap across all ISS rails tickets).
Neither blocks implementation. Ticket is technically complete, all file targets verified, scope is actionable.