Add nine new feature modules with settings UI#61
Add nine new feature modules with settings UI#61Josh-wt wants to merge 15 commits intoaaditagrawal:mainfrom
Conversation
Server: - Add CostTracking, AuditLog, CI, ProviderRouter, TaskDecomposition, ProjectMemory, Presence, Pipeline, and Workflow services with full SQLite persistence (migration 020) - Wire all services into server.ts using Layer.mergeAll / provideMerge to stay within TypeScript's 20-arg pipe limit - Add comprehensive RPC handlers in ws.ts for all new services - Add mock stubs in server.test.ts to satisfy test layer requirements Client: - Add contract schemas and types for all 9 feature domains - Add client-side stores (costStore, auditStore, ciStore, etc.) - Add Features settings panel (FeaturesPanels.tsx + route) - Extend RPC client (wsRpcClient.ts) with new service methods Queue/Steer follow-up behavior (inspired by upstream PR pingdotgg#1479): - Add followUpBehavior: "steer" | "queue" setting to AppSettings - Queue mode holds follow-up messages while a turn is running and auto-dispatches them when the turn settles (transition-based effect) - Steer mode (default) sends messages immediately as before - Cmd/Ctrl+Shift+Enter inverts behavior one-off in either mode - ComposerQueuedFollowUpsPanel shows queued items with remove buttons - Queue clears on thread switch; failed dispatches re-queue https://claude.ai/code/session_01XF5adFusgTx5Fb1Qhc8MeC
…-plan Parameterize SQL queries, add pagination guards, and refine presence/memory handling
feat: implement 11 feature services + queue/steer follow-up behavior
- Add thread.branch-from-checkpoint case to commandToAggregateRef in OrchestrationEngine.ts; the new command type uses sourceThreadId/ newThreadId instead of threadId, causing TS2339 after we added ThreadBranchFromCheckpointCommand to the contracts union - Simplify deleteTemplate in WorkflowService.ts to eliminate the unnecessary Effect.gen wrapper (TS5 message) - Change error channel type in server.ts runServer from any to unknown to suppress TS28 anyUnknownInErrorContext warnings propagating through cli.ts and bin.ts https://claude.ai/code/session_01XF5adFusgTx5Fb1Qhc8MeC
…heck The anyUnknownInErrorContext lint rule (TS28) fires for both any and unknown in the error channel. Changing the prior session's unknown to never correctly models a fully-launched server layer (all typed errors are handled internally; unhandled failures are fatal) and eliminates the TS28 propagation through cli.ts, bin.ts, and cli.test.ts. bun typecheck now exits 0 with only pre-existing TS32 informational messages (Effect.runFork inside Effect, pre-existing upstream). https://claude.ai/code/session_01Nxa3JfS5jZVHsnJmaaHvbW
fix: resolve typecheck/lint failures from feature-services PR
…rtup Migration 020 created a memory_fts FTS5 virtual table and three triggers. SQLite distributions without FTS5 support (Node.js built-in SQLite, some Bun builds) fail the migration mid-way. Because the migration runs inside the Effect setup layer that is composed with Layer.provideMerge alongside makeRuntimeSqliteLayer, a migration failure causes the entire persistence layer construction to fail — SqlClient is never registered in the Effect context, so every downstream service reports the misleading error: Service not found: effect/sql/SqlClient Fix: - Drop the memory_fts virtual table, insert/delete/update triggers from migration 020 (no schema change is needed for already-run migrations since the tables were in the same transaction and will re-run cleanly on a fresh DB, and users who ran it successfully already have those tables harmlessly present) - Replace the FTS5 MATCH query in ProjectMemoryService.search with three LIKE predicates across title, content, and tags columns - Remove the FTS5 index rebuild from ProjectMemoryService.index (forceReindex becomes a no-op, which is fine for LIKE search) bun typecheck passes (7/7 packages). https://claude.ai/code/session_01Nxa3JfS5jZVHsnJmaaHvbW
fix: remove FTS5 dependency to fix SqlClient Service not found at startup
fix(server): provide sqlite client before migration setup
…9ckusd Unify SQLite client import for bun/node and ensure setup layer receives SQLite client
…setup Layer.provideMerge(self, that) feeds `that` into `self`. The `setup` layer needs SqlClient.SqlClient (to run PRAGMAs and migrations), while `makeRuntimeSqliteLayer` produces it. Having them swapped left `setup` with no SqlClient in context, causing "Service not found: effect/sql/SqlClient". Reverts the arg-order change introduced in f44e39f. https://claude.ai/code/session_01BpwxjJ9XzBeAXjRp86E9Jr
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (48)
📝 WalkthroughWalkthroughThis PR introduces a comprehensive suite of nine domain services (audit logging, CI integration, cost tracking, project memory, pipelines, presence, provider routing, task decomposition, workflows) with database persistence, real-time event streaming, WebSocket RPC endpoints, web client state management, and a new settings UI panel for feature configuration and monitoring. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client/Browser
participant WSServer as WebSocket Server
participant Service as Domain Service
participant PubSub as PubSub (in-memory)
participant DB as Database
rect rgba(100, 150, 200, 0.5)
Note over Client,DB: Unary RPC Operation Example (Cost Recording)
Client->>WSServer: request (cost.recordUsage)
activate WSServer
WSServer->>Service: recordUsage(input)
activate Service
Service->>DB: INSERT INTO cost_entries
activate DB
DB-->>Service: entry created
deactivate DB
Service->>PubSub: publish (cost.entry)
Service->>DB: SELECT matching budgets
DB-->>Service: budgets
Service->>DB: UPDATE budget spend
DB-->>Service: updated
Service->>PubSub: publish (cost.alert) [if threshold met]
Service-->>WSServer: success (CostEntry)
deactivate Service
WSServer-->>Client: response
deactivate WSServer
end
rect rgba(150, 100, 200, 0.5)
Note over Client,PubSub: Stream Subscription Example
Client->>WSServer: subscribe (cost.onEvent)
activate WSServer
WSServer->>PubSub: Stream.fromPubSub(pubsub)
activate PubSub
Note over PubSub: Service publishes event
PubSub-->>WSServer: event (cost.entry | cost.alert | cost.budget.updated)
WSServer-->>Client: stream (event)
deactivate PubSub
deactivate WSServer
end
rect rgba(200, 150, 100, 0.5)
Note over Client,DB: Pipeline Execution Flow
Client->>WSServer: request (pipeline.execute)
activate WSServer
WSServer->>Service: execute(pipelineId)
activate Service
Service->>DB: SELECT pipeline + stages
DB-->>Service: stages with dependencies
Service->>Service: topological sort
Note over Service: For each stage (in dependency order)
Service->>DB: UPDATE stage status → running
Service->>PubSub: publish (stage.started)
Service->>DB: UPDATE stage status → completed
Service->>PubSub: publish (stage.completed)
Service->>DB: UPDATE execution status
Service->>PubSub: publish (pipeline.completed)
Service-->>WSServer: success
deactivate Service
WSServer-->>Client: response
deactivate WSServer
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
What Changed
This PR introduces nine new feature modules with complete backend services, frontend stores, contract definitions, and a unified settings UI panel:
Each module includes:
*Service.ts)*Store.ts)packages/contracts/src/*)A new Features Settings Panel (
FeaturesPanels.tsx) provides a tabbed UI to view and manage all nine features with real-time event streaming.Why
These modules provide foundational infrastructure for:
The modular design allows each feature to be independently enabled, configured, and monitored through a unified settings interface.
UI Changes
Added
/settings/featuresroute with a tabbed panel showing:Each tab streams live events and provides CRUD operations for its domain.
Checklist
https://claude.ai/code/session_01BpwxjJ9XzBeAXjRp86E9Jr
Summary by CodeRabbit
New Features