Review: Day detail page: DayExclusion model and remove-from-list button

review-1474-2026-06-15 Review

review ready

Verdict: READY

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- decomposed from #233, depends on #235
  • [x] Repo -- ldraney/landscaping-assistant
  • [x] User Story -- crew lead/admin removing property from Previously list
  • [x] Context -- explains DayExclusion join table purpose
  • [x] File Targets -- 3 new files, 4 modifications listed
  • [x] Feature Flag -- none (additive behavior, appropriate)
  • [x] Acceptance Criteria -- 5 criteria
  • [x] Test Expectations -- 6 test items with run command
  • [x] Constraints -- Turbo Stream pattern, wday convention, no undo scope
  • [x] Checklist -- standard 3-item checklist
  • [x] Related -- project reference, parent/dependency links
  • [x] Schema section -- bonus: explicit schema definition with constraints and index

Traceability

  • [x] story:weekly-tracking label -- verified in project-landscaping-assistant user-stories table ("Track weekly completion across all active properties")
  • [x] story note verified -- found in project-landscaping-assistant user-stories section
  • [x] arch:rails-app label -- component identified
  • [ ] arch note MISSING -- [SCOPE] No arch-rails-app note exists in pal-e-docs. This is a systemic gap across the entire landscaping-assistant board (all rails-app items lack this note), not specific to this ticket.
  • [x] Forgejo issue -- #236, open, valid URL

File Targets

  • [x] db/migrate/XXXXXX_create_day_exclusions.rb -- to be created (new migration, expected)
  • [x] app/models/day_exclusion.rb -- to be created (new model, expected)
  • [x] app/views/days/_previously_item.html.erb -- to be created or extracted from #235 (noted in issue)
  • [x] app/controllers/days_controller.rb -- does not exist yet; created by dependency #234 (correctly documented)
  • [x] config/routes.rb -- verified exists at config/routes.rb; no days routes yet (added by #234)
  • [x] app/views/days/_previously_section.html.erb -- does not exist yet; created by dependency #235 (correctly documented)
  • [x] spec/requests/days_spec.rb -- to be created (new spec file, expected)
  • [x] Turbo Stream pattern reference -- app/views/work_queue_items/destroy.turbo_stream.erb confirmed to exist with turbo_stream.remove pattern

Repo Placement

OK. Issue filed on ldraney/landscaping-assistant, all file targets are in that repo. Single-repo change.

Dependencies

  • #234 (Day detail page: controller, route, and basic show view) -- OPEN, board item #1472 in backlog. Creates the days_controller.rb and routes that this ticket modifies. Must land first.
  • #235 (Day detail page: "Previously [Day]s" accordion with historical frequency) -- OPEN, board item #1473 in backlog. Creates the _previously_section partial that this ticket adds the remove button to. Must land first. Explicitly documented as dependency in issue.
  • #233 (parent, decomposed) -- OPEN, board item #1471 in backlog. Umbrella issue marked [DECOMPOSED].
  • #237 (Day detail page: property picker for quick-add) -- OPEN, board item #1475 in backlog. Follows this ticket (re-adding excluded properties). No blocking relationship.
Dependencies are correctly documented in the issue Lineage section. Execution order: #234 -> #235 -> #236 (this) -> #237.

Acceptance Criteria

All 5 criteria are concrete, verifiable, and testable by an agent:
  • Clicking remove creates DayExclusion record -- testable via request spec POST
  • Excluded property disappears on reload -- testable via request spec GET after exclusion
  • Weekday-specific exclusion -- testable by excluding Tuesday, checking Wednesday unaffected
  • Turbo Stream response -- testable by checking response format
  • Idempotent duplicates -- testable by double-POST, assert no error and single record
No missing criteria identified.

Blast Radius

  • Property model gains a new has_many :day_exclusions association. Currently has: property_services, services, work_queue_items, service_requests. Adding day_exclusions is low-risk.
  • No existing wday or weekday patterns in the codebase -- this introduces a new concept. The weeks_controller uses date ranges (beginning_of_week) not wday integers, so no collision.
  • The DayExclusion model is self-contained (no callbacks, no side effects beyond query filtering).
  • No downstream consumers affected -- this is a new UI surface on a page that doesn't exist yet.

Decomposition Assessment

3 new files + 4 file modifications = 7 file targets in 1 repo. 5 acceptance criteria. 6 test expectations. Estimated agent time: ~3-4 minutes. Within single-agent pass threshold. No decomposition needed.

Recommendation

The arch:rails-app note gap is systemic across the board and not a blocker for this individual ticket. Flagging for awareness:
  • [SCOPE] Create architecture note arch-rails-app for the Rails application component (systemic gap, not blocking this ticket)
No other action needed. Ticket is well-scoped, dependencies are documented, file targets are accurate for the dependency chain, and acceptance criteria are testable.