Daily comments on today view #192

Open
opened 2026-06-09 19:15:43 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — discovered during field use of today view.

Repo

ldraney/landscaping-assistant

User Story

As a crew member (any role)
I want to post comments on a specific day in the today view
So that I can leave notes about the day's work for the team

Context

The today view currently has no way to leave freeform notes about the day. Crew leads and members need a place to jot down day-level observations — weather delays, equipment issues, schedule changes, etc. Comments should display the poster's role alongside their name so readers know context. Latest comments appear at the top (reverse chronological).

File Targets

Files the agent should modify or create:

  • db/migrate/XXXX_create_daily_comments.rb -- new DailyComment model (date, body, crew_member_id)
  • app/models/daily_comment.rb -- model with belongs_to :crew_member, validations
  • app/controllers/daily_comments_controller.rb -- create action scoped to date
  • app/views/work_queue_items/index.html.erb -- comments section below queue list
  • app/views/daily_comments/_comment.html.erb -- partial showing name, role badge, body, timestamp
  • config/routes.rb -- nested or standalone route for daily_comments
  • app/assets/stylesheets/application.css -- comment styling

Files the agent should NOT touch:

  • app/javascript/controllers/sortable_controller.js -- unrelated

Feature Flag

none

Acceptance Criteria

  • All roles (member, lead, admin, super_admin) can post comments on any day
  • Each comment displays the poster's name and role badge
  • Comments are ordered reverse chronologically (latest at top)
  • Comments are scoped to a specific date (work_date)
  • Empty comments are rejected (validation)

Test Expectations

  • Model test: DailyComment validations (body presence, crew_member association)
  • Request test: create comment, verify it appears on the page
  • Run command: bundle exec rspec spec/models/daily_comment_spec.rb spec/requests/daily_comments_spec.rb

Constraints

  • Use existing crew_member association for author identity
  • Role badge styling should reuse existing .role-badge CSS classes
  • No Turbo Streams needed for v1 — full page reload on comment post is fine

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant -- project this affects
### Type Feature ### Lineage Standalone — discovered during field use of today view. ### Repo `ldraney/landscaping-assistant` ### User Story As a crew member (any role) I want to post comments on a specific day in the today view So that I can leave notes about the day's work for the team ### Context The today view currently has no way to leave freeform notes about the day. Crew leads and members need a place to jot down day-level observations — weather delays, equipment issues, schedule changes, etc. Comments should display the poster's role alongside their name so readers know context. Latest comments appear at the top (reverse chronological). ### File Targets Files the agent should modify or create: - `db/migrate/XXXX_create_daily_comments.rb` -- new DailyComment model (date, body, crew_member_id) - `app/models/daily_comment.rb` -- model with belongs_to :crew_member, validations - `app/controllers/daily_comments_controller.rb` -- create action scoped to date - `app/views/work_queue_items/index.html.erb` -- comments section below queue list - `app/views/daily_comments/_comment.html.erb` -- partial showing name, role badge, body, timestamp - `config/routes.rb` -- nested or standalone route for daily_comments - `app/assets/stylesheets/application.css` -- comment styling Files the agent should NOT touch: - `app/javascript/controllers/sortable_controller.js` -- unrelated ### Feature Flag none ### Acceptance Criteria - [ ] All roles (member, lead, admin, super_admin) can post comments on any day - [ ] Each comment displays the poster's name and role badge - [ ] Comments are ordered reverse chronologically (latest at top) - [ ] Comments are scoped to a specific date (work_date) - [ ] Empty comments are rejected (validation) ### Test Expectations - [ ] Model test: DailyComment validations (body presence, crew_member association) - [ ] Request test: create comment, verify it appears on the page - Run command: `bundle exec rspec spec/models/daily_comment_spec.rb spec/requests/daily_comments_spec.rb` ### Constraints - Use existing crew_member association for author identity - Role badge styling should reuse existing `.role-badge` CSS classes - No Turbo Streams needed for v1 — full page reload on comment post is fine ### 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#192
No description provided.