Add navigation and daily work queue #5

Closed
opened 2026-05-25 00:16:04 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — next logical step after property CRUD (issue #1).

Repo

ldraney/landscaping-assistant

User Story

As a landscaper
I want to browse saved properties and queue them for today's work
So that I can plan my daily route without re-entering addresses

Context

The app currently has a single page for creating properties. There's no way to view existing locations or plan a day's work. We need a two-tab navigation (New / Today) and a work queue model so properties can be added to a daily schedule. Mobile-first — this gets used in the field from a phone.

Progress (branch: feature/nav-and-work-queue)

Done:

  • WorkQueueItem model with migration, validations, scopes
  • WorkQueueItemsController with CRUD actions
  • Bottom tab nav (New / Today) in layout
  • Day navigation (prev/next arrows, date-scoped queues)
  • Search input (filters by name, address, city, special notes)
  • Service filter chips (Edging & Trimming, Mowing, Weeding)
  • Turbo Stream responses for create/update/destroy (no full page reload)
  • Queue item partials (_queue_item, _property_item)
  • Strikethrough + de-bold on completed items
  • "Queued" badge on properties already in day's queue

Not working / needs fixing:

  • Complete/uncomplete toggle not reliably reactive — strikethrough sometimes doesn't visually update, needs investigation
  • CSRF token issue when accessing via Tailscale Funnel dev URL (works on localhost, breaks through proxy)
  • Add-to-queue via dev URL also broken by CSRF
  • Remove from queue untested end-to-end

Not started:

  • Mobile UX polish (tap targets, spacing, scroll behavior)
  • Reorder queue items (drag or manual position)

Infrastructure done this session

  • Created landscaping-dev overlay in pal-e-deployments (nginx proxy to local machine via Tailscale)
  • ArgoCD app landscaping-dev created for the overlay
  • Fixed Rails host authorization for landscaping-dev.tail5b443a.ts.net
  • Changed local dev port from 9999 to 7143 (Rails on 3000, matching prod)
  • Ran db:seed in prod to restore service checkboxes

File Targets

Files created:

  • app/models/work_queue_item.rb
  • db/migrate/20260525001718_create_work_queue_items.rb
  • app/controllers/work_queue_items_controller.rb
  • app/javascript/controllers/filter_controller.js
  • app/views/work_queue_items/index.html.erb
  • app/views/work_queue_items/_queue_item.html.erb
  • app/views/work_queue_items/_property_item.html.erb
  • app/views/work_queue_items/create.turbo_stream.erb
  • app/views/work_queue_items/update.turbo_stream.erb
  • app/views/work_queue_items/destroy.turbo_stream.erb

Files modified:

  • config/routes.rb — added work_queue_items resource
  • app/models/property.rb — added has_many :work_queue_items
  • app/views/layouts/application.html.erb — added bottom nav + page-content wrapper
  • app/assets/stylesheets/application.css — nav, queue, search, filter styles
  • config/environments/development.rb — updated allowed host
  • docker-compose.yml — port change to 7143:3000
  • docs/networking.md — rewritten for dev proxy architecture
  • README.md — updated URLs and docs table of contents

Files NOT to touch:

  • app/views/properties/index.html.erb — existing form stays as-is

Acceptance Criteria

  • Two-tab bottom nav visible on all pages (New / Today)
  • "New" tab shows the existing property creation form
  • "Today" tab shows all saved properties with search and service filter
  • Can add a property to today's work queue (works locally, broken via dev URL)
  • Can mark a queued item as complete (toggle unreliable)
  • Can remove a queued item from the queue (untested)
  • Mobile-first layout (needs polish)

Test Expectations

  • Model test: WorkQueueItem belongs_to property, validates date presence, uniqueness scope
  • Controller test: CRUD actions for work queue items
  • Run command: bin/rails test

Constraints

  • Use Hotwire (Turbo Streams + Stimulus) for interactivity
  • No Tailwind — use plain CSS
  • Follow existing pattern in properties controller/views

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant — project this affects
### Type Feature ### Lineage Standalone — next logical step after property CRUD (issue #1). ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaper I want to browse saved properties and queue them for today's work So that I can plan my daily route without re-entering addresses ### Context The app currently has a single page for creating properties. There's no way to view existing locations or plan a day's work. We need a two-tab navigation (New / Today) and a work queue model so properties can be added to a daily schedule. Mobile-first — this gets used in the field from a phone. ### Progress (branch: `feature/nav-and-work-queue`) **Done:** - [x] `WorkQueueItem` model with migration, validations, scopes - [x] `WorkQueueItemsController` with CRUD actions - [x] Bottom tab nav (New / Today) in layout - [x] Day navigation (prev/next arrows, date-scoped queues) - [x] Search input (filters by name, address, city, special notes) - [x] Service filter chips (Edging & Trimming, Mowing, Weeding) - [x] Turbo Stream responses for create/update/destroy (no full page reload) - [x] Queue item partials (`_queue_item`, `_property_item`) - [x] Strikethrough + de-bold on completed items - [x] "Queued" badge on properties already in day's queue **Not working / needs fixing:** - [ ] Complete/uncomplete toggle not reliably reactive — strikethrough sometimes doesn't visually update, needs investigation - [ ] CSRF token issue when accessing via Tailscale Funnel dev URL (works on localhost, breaks through proxy) - [ ] Add-to-queue via dev URL also broken by CSRF - [ ] Remove from queue untested end-to-end **Not started:** - [ ] Mobile UX polish (tap targets, spacing, scroll behavior) - [ ] Reorder queue items (drag or manual position) ### Infrastructure done this session - Created `landscaping-dev` overlay in pal-e-deployments (nginx proxy to local machine via Tailscale) - ArgoCD app `landscaping-dev` created for the overlay - Fixed Rails host authorization for `landscaping-dev.tail5b443a.ts.net` - Changed local dev port from 9999 to 7143 (Rails on 3000, matching prod) - Ran `db:seed` in prod to restore service checkboxes ### File Targets Files created: - `app/models/work_queue_item.rb` - `db/migrate/20260525001718_create_work_queue_items.rb` - `app/controllers/work_queue_items_controller.rb` - `app/javascript/controllers/filter_controller.js` - `app/views/work_queue_items/index.html.erb` - `app/views/work_queue_items/_queue_item.html.erb` - `app/views/work_queue_items/_property_item.html.erb` - `app/views/work_queue_items/create.turbo_stream.erb` - `app/views/work_queue_items/update.turbo_stream.erb` - `app/views/work_queue_items/destroy.turbo_stream.erb` Files modified: - `config/routes.rb` — added work_queue_items resource - `app/models/property.rb` — added has_many :work_queue_items - `app/views/layouts/application.html.erb` — added bottom nav + page-content wrapper - `app/assets/stylesheets/application.css` — nav, queue, search, filter styles - `config/environments/development.rb` — updated allowed host - `docker-compose.yml` — port change to 7143:3000 - `docs/networking.md` — rewritten for dev proxy architecture - `README.md` — updated URLs and docs table of contents Files NOT to touch: - `app/views/properties/index.html.erb` — existing form stays as-is ### Acceptance Criteria - [x] Two-tab bottom nav visible on all pages (New / Today) - [x] "New" tab shows the existing property creation form - [x] "Today" tab shows all saved properties with search and service filter - [ ] Can add a property to today's work queue (works locally, broken via dev URL) - [ ] Can mark a queued item as complete (toggle unreliable) - [ ] Can remove a queued item from the queue (untested) - [ ] Mobile-first layout (needs polish) ### Test Expectations - [ ] Model test: WorkQueueItem belongs_to property, validates date presence, uniqueness scope - [ ] Controller test: CRUD actions for work queue items - Run command: `bin/rails test` ### Constraints - Use Hotwire (Turbo Streams + Stimulus) for interactivity - No Tailwind — use plain CSS - Follow existing pattern in properties controller/views ### 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#5
No description provided.