Effect loose ends
Small follow-ups that do not fit neatly into the main facade, route, tool, or schema migration checklists.
Config / TUI
-
cli/cmd/tui/config/tui.ts- finish the internal Effect migration. Keep the current precedence and migration semantics intact while converting the remaining internal async helpers (loadState,mergeFile,loadFile,load) toEffect.gen(...)/Effect.fn(...). -
cli/cmd/tui/config/tui.tscallers - once the internal service is stable, migrate plain async callers to useTuiConfig.Servicedirectly where that actually simplifies the code. Likely first callers:cli/cmd/tui/attach.ts,cli/cmd/tui/thread.ts,cli/cmd/tui/plugin/runtime.ts. -
env/index.ts- already usesInstanceState.make(...).
ConfigPaths
-
config/paths.ts- split pure helpers from effectful helpers. KeepfileInDirectory(...)as a plain function. -
config/paths.ts- add aConfigPaths.Servicefor the effectful operations so callers do not inheritAppFileSystem.Servicedirectly. Initial service surface should cover:projectFiles(...)directories(...)readFile(...)parseText(...)
-
config/config.ts- switch internal config loading fromEffect.promise(() => ConfigPaths.*(...))toyield* paths.*(...)once the service exists. -
cli/cmd/tui/config/tui.ts- switch TUI config loading from asyncConfigPaths.*wrappers to theConfigPaths.Serviceonce that service exists. -
cli/cmd/tui/config/tui-migrate.ts- decide whether to leave this as a plain async module using wrapper functions or effectify it fully afterConfigPaths.Servicelands.
Notes
- Prefer small, semantics-preserving config migrations. Config precedence, legacy key migration, and plugin origin tracking are easy to break accidentally.
- When changing config loading internals, rerun the config and TUI suites first before broad package sweeps.