feat(calendar): grey out past appointments across all views (PMS-599) #395

Merged
longjacksonle merged 2 commits from feat/PMS-599-grey-past-appointments into main 2026-06-30 20:38:56 +02:00

PMS-599 (parent PMS-556 Calendar smoke)

Back-dated appointments should be enterable for record-keeping, must not trigger reminders, and should read as muted in the calendar.

What this changes (frontend only)

Adds a past_class helper (opacity-50 when end_time < now) and applies it to every appointment render site so elapsed events are muted, hovering un-mutes via the existing hover:opacity-*:

  • Commit 1: month chips, week + day time-grid blocks, day agenda list.
  • Commit 2: dispatch board blocks.

The other two acceptance criteria need no code

  • Past dates enterable (saves without error): already true. The create/edit form only checks end_time >= start_time; there is no min-date / not-in-past guard, so back-dating already works.
  • No reminders for past appointments: already guaranteed server-side. The calendar_reminders worker's selection is strictly forward-looking: the SQL pre-filter requires start_time > now for non-recurring rows, and an in-memory if occ_start <= now { continue; } guard skips every past occurrence (recurring included). A back-dated appointment is never fetched or queued. (Verified in mokosh-server calendar/service.rs::due_reminders + worker.rs.) No server change, no subtask needed.

Verified

dx build clean (35s), no warnings, fmt clean. Dev app serves this branch.

Test

Create an appointment with a start/end in the past, or open a week with elapsed events: past appointments render dimmed in Month / Week / Day / Dispatch; hovering restores full opacity. Saving a back-dated appointment succeeds and queues no reminder.

🤖 Generated with Claude Code

## PMS-599 (parent PMS-556 Calendar smoke) Back-dated appointments should be enterable for record-keeping, must not trigger reminders, and should read as muted in the calendar. ## What this changes (frontend only) Adds a `past_class` helper (`opacity-50` when `end_time < now`) and applies it to every appointment render site so elapsed events are muted, hovering un-mutes via the existing `hover:opacity-*`: - Commit 1: month chips, week + day time-grid blocks, day agenda list. - Commit 2: dispatch board blocks. ## The other two acceptance criteria need no code - **Past dates enterable (saves without error):** already true. The create/edit form only checks `end_time >= start_time`; there is no min-date / not-in-past guard, so back-dating already works. - **No reminders for past appointments:** already guaranteed server-side. The `calendar_reminders` worker's selection is strictly forward-looking: the SQL pre-filter requires `start_time > now` for non-recurring rows, and an in-memory `if occ_start <= now { continue; }` guard skips every past occurrence (recurring included). A back-dated appointment is never fetched or queued. (Verified in mokosh-server `calendar/service.rs::due_reminders` + `worker.rs`.) No server change, no subtask needed. ## Verified dx build clean (35s), no warnings, fmt clean. Dev app serves this branch. ## Test Create an appointment with a start/end in the past, or open a week with elapsed events: past appointments render dimmed in Month / Week / Day / Dispatch; hovering restores full opacity. Saving a back-dated appointment succeeds and queues no reminder. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Back-dated appointments are intentional (tracking), so add a past_class helper (opacity-50 when end_time < now) and apply it to the month chips, the week and day time-grid blocks, and the day agenda list. Elapsed events read as muted; hovering un-mutes via the existing hover:opacity-* on each block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(calendar): grey out past appointments in dispatch view (PMS-599)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m25s
Create release / Create release from merged PR (pull_request) Has been skipped
4be3246898
Apply the same past_class muting to the dispatch board's horizontal appointment blocks, so elapsed events read as muted there too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-599-grey-past-appointments 2026-06-30 20:38:56 +02:00
Sign in to join this conversation.
No reviewers
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
psa-systems/mokosh-apps!395
No description provided.