[DECOMPOSED] Day detail page: planning view with "Previously [Day]s" accordion #233

Open
opened 2026-06-16 03:08:04 +00:00 by ldraney · 1 comment
Owner

Type

Feature

Lineage

Standalone -- evolved from discussion about separating the Today operational view from weekly planning. Related to the Week tab planning grid (#28, #31).

Repo

ldraney/landscaping-assistant

User Story

As a crew lead or admin
I want to click a day on the Week tab and see a dedicated day detail page with historical patterns for that weekday
So that I can plan which properties to assign by seeing what's historically been done on that day, without cluttering the Today operational view

Context

Currently, clicking a day label on the Week tab routes to /today?date=X, which shows the full Today view with all its accordion sections (still undone, recent, last week, unqueued this week). Those sections are designed for "what am I doing right now" and don't make sense when planning a future Tuesday from the Week tab.

Days need their own pages -- like properties have /properties/:id. The Week tab becomes the planning portal for navigating to day detail pages (past and future). The Today tab stays simple and operational.

The first feature on the day detail page is a "Previously Tuesdays" accordion that shows every property historically assigned on that weekday, sorted by frequency. This leverages the existing compute_unqueued_this_week query pattern (historical DOW frequency from work_queue_items).

File Targets

Files to create:

  • app/controllers/days_controller.rb -- new controller with show action, historical frequency query
  • app/views/days/show.html.erb -- day detail page with queued items list + "Previously [Day]s" accordion
  • app/views/days/_previously_section.html.erb -- accordion partial for historical weekday properties
  • spec/requests/days_spec.rb -- request specs

Files to modify:

  • config/routes.rb -- add /days/:date route
  • app/views/weeks/index.html.erb -- change day label links from work_queue_items_path(date:) to day_path(date:)

Files NOT to touch:

  • app/controllers/work_queue_items_controller.rb -- Today tab stays as-is
  • app/views/work_queue_items/ -- Today view unchanged

Feature Flag

Flag: none
This is a new route/page, not a toggle on existing behavior. The Week tab day links will point to the new page immediately.

Acceptance Criteria

  • /days/2026-06-17 renders a day detail page for that Tuesday
  • Page shows properties currently queued for that date
  • "Previously Tuesdays" accordion shows all properties ever assigned on any Tuesday, sorted by frequency descending
  • Each item in the "Previously" list has a remove button (excludes it from the recurring list via a new day_exclusions table or similar)
  • A search/picker on the accordion allows quickly adding a property to that day's queue
  • Week tab day labels now link to /days/:date instead of /today?date=
  • Today tab (/today) remains unchanged for the current day's operational use
  • Properties already queued for the day are visually distinguished in the "Previously" list

Test Expectations

  • Request spec: GET /days/:date returns 200 with day name in heading
  • Request spec: "Previously" section includes properties with historical weekday matches
  • Request spec: "Previously" section excludes properties that have been removed from the list
  • Request spec: adding a property via the picker creates a WorkQueueItem for that date
  • Run command: bundle exec rspec spec/requests/days_spec.rb

Constraints

  • Follow the existing accordion pattern (<details> + accordion Stimulus controller with localStorage persistence)
  • Follow the existing property picker pattern for the search/add functionality
  • Historical query should use the same DOW extraction pattern as compute_unqueued_this_week
  • Keep the page mobile-first -- this will be used in the field on phones
  • No new JS dependencies

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-landscaping-assistant
  • #28 -- Week tab: move, add, and show unassigned properties
  • #31 -- Week tab: add property to a specific day
### Type Feature ### Lineage Standalone -- evolved from discussion about separating the Today operational view from weekly planning. Related to the Week tab planning grid (#28, #31). ### Repo `ldraney/landscaping-assistant` ### User Story As a crew lead or admin I want to click a day on the Week tab and see a dedicated day detail page with historical patterns for that weekday So that I can plan which properties to assign by seeing what's historically been done on that day, without cluttering the Today operational view ### Context Currently, clicking a day label on the Week tab routes to `/today?date=X`, which shows the full Today view with all its accordion sections (still undone, recent, last week, unqueued this week). Those sections are designed for "what am I doing right now" and don't make sense when planning a future Tuesday from the Week tab. Days need their own pages -- like properties have `/properties/:id`. The Week tab becomes the planning portal for navigating to day detail pages (past and future). The Today tab stays simple and operational. The first feature on the day detail page is a "Previously Tuesdays" accordion that shows every property historically assigned on that weekday, sorted by frequency. This leverages the existing `compute_unqueued_this_week` query pattern (historical DOW frequency from `work_queue_items`). ### File Targets Files to create: - `app/controllers/days_controller.rb` -- new controller with `show` action, historical frequency query - `app/views/days/show.html.erb` -- day detail page with queued items list + "Previously [Day]s" accordion - `app/views/days/_previously_section.html.erb` -- accordion partial for historical weekday properties - `spec/requests/days_spec.rb` -- request specs Files to modify: - `config/routes.rb` -- add `/days/:date` route - `app/views/weeks/index.html.erb` -- change day label links from `work_queue_items_path(date:)` to `day_path(date:)` Files NOT to touch: - `app/controllers/work_queue_items_controller.rb` -- Today tab stays as-is - `app/views/work_queue_items/` -- Today view unchanged ### Feature Flag Flag: none This is a new route/page, not a toggle on existing behavior. The Week tab day links will point to the new page immediately. ### Acceptance Criteria - [ ] `/days/2026-06-17` renders a day detail page for that Tuesday - [ ] Page shows properties currently queued for that date - [ ] "Previously Tuesdays" accordion shows all properties ever assigned on any Tuesday, sorted by frequency descending - [ ] Each item in the "Previously" list has a remove button (excludes it from the recurring list via a new `day_exclusions` table or similar) - [ ] A search/picker on the accordion allows quickly adding a property to that day's queue - [ ] Week tab day labels now link to `/days/:date` instead of `/today?date=` - [ ] Today tab (`/today`) remains unchanged for the current day's operational use - [ ] Properties already queued for the day are visually distinguished in the "Previously" list ### Test Expectations - [ ] Request spec: GET `/days/:date` returns 200 with day name in heading - [ ] Request spec: "Previously" section includes properties with historical weekday matches - [ ] Request spec: "Previously" section excludes properties that have been removed from the list - [ ] Request spec: adding a property via the picker creates a WorkQueueItem for that date - [ ] Run command: `bundle exec rspec spec/requests/days_spec.rb` ### Constraints - Follow the existing accordion pattern (`<details>` + `accordion` Stimulus controller with localStorage persistence) - Follow the existing property picker pattern for the search/add functionality - Historical query should use the same DOW extraction pattern as `compute_unqueued_this_week` - Keep the page mobile-first -- this will be used in the field on phones - No new JS dependencies ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-landscaping-assistant` - #28 -- Week tab: move, add, and show unassigned properties - #31 -- Week tab: add property to a specific day
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-1471-2026-06-15
Well-structured feature ticket with all template sections present, but exceeds decomposition thresholds and has a missing file target.

  • [BODY] File Targets missing day_exclusions migration + model referenced in AC #4
  • [BODY] AC #4 says "or similar" -- specify the day_exclusions table schema (property_id, dow, created_by)
  • [SCOPE] Architecture note arch-rails-app does not exist in pal-e-docs
  • [DECOMPOSE] 8 AC across 7+ files with new model/table, new controller, new views, and Stimulus interaction -- route to skill-decompose-ticket. Suggested sub-tickets: (1) Days controller + route + basic show page, (2) "Previously [Day]s" accordion with historical query, (3) DayExclusion model + remove button, (4) Property picker integration
## Scope Review: NEEDS_REFINEMENT Review note: `review-1471-2026-06-15` Well-structured feature ticket with all template sections present, but exceeds decomposition thresholds and has a missing file target. - **[BODY]** File Targets missing `day_exclusions` migration + model referenced in AC #4 - **[BODY]** AC #4 says "or similar" -- specify the `day_exclusions` table schema (property_id, dow, created_by) - **[SCOPE]** Architecture note `arch-rails-app` does not exist in pal-e-docs - **[DECOMPOSE]** 8 AC across 7+ files with new model/table, new controller, new views, and Stimulus interaction -- route to `skill-decompose-ticket`. Suggested sub-tickets: (1) Days controller + route + basic show page, (2) "Previously [Day]s" accordion with historical query, (3) DayExclusion model + remove button, (4) Property picker integration
ldraney changed title from Day detail page: planning view with "Previously [Day]s" accordion to [DECOMPOSED] Day detail page: planning view with "Previously [Day]s" accordion 2026-06-16 03:31:23 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/landscaping-assistant#233
No description provided.