Review: Day detail page: "Previously [Day]s" accordion with historical frequency
Verdict: READY
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
Traceability
- [x] story:weekly-tracking label — "Track weekly completion across all active properties"
- [x] story note verified — found in project-landscaping-assistant user-stories table
- [x] arch:rails-app label — Rails application component
- [ ] arch note MISSING — [SCOPE] No
arch-rails-appnote exists in pal-e-docs. Platform-wide gap, not specific to this ticket. - [x] Forgejo issue — #235, open
File Targets
- [x]
app/views/days/_previously_section.html.erb— new file to create, correct - [x]
app/controllers/days_controller.rb— to be modified; does not exist yet (created by dependency #234, board item #1472). Correct: this ticket depends on #234. - [x]
app/views/days/show.html.erb— to be modified; does not exist yet (created by dependency #234). Correct. - [x]
app/javascript/controllers/accordion_controller.js— verified exists, haskeyValuepattern at line 23. Marked "do not touch" in issue. - [x]
app/controllers/work_queue_items_controller.rblines 231-245 — verified:compute_unqueued_this_weekmethod with DOW extraction pattern exactly as described. Marked "do not touch" in issue. - [x]
Property.activescope — verified atapp/models/property.rbline 9
Repo Placement
OK. Issue filed on ldraney/landscaping-assistant, all file targets are within this repo. Single-repo change.
Dependencies
- #234 (Day detail page: controller, route, and basic show view) — OPEN, board item #1472 in backlog. This ticket explicitly depends on #234 and cannot be started until #234 is merged. Dependency is properly documented in Lineage section.
- #233 (parent, decomposed) — OPEN. This is ticket 2 of 4 from the decomposition. Parent status is informational only.
- No undocumented dependencies found. The
accordion_controller.jsis reused as-is (no modifications needed).
Acceptance Criteria
5 AC, all testable by an agent:
- AC1: Accordion heading with dynamic day name — verifiable via request spec checking response body
- AC2: Historical frequency sort — verifiable via request spec with seeded WorkQueueItems
- AC3: "Queued" badge for already-queued properties — verifiable via request spec
- AC4: localStorage persistence via accordion controller — uses existing controller, no new JS needed; verifiable by checking
data-accordion-key-valueattribute - AC5: Empty state — verifiable via request spec with no historical data
Test command
bundle exec rspec spec/requests/days_spec.rb is valid (file will be created). 4 test expectations are well-specified.Blast Radius
Low. The DOW extraction pattern (
EXTRACT(DOW FROM work_date)) currently exists only in work_queue_items_controller.rb line 240. This ticket adds a second usage in the new days controller. No downstream consumers affected. The accordion controller is reused without modification.Decomposition Assessment
1 repo, 3 file targets (1 new partial, 2 modifications to dependency-created files), 5 AC. Single-agent pass, estimated under 5 minutes. No decomposition needed.
Recommendation
- [SCOPE] Create architecture note
arch-rails-appin pal-e-docs (platform-wide gap, not blocking this ticket).
No blocking issues. Ticket is ready to move to next_up once dependency #234 (board item #1472) is complete.