- Move ProjectState, SessionState, GitState, ProjectProfile, CurrentPrompt, ControlData
from app/api/control/route.ts into lib/control-types.ts — fixes circular dep
(lib/control-fast-state was importing types from an API route)
- Update all 10 import sites (components, hooks, lib) to use lib/control-types
- Add ProjectRow named type to db/queries/projects.ts; replace ReturnType<typeof getProjects>
- Session summary text: remove line-clamp on done (full text visible), add select-text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same pattern as the previous commit: createCommitment/patchCommitment/
deleteCommitment added to queries/today, createProject/patchProject/
deleteProject added to queries/projects. Routes are now thin delegates.
Remaining inline DB in projects/[id] GET (5-table aggregation) and
me/route (username uniqueness check) are left in place — both have
legitimate complexity that belongs at the route boundary.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
API routes were doing inline db.insert/update/delete for people,
goals, events, and subscriptions — violating the thin-HTTP-layer rule.
Added createPerson/patchPerson/deletePerson to queries/people,
createGoal/patchGoal/deleteGoal/listActiveGoals to queries/goals,
createEvent/patchEvent/deleteEvent to queries/events, and
createSubscription/patchSubscription/deleteSubscription to queries/money.
Also moved goals/completedAt tracking and the subtree deletion logic
from the route into the query layer where business logic belongs.
Routes are now thin delegates: validate input, call query, return JSON.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deleted src/lib/switch-agent.ts (zero imports, ~70 lines of stale
shellEscape + buildAgentLaunchCommand copies). Replaced the local
buildLaunchCommand in control/agent/route.ts with the canonical
buildAgentLaunchCommand from agent-registry.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shellEscape was copy-pasted into 4 separate files with identical
implementations. getZellijTabs (async) was re-implemented in 3 API
routes and control/route.ts had its own private copy.
- Add shellEscape + getZellijTabs to src/lib/zellij.ts (the natural
home for zellij/shell interaction utilities)
- Remove all 4 local shellEscape definitions; import from zellij.ts
- Remove 3 local getZellijTabs implementations; import from zellij.ts
- Collapse the duplicated tab-resolution block in orchestration/run/
route.ts (claude + codex both queried zellij separately; now one
shared await before the adapter branch)
No behaviour change — identical logic, single definition.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1. gitignore: add .local-toolchain/ and .python-vendor/ (584 MB of
toolchain binaries that would never belong in the repo)
2. autoContinueEnabled: replace two-effect pattern (read + write) with
a lazy useState initializer. The old pattern had a race where the
write effect ran with the stale initial 'true' value before the read
effect could correct it, silently overwriting a user's 'off' preference
on every page load.
3. SENTINEL_VALIDITY_S: extract the duplicated 86400-second constant into
constants/control.ts as SENTINEL_VALIDITY_S, separate from the display-
window constants (READY/CLOSED/CLOSING_WINDOW_S). Two files had a
local 'const READY_WINDOW_S = 86400' that shadowed and conflicted with
the exported READY_WINDOW_S = 600 in constants/control.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fallback from selectedDefinition?.label to getAdapterLabel() so "codex"
renders as "Codex" before the control data SSE response arrives.
Also relabels the intent chip toggle from "···" to "More ↓" / "↑ Less"
so it's obvious what the button does.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ActionButtons compact mode: p-2 (32px) → p-3 + min-h/w-[44px] (44px)
meeting WCAG AA touch target standard for the daily action queue
- GoalCard toggle button: zero padding → p-1.5 -m-1.5 with hover:bg-surface-raised
making sub-goal completion circles obviously interactive and easier to tap
- SummaryBar pills: py-1.5 (24px) → py-2 (28px) on both Link and div variants
improving mobile tappability for status navigation chips
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- orchestration-events schema + queries: persistent event log for agent lifecycle
(input_requested, close_requested, task_started, session_closed events per project)
- navigation.ts: isCurrentPath helper for active-link detection in sidebar/nav
- codex-wrapper: snap Codex config bridge — copies ~/.codex/config.toml into the
snap home so the Snap-packaged Codex sees the user's model/API key configuration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- agent-hook-lib.sh resolve_tab: add pane-file fast path using ZELLIJ_PANE_ID +
/tmp/claude-pane-<ID> — fixes silent exit when multiple tabs share one directory
(Cockpit + Cockpit Claude both mapping to /home/g/dev/cockpit caused exact_count=2,
making the conf fallback give up; and the zellij_pid walk landed on the wrong process)
- beacon.py: read countdown_seconds key with countdown_secs fallback — settings file
uses countdown_seconds but code was reading countdown_secs, silently ignoring config
- inject/route.ts + orchestration/run/route.ts: also unlink claudeReady and claudeClosed
sentinel files on injection — previously only agent-ready was cleared, leaving
claude-ready as a fallback that kept ReadyBanner visible until agentRunning detected
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merge claude-config.ts into agent-config.ts (single SSOT for all state file paths,
project conf, sessions dir, and prompt file resolution)
- Delete claude-config.ts; all importers updated to use agent-config
- Add Gemini to agent registry with availability detection; update agent-catalog to
buildSwitchableAgentCatalog; add agent-preferences persistence
- Expand orchestration: add lifecycle state derivation, event persistence, and
shouldPersistLifecycleEvent guard in orchestration/state.ts
- Add thoughts-content.ts (SSOT for article metadata read from content/thoughts/)
- Add MOBILE_NAV_ITEMS export to navigation.ts; integrate into MobileNav
- AppShell: use useState lazy initializer for sidebar collapse (fixes react-hooks/set-state-in-effect)
- Sidebar: collapse to icon rail on smaller screens; AppShell shows user avatar + name
- Control: SSE stream for real-time fast-state updates; ReadyBanner auto-inject countdown
- Shell, prompts, settings, today, goals, events, people: styling and UX consistency pass
- Update error/loading/not-found to use design system tokens
- Package.json dependency updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProjectTile session.next is truncated for compact layout — hover now
reveals the full text via title attribute.
FeaturedCard descriptions are all short; line-clamp-3 was never
activating and only blocked future longer descriptions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent output and suggested message bodies should never be silently
truncated — users need to read the full content to act on it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Attribute values in PersonDetail can be URLs or long strings that get
silently truncated. Adding title={value} so hovering reveals the full
text without requiring a click to edit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PersonInteractionsSection: max-w-[180px] truncate silently cut off notes
after ~20 chars. Restructured each row — channel + date on one line,
summary on its own line below, free to wrap. Notes are now fully readable.
EventCard: remove line-clamp-2 on event descriptions for same reason.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SubscriptionsCard: return null when no upcoming bills — removes "No
bills due soon" placeholder card that showed every day.
GoalsDueCard + EventsDueCard: remove md:col-span-2 wrapper so they
sit side-by-side in the 2-column actionable grid on desktop.
CommitmentItem: remove line-clamp-2 — commitment descriptions shouldn't
be silently truncated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SessionSummary: remove inline kicker labels and tests/todos tertiary line.
Next task is plain primary text, done is muted xs below it. No more "next
[text]" / "done [text]" pattern — visual weight carries the meaning.
ClosedBanner: remove the tests status line.
LatestOrchestrationPanel: remove tests/todos/health tertiary line.
"no suite · 0 TODOs · good — tsc clean" is not card-level information.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the empty toolbar strip from ProjectCard and co-locates the
profile toggle (SlidersHorizontal) and collapse (ChevronsDown) buttons
in the card header's right cluster alongside the external URL link.
Profile icon highlights accent when the panel is open.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ProjectCard: replace Status/Profile tab bar with gear icon toggle
- ProjectCardHeader: merge Circle indicator inline with title, compact git row
- SessionSummary: remove git commit hashes, remove line-clamp truncation
- IntentButtonPanel: flatten primary+action into one chip row; icon-only auto-continue; single ··· overflow for more intents
- BrainConfigPanel: remove Change▼ toggle; always-inline agent chips + model input; Save/Apply only when hasPendingChange
- agent-catalog.ts: deduplicate modelSuggestions with Set to prevent "sonnet sonnet" repetition
- ClaudeSession (projects view): remove line-clamp, add Raw toggle to show full .md file, improve typography
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When ClosedBanner or ReadyBanner is showing, those banners already carry the
primary CTA (Continue / timed auto-continue). Showing the full intent button
panel simultaneously creates two action areas with overlapping purposes.
Now: when bannerActive, intent panel defaults to collapsed — shows only the
custom prompt input + 'More actions' link. User can expand for full access.
The expand state is local so re-collapsed on next render cycle.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- When agentRunning: intent button panel collapses to interrupt-only input.
A running agent needs no new task — showing 7 action buttons was noise.
- Remove 'Pause auto-continue' from the main button group (it was the same
visual weight as action buttons). Replaced with a tiny on/off toggle at
the bottom of the panel.
- Remove 'via X' sub-label from primary intent buttons — the header already
shows the selected agent.
- Replace hardcoded AGENTS array in ProjectProfile with dynamic registry
from switchableRegistry, threaded through ControlPanel → ProjectCard.
- Extract PromptInput as a shared subcomponent used in both running and
idle states.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Merges stat grid (3 big cards) + FleetStatusBar (text line) into a
single compact headerRight slot in BrainConfigPanel: ● N running,
waiting count, +N commits, timestamp, Refresh, New project
- Removes Zellij tabs pill section — terminal icon on each card already
shows which tabs are open
- Fixes currentAdapter bug: was reading saved API config (stale), now
reads selectedAgent (UI state), so "via X" labels on intent buttons
are always accurate
- Cleans up BrainConfigPanel: removes verbose capability description
paragraph, removes redundant "Selected" pill (already in header),
renames "Use detected default" → "Use default"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eight more text-text-muted uses upgraded to text-text-tertiary where
the content is informational: AutopilotCard next-run time, ProjectGoalsTab
progress %/milestone count, PersonInteractionsSection inbound arrow,
project-badges score, project-card-sections ×count, ProjectTile branch
name, ProjectPromptsTab schedule expression and job count.
Also replaced the fragile string comparison ("0 TODOs" / "0") in
ClaudeSession with a numeric parse so the check is robust against any
format variant the session renderer might produce.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PersonDetailAttrs: saveEdit/saveNew/deleteAttr all optimistically updated
local state without checking res.ok — UI showed success while server may
have rejected. PersonCard: onLogged fired on API failure, corrupting the
parent list's "last contacted" date. DeleteButton: now catches errors
from onDelete and shows them inline; three callers (EventCard,
PersonDetail, ProjectDetailHeader) updated to check res.ok and throw so
the error propagates correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SubscriptionActions onMarkPaid had a real data-integrity bug — setPaid(true) ran even when patchJson returned a non-ok response, showing 'Next due updated' on API failure. onSaveEdit similarly closed the form unconditionally. GoalCard handleAddChild and EventCard handleSave had no error display when the API returned an error response (form stayed open but user got no message). ProjectOverviewTab handleLogActivity same pattern. All four now check res.ok/data.ok, surface saveError, and clean up error state on cancel.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LogConversationButton, PersonInteractionsSection, PersonChannelsSection all had try/finally blocks that cleared the saving spinner on failure without showing any feedback. Users would see the spinner disappear and have no idea whether the save succeeded or failed. Added saveError state + error display to each, with proper catch paths and res.ok checks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JobDetail field labels (Model/Thinking/Timeout/Delivery), activity log timestamps, GoalsGrid empty states, ProjectOverviewTab activity meta and empty state, git sync result feedback, ProjectDetailHeader owner badge, ProfileSettings URL prefix — all upgraded from text-text-muted to text-text-secondary/tertiary. Remaining muted uses are intentional: inactive states, ghost placeholders ("Add a note…"), decorative separators and icons.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move scheduledDays() from habits/page into db/queries/habits as shared export (was duplicating isDueToday frequency logic)
- Extract INVITATION_EXPIRY_DAYS to lib/constants — was hardcoded as 7 in both the DB query and the UI string
- Upgrade PlaceholderView container from text-text-muted to text-text-tertiary
- Upgrade count badges (Commitments, Alerts), EventCard date, ActionQueue timestamps, Ivy reasoning text, SubscriptionActions labels from text-text-muted to text-text-secondary/tertiary so informational content is actually readable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HabitRow frequency label, AskIvy modal hint, public profile message,
ProjectsSettings dir/git paths, TeamSettings invite email — all now
use text-tertiary or text-secondary instead of text-muted (~2:1).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sidebar nav descriptions, GoalCard milestone count, control panel model
defaults, three project tab empty states (goals/activity/jobs), and
HabitsCard done count upgraded from text-muted (~2:1) to text-tertiary
or text-secondary for legibility across all remaining informational text.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Schedule labels ("every day at 9am"), "Never", and "Never run" status
upgraded from text-muted to text-tertiary for legibility.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Weekday habits (22 expected days) and weekly habits (4 expected days)
were divided by HABIT_HISTORY_DAYS (30), showing 73% and 13% for
perfect adherence. Added scheduledDays() to count the actual expected
completions for the frequency type within the window, so 22/22 weekday
completions now shows 100% instead of 73%.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getTodayHabits fetched only 6 days back and looped max 7 iterations,
capping streaks at 7 regardless of actual length. Switched to
HABIT_HISTORY_DAYS (30) to match getAllHabitsWithHistory, so the
Today habit row streak count is consistent with the Habits page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>