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
Current instance route files live under `src/server/routes/instance/httpapi`.
43
+
Most handlers already yield stable services at route-layer construction and then
44
+
close over those services in endpoint implementations.
51
45
52
46
Files still worth tracking here:
53
47
54
-
-[ ]`server/routes/instance/session.ts` — still the heaviest mixed file; many handlers are composed, but the file still mixes patterns and has direct `Bus.publish(...)` / `Session.list(...)` usage
55
-
-[ ]`server/routes/instance/index.ts` — mostly converted, but still has direct `Instance.dispose()` / `Instance.*` reads for `/instance/dispose` and `/path`
56
-
-[ ]`server/routes/instance/file.ts` — most handlers yield services, but `/find` still passes `Instance.directory` directly into ripgrep and `/find/symbol` is still stubbed
57
-
-[ ]`server/routes/instance/experimental.ts` — mixed state; many handlers are composed, but some still rely on `runRequest(...)` or direct `Instance.project` reads
58
-
-[ ]`server/routes/instance/middleware.ts` — still enters the instance via `Instance.provide(...)`
59
-
-[ ]`server/routes/global.ts` — still uses `Instance.disposeAll()` and remains partly outside the fully-composed style
48
+
-[ ]`handlers/session.ts` — still the heaviest mixed file; some paths keep compatibility translations and direct event publication
49
+
-[ ]`handlers/experimental.ts` — mixed state; some handlers still rely on request-local context reads
50
+
-[ ]`middleware/*` — still contains compatibility policy for auth, compression, errors, instance context, and workspace routing
51
+
-[ ]`public.ts` — still owns SDK/OpenAPI compatibility translation shims
52
+
-[ ] raw route modules — WebSocket and catch-all routes should stay explicit and avoid rebuilding stable layers per request
60
53
61
54
## Notes
62
55
63
-
- Route conversion is now less about facade removal and more about removing the remaining direct `Instance.*` reads, `Instance.provide(...)` boundaries, and small Promise-style bridges inside route files.
64
-
-`jsonRequest(...)` / `runRequest(...)` already provide a good intermediate shape for many handlers. The remaining cleanup is mostly consistency work in the heavier files.
56
+
- Route conversion is now less about backend migration and more about removing the remaining direct `Instance.*` reads, request-local service plumbing, and OpenAPI compatibility shims.
57
+
-Prefer route-layer service capture over rebuilding or providing stable layers inside individual handlers.
0 commit comments