Review: Hours tab: daily/weekly summary
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type -- Feature
- [x] Lineage -- present (references parent #331)
- [x] Repo -- ldraney/landscaping-assistant
- [x] User Story -- present, well-formed
- [x] Context -- present, references BusyBusy UX pattern
- [x] File Targets -- present with create/modify/do-not-touch sections
- [x] Feature Flag -- present (time_tracking, reuses parent flag)
- [x] Acceptance Criteria -- 6 criteria present
- [x] Test Expectations -- present with run command
- [x] Constraints -- present (Mon-Sun, duration format, no pagination)
- [x] Checklist -- present
- [x] Related -- present
Traceability
- [x] story:crew-time-tracking label -- present on board item
- [ ] story note MISSING -- [SCOPE] No
crew-time-trackingentry in project-landscaping-assistant user-stories section. Create user story entry on project-landscaping-assistant. - [x] arch:rails label -- present
- [x] arch note verified -- arch-rails note exists in pal-e-docs (note: associated with ISS project, not landscaping-assistant, but architecture note exists)
- [x] Forgejo issue -- #334, open
File Targets
- [x]
app/views/hours/_daily_entries.html.erb-- to create (new file, OK) - [x]
app/views/hours/_weekly_summary.html.erb-- to create (new file, OK) - [ ]
app/views/hours/index.html.erb-- ISSUE: listed as "modify" but does not exist yet. Created by upstream ticket #1938 (board #1938, "Hours tab: clock in/out/break UI") - [ ]
app/controllers/hours_controller.rb-- ISSUE: listed as "modify" but does not exist yet. Created by upstream ticket #1938 - [ ]
app/models/time_entry.rb-- ISSUE: listed as "modify" but does not exist yet. Created by upstream ticket #1937 (board #1937, "TimeEntry data model + API + flag", sprint:6) - [x]
app/assets/stylesheets/application.css-- verified, exists (59KB) - [x] Referenced pattern
work_queue_items/_queue_item.html.erb-- verified, exists in codebase
Repo Placement
OK. Issue filed on ldraney/landscaping-assistant, all file targets within the same repo. No cross-repo concerns.
Dependencies
- #1937 "TimeEntry data model + API + flag" (sprint:6, backlog) -- creates
TimeEntrymodel,time_trackingfeature flag, and time entry API. This ticket's model scopes (for_date,for_week,total_duration) and feature flag depend on #1937. NOT mentioned in Lineage section. - #1938 "Hours tab: clock in/out/break UI" (sprint:7, backlog) -- creates
hours_controller.rb,hours/index.html.erb, routes, and timer widget. Mentioned in Lineage ("Depends on the Hours tab UI ticket"). - #1936 "Time Tracking: Hours Tab (parent)" (backlog) -- umbrella/parent issue for all time tracking work.
- The
time_trackingfeature flag is not yet registered inlib/tasks/feature_flags.rake-- will be added by #1937. - Both #1937 and #1938 are currently in backlog. Execution order: #1937 (sprint:6) first, then #1938 and #1939 (sprint:7).
Acceptance Criteria
6 criteria, all concrete and agent-verifiable:
- AC 1-4: view-level checks (entries display, weekly section, totals, zero-hours) -- verifiable via request specs checking response body
- AC 5: logic check (break subtraction) -- verifiable via model spec
- AC 6: Turbo Stream update after clock out -- verifiable; Turbo Stream patterns exist in codebase (e.g.,
work_queue_items/create.turbo_stream.erb,days/add_to_queue.turbo_stream.erb)
Test commands are real (
bundle exec rspec). Test expectations cover both request and model specs.Blast Radius
Low. This is a new feature adding views and scopes to a new model/controller pair. No existing code is modified except
application.css (additive styles). No downstream consumers affected. No similar bug patterns to check -- this is net-new functionality.Decomposition Assessment
6 file targets across 1 repo. 6 acceptance criteria (triggers the >5 AC rule). However, the work is highly cohesive: all changes serve a single UI feature (daily/weekly summary views), the model scopes are simple query wrappers, and the view partials are tightly coupled. Estimated agent time: ~4-5 minutes. No decomposition needed -- the >5 AC trigger is borderline and the work does not span multiple systems or repos.
Recommendation
[SCOPE]Create user story entrycrew-time-trackingon project-landscaping-assistant user-stories section. Suggested row: Key=crew-time-tracking, Role=Crew member/lead, Summary="Clock in/out, view daily and weekly hour totals", Success Metric="Timer widget, daily entries list, weekly summary with break deductions"[BODY]Add #1937 "TimeEntry data model + API + flag" as explicit dependency in Lineage section. Current Lineage only mentions #1938 but #1937 creates the TimeEntry model and time_tracking flag that this ticket depends on.[BODY]Clarify File Targets:time_entry.rb,hours_controller.rb, andhours/index.html.erbare listed under "Files to modify" but do not exist yet -- they will be created by upstream tickets #1937 and #1938. Add a note like "(created by #1937)" / "(created by #1938)" next to each.