feat: p2 batch 28-31 reminders lists comments bang stats

Calendar events support multiple reminder offsets with presets and per-user defaults.

Lists index adds inline task entry and list property editing.

Generic entity comments on list detail. New bangs.stats dashboard widget.

Closes Gitea #28, #29, #30, #31. Migrations 0022 and 0023.
This commit is contained in:
ginnoir
2026-07-04 22:17:35 -05:00
parent 7714b1187c
commit e1c2a090fb
31 changed files with 1287 additions and 92 deletions
@@ -0,0 +1,39 @@
# 89 — Calendar reminders overhaul
## Goal
Replace the single "Remind me 30 min before" checkbox with multiple reminders, presets, and custom offsets.
## What we decided
- Store multiple reminder rows per calendar event in the generic `reminders` table (drop one-per-entity unique constraint).
- Offsets are minutes before event start; presets + custom value/unit in UI.
- Per-user default offsets live on `users.default_event_reminder_offsets` (jsonb, default `[30]`).
- Notes/garden keep single-reminder behavior via delete-then-insert in `scheduleReminder`.
## Depends on
- 41 (reminders engine)
## Scope
- Migration: drop `reminders_entity_unique`, add `offset_minutes`, add user default column.
- `_core/reminders.ts`: `syncRemindersForEntity`, refactor `scheduleReminder`.
- Shared `ReminderPicker` component + offset helpers.
- Calendar create/edit + quick-add dialogs; sync reminders on create/update/delete.
- Optional: settings field for default reminder offsets.
## Out of scope
- Recurring reminders, snooze.
## Acceptance criteria
- [x] Users can add/remove multiple reminders on an event
- [x] Preset list and custom offset both work
- [x] Reminders fire via existing notification bus
- [x] Per-user default reminder preferences (stored + applied on new events)
## Notes
- Gitea: [ginnoir/famapp#28](https://gitea.ginnoir.com/ginnoir/famapp/issues/28)
+30
View File
@@ -0,0 +1,30 @@
# 90 — Lists index: inline task add + list property edit
## Goal
From `/lists`, add tasks and edit list properties without opening the full list page.
## What we decided
- Inline add input at the bottom of each list card (Enter to submit, same as detail page).
- Inline edit for list name and type via a small edit control on the card header.
- Reuse existing `addItem`, `renameList`, and extended `updateList` server actions.
## Depends on
- 11 (lists module)
## Scope
- Extend `listUpdateInput` to allow `type` changes.
- Update `lists-index.tsx` with add-item row and list property editor.
## Acceptance criteria
- [x] Add an item to a list from the index
- [x] Edit list properties from the index
- [x] Changes persist and match detail-page behavior
## Notes
- Gitea: [ginnoir/famapp#29](https://gitea.ginnoir.com/ginnoir/famapp/issues/29)
+39
View File
@@ -0,0 +1,39 @@
# 91 — Comments on lists and tasks
## Goal
Household members can comment on lists and individual list items using a reusable comment component.
## What we decided
- Generic `comments` table in `_core` keyed by `(entity_type, entity_id)`.
- Reusable `EntityComments` client component in `src/components/comments/`.
- Wired on list detail: list-level thread + per-item expandable comments.
- Entity-generic design so notes/other modules can adopt later without schema changes.
## Depends on
- 11 (lists module)
## Scope
- Migration: `comments` table.
- `_core/comments.ts`: list, add, delete (author-only).
- `EntityComments` UI.
- Lists detail page integration for `lists.list` and `lists.item`.
## Out of scope
- Comments on notes/calendar (future adoption of same component).
- Rich-text comments (plain text only).
## Acceptance criteria
- [x] Comment on a list
- [x] Comment on a task/item
- [x] Household members see each other's comments
- [x] Component is entity-generic (documented in brief)
## Notes
- Gitea: [ginnoir/famapp#30](https://gitea.ginnoir.com/ginnoir/famapp/issues/30)
+31
View File
@@ -0,0 +1,31 @@
# 92 — Bang stats dashboard widget
## Goal
A second bangs dashboard widget showing monthly/yearly counts and average days between bangs.
## What we decided
- Widget id `bangs.stats`, separate from `bangs.counter`.
- Aggregates computed server-side from `bang_events.occurred_on`.
- Works alongside edit/delete from task 83.
## Depends on
- Bangs module, 83 (edit/delete)
## Scope
- `getBangAggregates` query.
- `BangStatsWidget` component.
- Manifest registration.
## Acceptance criteria
- [x] Widget registered and placeable on dashboards
- [x] Shows monthly and yearly counts
- [x] Shows average days between bangs
## Notes
- Gitea: [ginnoir/famapp#31](https://gitea.ginnoir.com/ginnoir/famapp/issues/31)