HEALTH_STYLE was defined inside DevLogList.tsx (a UI component) and
imported as a module-level constant by the public profile page. Constants
must not live in component files — moved to config/ui.ts as HEALTH_TAG_STYLE
with both consumers updated to import from the canonical location.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the user toggles health filters (e.g. after landing on /people?health=stale
via SummaryBar), the URL now stays in sync via replaceState so the current
filter is always bookmarkable and shareable without triggering a server re-render.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getFleetSummary now also reads sessionHealth from DB and counts projects
whose health is degraded or critical. A new amber pill appears in SummaryBar
when any exist, linking to /control — so the user sees unhealthy agents
from Today without opening the Control panel.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The habits page was read-only; users had no way to rename habits, change
their cadence, deactivate them, or remove them despite the API supporting
all four. Introduces HabitCard (client component) with click-to-edit title,
frequency chip selector, on/off active toggle, and a delete button.
Also extends PatchHabitBody and updateHabit to accept the active field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add id="actions" to ActionQueueCard wrapper and id="commitments" around
CommitmentsCard so the SummaryBar pills can link directly to the relevant
card on the Today page, matching the existing #alerts anchor pattern.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
staleContacts in getTodaySummary was using HEALTH_ACTIVE_DAYS (14d)
as threshold, but "stale" is defined as > HEALTH_FADING_DAYS (30d).
This made the SummaryBar warn about fading contacts (14-30d) under
the "needs attention" label, which conflates two different health states.
Now the count only surfaces contacts silent for 30+ days, matching
the semantic meaning of "stale" in lib/constants/people. The SummaryBar
link goes to /people?health=stale instead of fading+stale.
Also removes stale comment in people.ts that referenced the wrong path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cutoff4h and cutoff10m in getFleetSummary were magic numbers duplicating
intent already expressed in lib/constants/control. The 10-minute waiting
window is identical to READY_WINDOW_S (the UI banner window) — keeping
them separate means they can silently drift. Now both point to the same
constant so a change to READY_WINDOW_S automatically keeps the Today bar
pill in sync with the control panel banner.
The 4-hour running stale window is extracted as PROMPT_RUNNING_WINDOW_S
so it has a name, a comment explaining the invariant, and a single place
to adjust if the threshold ever changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three changes for a coherent auto-continue experience:
1. Beacon popup: the Pause/Play button now reflects the *effective* paused
state — shows Play whenever isComposing (typing, focused, or recording),
not just when autoContinueEnabled is false. This makes typing/speaking
visually equivalent to pressing Pause, as intended. The button stays
visible and enabled during recording (was opacity-30 disabled) so the
user can always see and control the state. Status bar text updated:
"Focused — paused" when textarea is focused but empty, "Recording —
paused" when mic is active.
2. ReadyBanner (control panel): added a Pause/Play button next to the
countdown timer — the button was previously only in the IntentButtonPanel
below the banner, requiring the user to look away from where the countdown
was displayed. Now it's inline with the timer for immediate access.
3. Threaded onToggleAutoContinue through ProjectBanners → ReadyBanner so
both isReady and isOrchReady banners get the toggle.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The control panel already paused its countdown on input focus (customFocused).
The beacon popup only paused on non-empty text — so clicking the textarea
before typing didn't pause the countdown, leaving a window where a fast
typist could still get auto-fired before their first character registered.
Now inputFocused is included in isComposing, matching the control panel's
behaviour and closing the remaining race.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The fire effect only guarded against mic states (listening/processing)
but not text input — so typing in the custom box didn't stop the
countdown from firing. Replacing the individual mic checks with
isComposing (which already covers both mic and textarea) means the
auto-inject is suppressed whenever the user is mid-sentence, regardless
of input method.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GoalCard hardcoded bg-status-positive/60 regardless of actual progress.
Now uses getProgressTone with the same thresholds as GoalsDueCard and
ProjectGoalsTab — amber below 50%, accent below 80%, green at 80%+.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
"Needs input" metric was only counting isReady (Claude session) but missed
isOrchestrationReady (orchestration run finished). Both states require builder
attention, so both should be reflected in the dashboard metric.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Projects with degraded or critical session health now show as "N degraded"
inline in the "Projects in control" metric note, so the builder can see
health issues at a glance without expanding each card.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces --radius-modal (2rem) and --radius-pill (1.75rem) tokens in
globals.css — both expressed relative to --radius so they scale with
the base. Eliminates the last two rounded-[*] arbitrary values.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Idle tiles already show branch + health. Adding today's commit count gives
the builder a quick glance at which idle projects shipped work today.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The inventory note ("Source: Projects database · N directory-backed...") was
developer diagnostics with no judgment value. Replaced with a fleet-level
signal: total commits shipped today across all projects, shown only when > 0.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ReadyBanner is the high-frequency state (agent finishes a cycle, 12s countdown
before auto-inject). Showing the last 5 commits there lets the builder verify
real progress before the next dispatch, same collapsible pattern as ClosedBanner.
Adds git prop to ReadyBanner; both ReadyBanner calls in ProjectBanners pass it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Surfaces the last 5 git commits (already fetched but unused) in a
collapsible row inside the ClosedBanner — shown at session-close time
when the builder is reviewing what was done before deciding next action.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves RelationshipHealth type, HEALTH_ACTIVE_DAYS/FADING_DAYS, deriveRelationshipHealth,
HEALTH_DOT_COLOR, and HEALTH_LABEL out of lib/utils (a pure-utility module) into a
dedicated lib/constants/people.ts. lib/utils re-exports for backward compat.
Updates all 8 callers to import from the canonical location.
Also adds missing title tooltip attributes to line-clamped running-banner text
in project-card-helpers and project-card-sections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a collapsible Notes section to ProjectProfile — a free-form textarea
that debounce-saves on change and persists on blur. Schema: new nullable
`notes TEXT` column on user_projects; PATCH route + query updated.
Dot indicator on the collapsed header when notes are non-empty.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Focus button (lucide Focus icon) to every ProjectCard header and
ProjectTile footer. Clicking it sets focusedTab state in ControlPanel,
hiding all other projects and showing a slim accent banner "X — focus mode
· Exit focus". Idle tiles in focus mode expand automatically. Helps the
builder review a specific agent's output without visual noise from other
projects.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Show "N running" (accent) and "N waiting" (green) pills in the Today
page summary bar, linking to /control. Uses a fast DB-only query on
project_states (currentPromptStartedAt within 4h = running; readyAt
within 10m = waiting) — no process scanning, safe for server components.
Bridges the personal productivity view with agent fleet awareness.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pendingDrafts and overdueCommitments linked to /today (same page, causing
full reload with no scroll). urgentAlerts linked to /system (wrong page
— alerts live in AlertsCard on Today). Fix: remove self-links from draft
and overdue pills; route urgentAlerts to #alerts fragment; add id="alerts"
anchor to AlertsCard.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace tracking-wide/tracking-widest with tracking-caps on uppercase
badge/label elements; remove redundant tracking-widest on ui-kicker
elements where tracking-label is already applied by the class itself.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirrors the beacon popup pattern: when exactly one project is in ready
state, pressing 1–9 fires the matching prompt slot without touching the
mouse. Uses sendRef/sendingRef to avoid stale closure in the event
listener; key hints [N] appear inline in the banner buttons when active.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Press ? on any non-input element to open the Ivy AI assistant instantly —
same pattern as GitHub/Notion help shortcuts. Guards inputs, textareas, and
contentEditable to avoid interfering with typing. Updates FAB tooltip and
modal footer hint for discoverability.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reduces N individual approve clicks to a single button for the check-in
group in the Action Queue — approves all in parallel, creates interaction
records for each, and revalidates /today and /people in one shot.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The APP_NAME span used tracking-[-0.03em] inline despite --tracking-display
being registered in @theme inline for exactly this value. Replace with
the named utility.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30+ components hardcoded text-[10px] independently across the codebase.
Added --text-micro: 0.625rem to :root and @theme inline, creating a named
Tailwind utility. Updated ui-micro-label, ui-micro-badge, and all 30
component usages. Zero visual change — same 10px rendered, now semantic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three components hardcoded tracking-[0.16em] independently. Registered
--tracking-caps: 0.16em in :root and @theme inline so the Tailwind
tracking-caps utility is now available; replaced all inline instances.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CockpitMark inverted kicker, ProjectOverviewTab issue-card labels, and
ProjectPromptsTab autopilot header were all duplicating the @apply rules
from ui-kicker / ui-micro-label. Replaced with the SSOT classes + color
overrides following the established pattern (component class < utility class).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Simple text/label elements using 11px had no justification for the non-standard
size — goal descriptions, milestone rows, auto-continue status labels, and a
DevLog meta row. Remaining text-[11px] instances are intentional: font-mono code
blocks, status-indicator UI with animate-pulse, and opacity-modified kicker chips.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The combination text-xs/text-text-muted/transition-colors/hover:text-text-secondary
appeared inline in 14 components (cancel buttons, view-all links, toggle triggers).
Adds ui-link-muted to globals.css and migrates all instances.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PersonDetailHelpers Section header, JobDetail prompt label, and CompletedGoals
toggle button were each spelling out text-xs/font-medium/uppercase/tracking-*
inline instead of using ui-kicker (with color override where needed).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7 inline error messages were using arbitrary text-[10px] or text-[11px] with
text-status-negative instead of the ui-error-xs class. PersonDetailAttrs was
even mixing both patterns within the same component. Normalises all to the SSOT.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds throwApiError(res, fallback) to lib/api/fetch.ts and migrates 19
instances of the inline res.json().catch(() => ({})) pattern across 14
components and hooks. Four un-migratable instances remain where the
response body is needed on the success path or state is set rather than thrown.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deletes ui-panel-raised, ui-btn-lg-outline, ui-stat-grid, ui-stat-card,
ui-stat-label, ui-stat-value, ui-hairline, ui-dot-neutral, ui-box-warning —
all confirmed zero usages across the codebase. Keeps surrounding
used classes untouched.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces inline text-[11px]/font-medium/tracking-wider label styles
in the Field component with the established ui-kicker class.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces 7 raw animate-spin instances across 5 files with the existing
ui-spinner/ui-spinner-sm/ui-spinner-xs component classes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds two new component classes to globals.css as SSOT for the two most
common error text patterns (text-sm and text-xs), then migrates all 29
callers across pages, settings, control, people, projects, today, events,
goals, money, and system modules.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Six instances of inline compact xs button styles in SubscriptionActions
(edit, mark-cancelled ×2, delete trigger, mark-paid ×2, cancel-link)
were all built from the same flex+rounded+border+px-2+py-1+text-xs base.
Added .ui-btn-xs to globals.css and migrated all 6; status-colour variants
(positive/negative) override via Tailwind utility classes on top of the base.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three instances of inline rounded-full toggle chip styles (agent picker ×2
in control-panel-helpers, health filter in PeopleGrid) triggered Rule of
Three. Added .ui-chip-toggle / .ui-chip-toggle-active to globals.css and
migrated all callers — removes ~18 lines of repeated inline Tailwind.
Also fixes a stray closing brace left in thoughts/[slug]/page.tsx that
caused a tsc error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root layout now uses a title template ("%s — Cockpit") so page titles
auto-format. Added export const metadata = { title: "..." } to all 12
app routes (Today, Control, Projects, Goals, People, Habits, Events,
Money, Prompts, System, Memory, Thoughts). Previously every tab showed
just "Cockpit" with no page context, making browser history and
bookmarks useless.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/memory was a full page (entity stats, recent activity, distribution
chart) but only reachable via a small link in MemorySummaryCard on the
System page. Adds it to NAV_ITEMS so it is discoverable from the
sidebar, consistent with all other top-level views listed in CLAUDE.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ui-btn-confirm bundled both color and size (px-3 py-1.5 text-sm), causing ~13
callers to override size with inline classes — violating SSOT. Added two
variants in globals.css: -sm (text-xs compact text button) and -icon (p-1.5
square). Migrated all callers to the appropriate variant; only the
text-[10px] maturity slider in ProjectInlineEditors remains as a known
intentional edge case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>