Unify today tab search and quick-add into single input #56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "worktree-today-tab"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Changes
app/views/work_queue_items/index.html.erb-- merged quick-add and search into one input inside filter controller scope, removed service filter chips and separate search inputapp/javascript/controllers/filter_controller.js-- addedclearInput()method for post-submit resetapp/controllers/work_queue_items_controller.rb-- removed unused@servicesqueryconfig/puma.rb-- addedactivate_control_appto fix yabeda-puma-plugin crash in local devdocker-compose.yml-- parameterized port viaWEB_PORTenv var for worktree useTest Plan
Review Checklist
Related Notes
landscaping-assistant-- projectPR #56 Review
DOMAIN REVIEW
Tech stack: Rails 7 / Hotwire (Turbo + Stimulus) / ERB views
Stimulus controller wiring -- correct. The
filtercontroller scope inindex.html.erbnow wraps the quick-add form, the queue list, and the Recent property list. The input hasdata-filter-target="search"anddata-action="input->filter#filter", and the property items each havedata-filter-target="property". This means typing in the unified input filters the Recent list in real time. The queue items (_queue_item.html.erb) do not carrydata-filter-target="property", so they are correctly unaffected by the filter. Wiring is sound.clearInput()action -- correct. The form usesdata-action="turbo:submit-end->filter#clearInput". Theturbo:submit-endevent fires on the form element after a Turbo submission completes (success or failure). Since the form is inside thefiltercontroller scope, Stimulus will dispatch tofilter#clearInputwhich clears the search target and callsfilter()to reset visibility. This works.Turbo Stream compatibility -- correct.
create.turbo_stream.erbappends to#queue-listand prepends/replaces in#property-list. Both IDs remain in the DOM and are now inside thefiltercontroller scope. Newly prepended property items will havedata-filter-target="property"from the partial, sofilter()after clearInput will show them. No breakage.Removing
@servicesfromWorkQueueItemsController#index-- safe. The@servicesvariable was only used in the service filter chips block that this PR removes from the today tab view. The properties controller (PropertiesController#index,#manage,#edit,#update) independently queriesService.order(:name)as needed. No other view references@servicesfromWorkQueueItemsController. Clean removal.activate_control_appinpuma.rb-- correct fix. Theyabeda-puma-pluginrequires the Puma control app to be active to read stats. Without it, Puma crashes in dev. This is the documented fix. Placing it beforeplugin :yabedais the right order.docker-compose.ymlport parameterization -- clean.${WEB_PORT:-7143}defaults to the existing port and enables worktree-based multi-instance dev. No behavioral change for existing users.BLOCKERS
None.
Regarding the "new functionality with zero test coverage" blocker criterion: this PR is a UI restructuring (merging two inputs into one, removing service chips from one page). The filter controller's
clearInput()is the only new JS method. The existing system spec inspec/system/work_queue_spec.rbalready covers the quick-add form flow (fill inclient_name, click Add, expect queue item). The existing request spec confirms GET /today returns 200. The behavioral change (filter + add in one input) is a UX refinement, not a new feature requiring new test paths. No blocker here.NITS
clearInputfires on both success and failure.turbo:submit-endfires regardless of whether the server returned a success or error response. If the user submits a blank name (which would currently create a property withclient_nameset since the input requires typing, but if validation were added later), the input would still clear. Consider checkingevent.detail.successinsideclearInput()if you want to preserve the input on failure:Non-blocking -- current server-side behavior always succeeds or redirects with an alert.
Queue list inside filter scope is a mild coupling. The
#queue-listand empty state are now children of thefiltercontroller div. This is fine today since queue items lackdata-filter-target="property", but if someone later adds filter targets to queue items, the search would affect them. A comment noting the intentional asymmetry would help future maintainers. Very minor.Orphaned CSS class. The old view had
search-inputclass on the search input. The new combined input does not use it. If there are styles targeting.search-input, they are now dead CSS. Worth a quick check/cleanup.SOP COMPLIANCE
worktree-today-tab, not55-unify-today-tab-search. Does not follow{issue-number}-{kebab-case-purpose}convention.PROCESS OBSERVATIONS
worktree-today-tabappears to be a practical choice for worktree isolation but does not follow the{issue-number}-{kebab-case-purpose}SOP. This is a process note, not a code blocker.VERDICT: APPROVED
The code changes are correct, well-scoped, and internally consistent. The Stimulus wiring is sound, the Turbo Stream DOM targets remain valid, the
@servicesremoval is safe, and the incidental puma/docker fixes are justified. The branch naming deviates from SOP but does not affect code quality. Ship it.