Refactor preview deployments to use a single shared Caddy gateway container
with subdomain routing (<previewId>.localhost:<port>) instead of one Caddy
sidecar and one port per preview. Adds dev/preview modes, git worktree
support for branch checkouts, and auto-start on phase:pending_review.
- Add GatewayManager for shared Caddy lifecycle + Caddyfile generation
- Add git worktree helpers for preview mode branch checkouts
- Add dev mode: volume-mount + dev server image instead of build
- Remove per-preview Caddy sidecar and port publishing
- Use shared cw-preview-net Docker network with container name DNS
- Auto-start previews when phase enters pending_review
- Delete unused PreviewPanel.tsx
- Update all tests (40 pass), docs, events, CLI, tRPC, frontend
Process source PNG into transparent icon set with auto-switching
SVG favicon (prefers-color-scheme media query), multi-size PNGs
for favicon.ico/apple-touch-icon/manifest, and web app manifest.
Matches VS Code / GitHub convention where file explorer sits on the left
and the main content area (diff viewer) takes the remaining space on the right.
- Add PhaseChangesRequestedEvent to event bus
- Add requestChangesOnPhase() to ExecutionOrchestrator: reads unresolved
comments, creates revision task (category='review'), resets phase to
in_progress, queues task for dispatch
- Expand merge-skip and branch routing to include 'review' category so
revision tasks work directly on the phase branch
- Add requestPhaseChanges tRPC procedure (reads comments from DB)
- Wire frontend: mutation replaces stub handler, window.prompt for
optional summary, loading state on button
- Add file "viewed" checkmarks with progress tracking (X/26 viewed in header + sidebar)
- Add directory-grouped file tree in sidebar with review progress bar
- Add sticky file headers that stay visible when scrolling through long diffs
- Add file change type badges (NEW/DELETED/RENAMED) with colored left borders
- Add syntax highlighting via shiki with lazy loading and progressive enhancement
- Add merge confirmation dropdown showing unresolved comments + viewed progress
- Make Approve & Merge button prominently green, Request Changes styled with error tokens
- Show full branch names instead of aggressively truncated text
- Add always-visible comment dots on lines with comments, subtle hover on others
- Improve hunk headers with two-tone @@ display and context function highlighting
- Add review progress bar to sidebar with file-level viewed state
- Track worktree removal success in autoCleanupAfterCompletion() instead of
always returning removed:true when removeAgentWorktrees() throws
- Add removeAgentBranches() call to auto-cleanup path (agent/* branches were
never cleaned after completion)
- Add filesystem cleanup (worktrees, branches, logs) to dismiss() to prevent
resource leaks until next server restart
- Add BranchManager.listCommits() and diffCommit() for commit-level navigation
- Add getPhaseReviewCommits and getCommitDiff tRPC procedures
- New ReviewHeader: consolidated toolbar with phase selector pills, branch info,
stats, integrated preview controls, and approve/reject actions
- New CommitNav: horizontal commit strip with "All changes" + individual commits,
each showing hash, message, and change stats
- Slim down ReviewSidebar: file list only with dimming for out-of-scope files
when viewing a single commit
- ReviewTab orchestrates all pieces in a single bordered card layout
commitRetryCount was being deleted in cleanupAgentState(), which runs
before tryAutoCleanup() checks the count. This reset the counter to 0
on every cycle, making MAX_COMMIT_RETRIES=1 dead code. Agents would
retry commits forever.
Move commitRetryCount cleanup to stop()/delete() only, letting
tryAutoCleanup() manage it during the retry lifecycle.
The orchestrator's agent:stopped listener only called scheduleDispatch(),
never marking the agent's assigned task as completed. Tasks stayed
in_progress forever after their agent finished.
Now handleAgentStopped() calls dispatchManager.completeTask() before
scheduling new dispatches, respecting requiresApproval and skipping
manual (user_requested) stops.
TaskGraph now accepts a `compact` prop that hides the second line
(category badge, priority) and uses tighter vertical padding. Blocked-by
count moves inline on the first line as "N deps". Pipeline phase cards
pass compact; the plan tab's phase detail keeps the full two-line layout.
Bump --border from L=16 to L=22 in dark mode, giving 11pt contrast
against card surfaces (was 5pt). Also bump --terminal-border to match.
Pipeline graph arrow tips: muted-foreground/40 → /60.
TaskGraph: remove opacity reduction on parallel container borders and
layer connectors so they use full border color.
The orphaned Execute button is now part of a summary bar that shows
pipeline stats (phase count, task count, running/completed indicators)
with the execute action anchored to the right. The bar is always visible,
providing context even when no phases are actionable.
Pipeline phase cards now use the same TaskGraph component from the plan
tab's phase detail panel. This gives tasks a two-line layout with rail
dot, status badge, category badge, priority, and dependency layer
connectors instead of the flat single-line display.
Removes PipelineTaskCard (no longer imported anywhere).
- Wider phase cards (w-64 → w-72) to reduce task name truncation
- Left border accent colored by phase status for quick visual scanning
- Task count (completed/total) in phase header
- Thin progress bar below header showing completion percentage
- Collapsible task lists: phases with >5 tasks collapse with "N more" toggle
- Blocked-by count styled as a pill badge ("3 deps" instead of "blocked by 3")
- Dashed column connectors with better spacing between pipeline stages
Per-phase Play button now shows for pending phases (with tasks) and
approves before queueing. Top-level Execute button counts both pending
and approved phases, approving pending ones first.
ExecutionOrchestrator now listens for phase:queued and agent:stopped
events to drive the dispatch cycle, closing the gap between queueing
phases (Execute button) and actually spawning agents. Coalesced
scheduling prevents reentrancy with synchronous EventEmitter.
Thin 6px scrollbars using design tokens (--border, --muted-foreground)
so they blend properly in both light and dark mode. Uses standard
scrollbar-width/scrollbar-color plus WebKit pseudo-elements for
cross-browser coverage.
Replace readFileSync/writeFileSync/mkdirSync with async equivalents from
fs/promises in default-credential-manager.ts and usage.ts to stop blocking
the Node.js event loop during credential read/write operations.
readFrontmatterFile, readFrontmatterDir, readSummary, readPhaseFiles,
readTaskFiles, readDecisionFiles, and readPageFiles all used readFileSync
and readdirSync which block the Node.js event loop during agent completion
handling. Converted to async using readFile/readdir from fs/promises and
added await at all call sites in output-handler.ts.
Removes blocking readFileSync, writeFileSync, and mkdirSync calls from the
agent spawn hot path, replacing them with async fs/promises equivalents to
avoid stalling the Node.js event loop during credential operations.
writeInputFiles, spawnDetached, and diagnostic writes now use
fs/promises (mkdir, writeFile) instead of mkdirSync/writeFileSync.
File writes in writeInputFiles are batched with Promise.all.
openSync/closeSync for child process stdio FDs remain sync as
spawn() requires the FDs immediately.
sendChatMessage was awaiting the full agentManager.spawn() which
includes worktree creation, ~50 writeFileSync calls for input files,
credential setup, and process spawning. This blocked the Node.js event
loop long enough to cause ECONNREFUSED on the SSE connection.
Now the mutation returns immediately after storing the user message
and creating the task. The heavy spawn work runs in a detached promise.
On failure, a system message is stored so the UI can display the error.
Agents were bulk-reading all context task files (39 files) because
filenames are opaque IDs and there was no way to find phase-relevant
tasks without reading every file. Now writeInputFiles generates a
context/index.json with tasksByPhase mapping phaseId to task metadata
(file, id, name, status). Prompt updated to direct agents to read
the index first.
Agents were reading all contextFiles (38 tasks + 8 phases) upfront,
wasting massive context window. Updated INPUT_FILES and SESSION_STARTUP
prompts to clearly distinguish assignment files (read all) from context
files (read only when needed).
Add findByProjectId to InitiativeRepository using a subquery on the
initiative_projects junction table. Extend the listInitiatives tRPC
procedure to accept an optional projectId filter that composes with
the existing status filter. Add a project dropdown to the initiatives
page alongside the status filter.
Adds startNewSession() to useChatSession hook that closes the current
session without closing the panel. New Plus button in chat header
appears when a conversation exists, with shift+click to skip confirm.
Pass targetId to buildChatPrompt and add <scope> block that clearly
distinguishes primary target files from context files. Context entities
may be modified when necessary (e.g. dependency links) but the agent
is instructed to focus changes on the primary target.
Added retry:true flag to sendChatMessage input. Server skips storing
the user message when retry is set. Frontend uses a dedicated
retryLastMessage function that skips the optimistic message add.
When the chat agent crashes (e.g., expired OAuth token), display the
error message inline with a Retry button that re-sends the last user
message. Input stays enabled so users can also send a new message.
The createContext call manually enumerates every field rather than
spreading, so the new repo was silently dropped even though it existed
on the options object.
The repo was created in container.ts but silently dropped because
TrpcAdapterOptions (which derives ServerContextDeps) was missing the
field. This caused 500 errors on all chat session procedures.
Each execute agent has significant startup cost (context loading, codebase
exploration, baseline tests). The previous sizing guidance (sweet spot
<150 lines, 1-3 files, merge at <20 lines) produced tasks too small to
justify that overhead.
New guidance targets cohesive feature units: 200-500 lines across 3-6
files as the sweet spot, merge threshold at <100 lines, and explicit
instruction to bundle related changes (validation + route + tests = one
task, not three).
Instrument Serif is inherently condensed and illegible at heading sizes.
Playfair Display is wider, has proper variable weight support (400-900),
and reads well at all sizes.
Instrument Serif only ships weight 400, so font-bold/font-semibold
caused ugly browser-synthesized faux-bold. Tracking-tight compressed
it further. Removed both and bumped sizes slightly to let the display
font breathe.