Today view: done-by-other tracking, last-week status, inactive properties section #201

Closed
opened 2026-06-12 12:35:01 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — discovered during daily use of the today view.

Repo

ldraney/landscaping-assistant

User Story

As a crew lead
I want to see which last-week properties are already done this week and mark properties completed by other crews
So that I can quickly identify what still needs attention without mentally cross-referencing the week view

Context

Three usability gaps on the today page:

  1. The "Last [Day]" section shows properties from the same day last week but gives no indication whether they've already been serviced this week. You have to switch to the week view to check.
  2. The "Recent" section lists all active properties sorted by updated_at, which duplicates the property picker dropdown above it and wastes space.
  3. When another crew services a property, there's no way to record that fact. The property just looks undone, creating confusion about what's actually left.

File Targets

Files the agent should modify or create:

  • db/migrate/20260612000000_add_completed_by_other_to_work_queue_items.rb -- new migration
  • db/schema.rb -- reflect new column
  • app/models/work_queue_item.rb -- add mark_done_by_other! method
  • config/routes.rb -- add mark_other collection route
  • app/controllers/work_queue_items_controller.rb -- add mark_other action, inactive_properties query, done_this_week queries
  • app/views/work_queue_items/index.html.erb -- replace Recent with Inactive, pass new locals to last_week partial
  • app/views/work_queue_items/_queue_item.html.erb -- add done-by-other button
  • app/views/work_queue_items/_last_week_item.html.erb -- add done/other-crew badges and button
  • app/views/work_queue_items/create.turbo_stream.erb -- remove property_item references
  • app/views/work_queue_items/destroy.turbo_stream.erb -- pass new locals, remove property_item reference
  • app/assets/stylesheets/application.css -- styles for new components
  • spec/requests/work_queue_items_spec.rb -- new and updated specs

Files the agent should NOT touch:

  • app/views/weeks/ -- week view is separate

Feature Flag

none — internal model change + UI adjustment, no new user-visible workflow

Acceptance Criteria

  • Last-week items show "Done" badge (green) when property completed this week
  • Last-week items show "Other crew" badge (blue) when marked via done-by-other
  • Last-week items not yet done show both a requeue (+) button and a done-by-other (people) button
  • Queue items show done-by-other button when not yet completed
  • Done-by-other items display with distinct visual treatment (strikethrough + "Done by other crew" meta)
  • "Recent" section replaced with "Inactive Properties" showing only deactivated properties
  • Inactive section only renders when inactive properties exist
  • Reactivate button on inactive properties works

Test Expectations

  • Request spec: POST /today/mark_other creates item with completed_by_other=true
  • Request spec: mark_other on existing item updates it without creating a duplicate
  • Request spec: done-badge appears for last-week items completed this week
  • Request spec: inactive section appears when inactive properties exist
  • Existing specs updated to reflect removal of property_item section
  • Run command: bundle exec rspec spec/requests/work_queue_items_spec.rb

Constraints

  • Follow existing button/badge patterns in application.css
  • Use find_or_initialize_by for mark_other to handle both new and existing items
  • SVG icon for done-by-other uses the people/group icon (consistent with crew concept)

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant -- project this affects
### Type Feature ### Lineage Standalone — discovered during daily use of the today view. ### Repo `ldraney/landscaping-assistant` ### User Story As a crew lead I want to see which last-week properties are already done this week and mark properties completed by other crews So that I can quickly identify what still needs attention without mentally cross-referencing the week view ### Context Three usability gaps on the today page: 1. The "Last [Day]" section shows properties from the same day last week but gives no indication whether they've already been serviced this week. You have to switch to the week view to check. 2. The "Recent" section lists all active properties sorted by updated_at, which duplicates the property picker dropdown above it and wastes space. 3. When another crew services a property, there's no way to record that fact. The property just looks undone, creating confusion about what's actually left. ### File Targets Files the agent should modify or create: - `db/migrate/20260612000000_add_completed_by_other_to_work_queue_items.rb` -- new migration - `db/schema.rb` -- reflect new column - `app/models/work_queue_item.rb` -- add mark_done_by_other! method - `config/routes.rb` -- add mark_other collection route - `app/controllers/work_queue_items_controller.rb` -- add mark_other action, inactive_properties query, done_this_week queries - `app/views/work_queue_items/index.html.erb` -- replace Recent with Inactive, pass new locals to last_week partial - `app/views/work_queue_items/_queue_item.html.erb` -- add done-by-other button - `app/views/work_queue_items/_last_week_item.html.erb` -- add done/other-crew badges and button - `app/views/work_queue_items/create.turbo_stream.erb` -- remove property_item references - `app/views/work_queue_items/destroy.turbo_stream.erb` -- pass new locals, remove property_item reference - `app/assets/stylesheets/application.css` -- styles for new components - `spec/requests/work_queue_items_spec.rb` -- new and updated specs Files the agent should NOT touch: - `app/views/weeks/` -- week view is separate ### Feature Flag none — internal model change + UI adjustment, no new user-visible workflow ### Acceptance Criteria - [ ] Last-week items show "Done" badge (green) when property completed this week - [ ] Last-week items show "Other crew" badge (blue) when marked via done-by-other - [ ] Last-week items not yet done show both a requeue (+) button and a done-by-other (people) button - [ ] Queue items show done-by-other button when not yet completed - [ ] Done-by-other items display with distinct visual treatment (strikethrough + "Done by other crew" meta) - [ ] "Recent" section replaced with "Inactive Properties" showing only deactivated properties - [ ] Inactive section only renders when inactive properties exist - [ ] Reactivate button on inactive properties works ### Test Expectations - [ ] Request spec: POST /today/mark_other creates item with completed_by_other=true - [ ] Request spec: mark_other on existing item updates it without creating a duplicate - [ ] Request spec: done-badge appears for last-week items completed this week - [ ] Request spec: inactive section appears when inactive properties exist - [ ] Existing specs updated to reflect removal of property_item section - Run command: `bundle exec rspec spec/requests/work_queue_items_spec.rb` ### Constraints - Follow existing button/badge patterns in application.css - Use find_or_initialize_by for mark_other to handle both new and existing items - SVG icon for done-by-other uses the people/group icon (consistent with crew concept) ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `landscaping-assistant` -- project this affects
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#201
No description provided.