Show last week's same-day queue on the Today tab #98

Closed
opened 2026-06-04 12:22:42 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — discovered during feature planning session.

Repo

ldraney/landscaping-assistant

User Story

As a landscaper
I want to see what properties I serviced on the same weekday last week
So that I can quickly re-queue my regular rotation without navigating back 7 days manually

Context

Most landscaping crews run roughly weekly rotations — the same properties get serviced on the same weekday each week. Currently, to see what was done last week you have to tap the back arrow 7 times or switch to the week view and navigate. A "Last week" reference section on the today tab eliminates that friction and makes re-queuing a one-tap operation.

File Targets

Files the agent should modify or create:

  • app/controllers/work_queue_items_controller.rb — add @last_week_items query in index action
  • app/views/work_queue_items/index.html.erb — render last-week section below current queue
  • app/views/work_queue_items/_last_week_item.html.erb — new partial for each last-week item
  • Stimulus controller for collapse toggle if needed

Files the agent should NOT touch:

  • app/controllers/weeks_controller.rb — week view is a separate feature
  • app/models/work_queue_item.rb — no model changes needed, existing scopes suffice

Acceptance Criteria

  • Today tab shows a "Last week" section below the current queue
  • Section displays WorkQueueItems from @date - 7.days, with property name and address
  • Each last-week item has a quick "re-queue" action that copies it to today's queue
  • Items already in today's queue show a "Queued" indicator instead of the re-queue button
  • Section is collapsible (default expanded)
  • Works correctly when navigating to other dates via the arrow buttons (always shows 7 days prior)
  • Turbo stream updates keep the last-week section in sync after re-queuing

Test Expectations

  • Controller test: index assigns @last_week_items with items from 7 days ago
  • Controller test: re-queue action creates a new WorkQueueItem for today with correct property
  • System test: verify last-week section renders and re-queue button works
  • Run command: bin/rails test

Constraints

  • No Tailwind CSS — use existing stylesheet patterns
  • Vanilla Rails + Stimulus, no new gems
  • Match existing partial/view patterns in the codebase

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-landscaping-assistant
### Type Feature ### Lineage Standalone — discovered during feature planning session. ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaper I want to see what properties I serviced on the same weekday last week So that I can quickly re-queue my regular rotation without navigating back 7 days manually ### Context Most landscaping crews run roughly weekly rotations — the same properties get serviced on the same weekday each week. Currently, to see what was done last week you have to tap the back arrow 7 times or switch to the week view and navigate. A "Last week" reference section on the today tab eliminates that friction and makes re-queuing a one-tap operation. ### File Targets Files the agent should modify or create: - `app/controllers/work_queue_items_controller.rb` — add `@last_week_items` query in `index` action - `app/views/work_queue_items/index.html.erb` — render last-week section below current queue - `app/views/work_queue_items/_last_week_item.html.erb` — new partial for each last-week item - Stimulus controller for collapse toggle if needed Files the agent should NOT touch: - `app/controllers/weeks_controller.rb` — week view is a separate feature - `app/models/work_queue_item.rb` — no model changes needed, existing scopes suffice ### Acceptance Criteria - [ ] Today tab shows a "Last week" section below the current queue - [ ] Section displays WorkQueueItems from `@date - 7.days`, with property name and address - [ ] Each last-week item has a quick "re-queue" action that copies it to today's queue - [ ] Items already in today's queue show a "Queued" indicator instead of the re-queue button - [ ] Section is collapsible (default expanded) - [ ] Works correctly when navigating to other dates via the arrow buttons (always shows 7 days prior) - [ ] Turbo stream updates keep the last-week section in sync after re-queuing ### Test Expectations - [ ] Controller test: `index` assigns `@last_week_items` with items from 7 days ago - [ ] Controller test: re-queue action creates a new WorkQueueItem for today with correct property - [ ] System test: verify last-week section renders and re-queue button works - Run command: `bin/rails test` ### Constraints - No Tailwind CSS — use existing stylesheet patterns - Vanilla Rails + Stimulus, no new gems - Match existing partial/view patterns in the codebase ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-landscaping-assistant`
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#98
No description provided.