Review: Drag-to-reorder work queue
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type
- [x] Lineage
- [x] Repo
- [x] User Story
- [x] Context
- [x] File Targets
- [x] Acceptance Criteria
- [x] Test Expectations
- [x] Constraints
- [x] Checklist
- [x] Related
All required sections for the Feature template are present.
Traceability
- [x] story:work-queue label present
- [ ] story note MISSING — [SCOPE] The user-stories table on project-landscaping-assistant only contains: address-lookup, property-crud, service-tracking, special-notes. "work-queue" is not listed. Create user story entry on project-landscaping-assistant user-stories section.
- [x] arch:rails-app label present
- [ ] arch note MISSING — [SCOPE] No arch-rails-app note found in pal-e-docs. Create architecture note arch-rails-app for component rails-app.
- [x] Forgejo issue — ldraney/landscaping-assistant#7, state: open
File Targets
- [x]
app/javascript/controllers/sortable_controller.js— NEW file. Directory exists, matches Stimulus controller convention. Existing controllers (filter_controller.js, location_controller.js) confirm naming pattern. - [x]
app/controllers/work_queue_items_controller.rb— verified: exists with index/create/update/destroy actions. Needs newreorderaction added. - [x]
app/views/work_queue_items/_queue_item.html.erb— verified: exists, currently has no drag handle. 15 lines. - [x]
app/views/work_queue_items/index.html.erb— verified: exists,queue-listUL present at line 15. Needs sortable controller wiring. - [x]
config/routes.rb— verified: exists, work_queue_items resource on line 7. Needs reorder route added. - [x]
config/importmap.rb— verified: exists. Sortable.js not yet pinned. pin_all_from controllers/ already in place. - [x]
app/assets/stylesheets/application.css— verified: exists.
Repo Placement
OK. Issue filed on ldraney/landscaping-assistant, all file targets are within the same repo. Single-repo change.
Dependencies
- Board item #1248 "Add navigation and daily work queue" (story:work-queue) is in
done— this ticket correctly builds on that completed work. - Board item #1232 "Wire up Solid Cache, Queue, Cable" is in
backlog— no dependency conflict. - No blockers identified. This ticket is not blocked and does not block other items.
Acceptance Criteria
6 acceptance criteria. Each is verifiable by an agent:
- "Drag handle visible" — checkable via view file inspection or screenshot
- "Drag-and-drop reorders items visually" — requires browser/Playwright verification
- "New positions persist to the database" — verifiable via request spec
- "Works on mobile (touch drag)" — requires mobile viewport Playwright test, harder to automate but feasible
- "Turbo-compatible (no full page reload)" — verifiable via Turbo stream response check
- "Completed items can still be reordered" — verifiable via request spec with completed items
Test commands are valid (
bundle exec rspec). Test expectations (request spec + model spec) are reasonable.Blast Radius
- The
positioncolumn already exists on work_queue_items (default: 0, set by insertion count in create action). The reorder action will change position semantics from "insertion order" to "user-defined order." No other models or controllers reference position. - The
for_todayscope already orders by position — reorder will work correctly with existing queries. - ApplicationController uses default CSRF protection (no skip_before_action). The reorder endpoint will need a proper CSRF token in the fetch request from the Stimulus controller.
- No sibling services affected. Single-app architecture.
Decomposition Assessment
7 file targets across 1 repo. 6 acceptance criteria (exceeds the 5 AC threshold). However, estimated agent work is under 5 minutes — this is a focused feature adding one Stimulus controller, one controller action, one route, one importmap pin, and styling. The files are all in one repo and tightly coupled. No decomposition needed despite the AC count — the work is cohesive and sequential.
Recommendations
[SCOPE]Create user story entry "work-queue" on project-landscaping-assistant user-stories section. Suggested row: work-queue | Landscaper | Drag to reorder daily work queue | Queue order persists after drag-and-drop.[SCOPE]Create architecture note arch-rails-app for component rails-app. This is referenced by multiple board items (1230, 1232, 1248, 1249, 1250).