You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -340,3 +341,47 @@ For each service, the migration is roughly:
340
341
-`ShareNext` — migrated 2026-04-11. Swapped remaining async callers to `AppRuntime.runPromise(ShareNext.Service.use(...))`, removed the `makeRuntime(...)` facade, and kept instance bootstrap on the shared app runtime.
341
342
-`SessionTodo` — migrated 2026-04-10. Already matched the target service shape in `session/todo.ts`: single namespace, traced Effect methods, and no `makeRuntime(...)` facade remained; checklist updated to reflect the completed migration.
342
343
-`Storage` — migrated 2026-04-10. One production caller (`Session.diff`) and all storage.test.ts tests converted to effectful style. Facades and `makeRuntime` removed.
344
+
-`SessionRunState` — migrated 2026-04-11. Single caller in `server/routes/session.ts` converted; facade removed.
345
+
-`Account` — migrated 2026-04-11. Callers in `server/routes/experimental.ts` and `cli/cmd/account.ts` converted; facade removed.
-`FileWatcher` — migrated 2026-04-11. Callers in `project/bootstrap.ts` and test converted; facade removed.
349
+
-`Question` — migrated 2026-04-11. Callers in `server/routes/question.ts` and test converted; facade removed.
350
+
-`Truncate` — migrated 2026-04-11. Caller in `tool/tool.ts` and test converted; facade removed.
351
+
352
+
## Route handler effectification
353
+
354
+
Route handlers should wrap their entire body in a single `AppRuntime.runPromise(Effect.gen(...))` call, yielding services from context rather than calling facades one-by-one. This eliminates multiple `runPromise` round-trips and lets handlers compose naturally.
When migrating, always use `{ concurrency: "unbounded" }` with `Effect.all` — route handlers should run independent service calls in parallel, not sequentially.
379
+
380
+
Route files to convert (each handler that calls facades should be wrapped):
0 commit comments