v0.18.0 — Locations Quick setup + place-based reminders (#4 groundwork)

#4 cleanup + Tony's house structure.

- Task.locationId (migration): reminders can attach to a place, not just a
  plant/item/animal. Add one from a location's menu (e.g. clean gutters on House >
  Exterior); the Reminders page + tasks service surface the linked location/item/
  animal.
- Locations "Quick setup": paste/confirm an indented outline → creates the nested
  tree (find-or-create by name+parent, idempotent), pre-filled with the Moon
  homestead house layout. Optional "sweep existing garden areas under Yard" moves
  every top-level place that holds plants under a new Yard parent — the
  'move all the yard stuff to a new top level' ask.
- Pure outline parser (src/lib/locations/outline.ts, +4 tests); bulk setup service
  + /api/locations/bulk. Verified end-to-end: nested tree + paths, garden sweep,
  place reminder.

Yard sub-bucketing deferred per Tony.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 02:33:52 -05:00
parent 4aacffdf4e
commit ddc0a60a0c
13 changed files with 392 additions and 6 deletions

View File

@@ -102,6 +102,7 @@ model Location {
plants Plant[]
items Item[]
animals Animal[]
tasks Task[]
@@index([parentId])
@@index([kind])
@@ -242,6 +243,8 @@ model Task {
item Item? @relation(fields: [itemId], references: [id], onDelete: SetNull)
animalId String?
animal Animal? @relation(fields: [animalId], references: [id], onDelete: SetNull)
locationId String?
location Location? @relation(fields: [locationId], references: [id], onDelete: SetNull)
recurrence RecurrenceType @default(YEARLY)
intervalDays Int? // for CUSTOM: every N days
month Int? // 112: for YEARLY, which month
@@ -256,6 +259,7 @@ model Task {
@@index([plantId])
@@index([itemId])
@@index([animalId])
@@index([locationId])
@@index([active])
}