Previously the type was defined separately from any runtime value, so VALID_HEALTH
in the API route had to manually list the same values. Now the type is derived from
the const array, which is the SSOT. Adding a new health status requires one file change.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AttrRow now has a trash icon (group-hover reveal) that calls
DELETE /api/projects/[id]/attrs and reloads the panel.
Matches the delete capability in PersonDetail.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add trash icon to attr edit mode in DetailAttrs — visible when editing a row,
calls DELETE /api/people/[id]/attrs and updates lifted attrs state immediately.
Matches the delete capability already in ChannelsSection.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously null amount rendered as nothing, making the row look broken.
Now shows a dimmed dash with the currency code.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
EUR and GBP subscriptions were being bucketed into the USD total.
Now each currency is tracked separately in MonthlyBurn.
Monthly Burn stat card shows all non-zero currency totals.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously these 3 channel types fell back to MessageCircle (the WhatsApp icon),
making them visually identical to WhatsApp. Now each has a distinct icon.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Destructure paymentMethod prop properly and add its input field
to the inline edit form alongside amount/currency/notes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PATCH /api/subscriptions/[id] now also accepts name, vendor, paymentMethod
- SubscriptionActions gets an "Edit" button revealing an inline form for amount, currency, notes
- Amount and currency update immediately after save via router.refresh()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add multi-select filter chips (Active / Fading / Stale / Unknown) above the people grid.
Filters are OR-combined server-side via HAVING on last_interaction date thresholds,
so pagination works correctly across all 1,286 contacts.
Security: user search query stays parameterized via Drizzle sql tagged template;
health values come from validated RelationshipHealth enum (no injection surface).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add CompletedGoals client component — starts collapsed, expands on click.
Completed goals are done; they shouldn't dominate the view on page load.
Header shows count so user knows how many are hidden.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Switch Channels section to read from lifted `attrs` state (was `data.attrs`) so newly added channels appear immediately without a full reload
- Add ChannelsSection component with inline "Add channel" form: channel-type select + value input, saves to /api/people/[id]/attrs with key `channel:<type>`
- Per-channel delete via X button (group-hover reveal), calls DELETE /api/people/[id]/attrs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both subscription route files defined the same constants. Moved to the
existing config/subscriptions.ts which is already the SSOT for subscription metadata.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clicking the person's name in the detail panel opens an inline input.
Enter/blur saves, Escape cancels. 409 returned on duplicate name conflict.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same mapping was defined independently in PersonCard and PersonDetail.
Extracted to lib/utils.ts alongside deriveRelationshipHealth (its SSOT).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
"Mark paid" button advances nextDue by 1 month/quarter/year/week based on
frequency, then refreshes the page. One-time and cancelled subs excluded.
PATCH endpoint also supports updating amount, notes, currency, frequency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matches the same pattern as PersonDetail and ProjectDetail. Clicking the
description area (or the italic placeholder) opens an inline textarea.
Meta+Enter saves, Escape cancels. Disabled on completed goals.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also fixes inverted UUID guard in /api/projects/[id]/attrs (!!isValidUuid → !isValidUuid
was letting invalid UUIDs through and rejecting valid ones).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PATCH /api/goals/[id] already supported milestones updates but there was
no UI to add new ones. AddMilestoneInline appends to the array on Enter.
Also shows the Add button even when milestone count is 0 (for active goals).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DELETE /api/subscriptions/[id] endpoint added. SubscriptionActions now always
renders — delete button visible for every subscription; cancel-at-provider,
mark-cancelled, and free-alternatives only shown when SUBSCRIPTION_META exists.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PATCH /api/people/[id] updates entity description (empty string → null)
- PersonDetail shows description as click-to-edit field (textarea, Escape=cancel, ⌘Enter=save)
- Description was previously in the type but never rendered — now visible and editable
- State lifted so description updates immediately without panel reload
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getGoals now left-joins entities to include entityName alongside entityId.
GoalCard renders a small FolderKanban icon + project name when a goal is linked,
making the goal→project connection visible from the Goals page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
deriveHealth was defined identically in PersonDetail (client) and people.ts (server).
Extracted as deriveRelationshipHealth + RelationshipHealth type to lib/utils, which
is importable by both. Removed both local copies.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Lifted interactions state to PersonDetail so header and InteractionsSection share it
- Header now shows colored dot (green/yellow/red/gray) + label with last-contact tooltip
- Health updates immediately when a new interaction is logged (no reload needed)
- deriveHealth mirrors the same 14d/30d thresholds used in the people grid
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- POST /api/people creates entities with type=person, handles duplicate name (409)
- NewPersonButton modal: name (required, Enter-to-save, Escape-to-cancel) + notes
- Wired into PageLayout right slot on /people page
- Follows same pattern as NewGoalButton and NewSubscriptionButton
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UUID_RE was defined identically in 8 separate API route files, violating DRY.
Extracted to lib/utils as UUID_RE + isValidUuid() helper; all routes now import
from the single SSOT.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
calculateMonthlyBurn was including one-time payments in recurring burn totals
and treating weekly subscriptions as monthly (undercounting by 4.33×).
Now excludes one-time payments and applies 52/12 multiplier for weekly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New POST /api/subscriptions endpoint (name required, currency/frequency validated)
- NewSubscriptionButton modal form wired into money page header
- Replace confirm() in SubscriptionActions with inline confirmCancel state (matches DeleteGoalButton pattern)
- Parallelize getActiveSubscriptions/getAllSubscriptions/getFinancialCommitments with Promise.all
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PeopleGrid was fetching /api/people 300ms after mount with the same
q=""&sort=recent data the server already rendered. Skip it by flagging
the first effect with a ref — only real user interactions trigger a fetch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Alerts had an actionUrl column populated by Ivy ("/people", "/goals")
that AlertsCard silently ignored. Now renders a "View →" link in the
alert's accent color when actionUrl is set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added getGoalsDueSoon() query and a GoalsDueCard server component that
renders when active goals have target dates within 14 days. Shows goal
title, progress bar, and relative deadline. "Cockpit Phase 1 (85%, due
Apr 30)" now surfaces on the Today page without requiring nav to Goals.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added goalsDueSoon count to getTodaySummary (parallel query) and an
amber pill in SummaryBar. "Cockpit Phase 1" (85%, due Apr 30) was
completely invisible on the Today page — now it shows "1 goal due soon".
Also removed getUpcomingEvents dead code: the events table has no date
data and CalendarCard covers real calendar events via the external tool.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>