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
fix: resolve environment switching issues with stale server connections
Fixed three critical bugs that prevented proper environment switching:
1. Controller disposal race condition: Old controller was disposed before
the new controller was ready, causing "DISPOSED" errors during cell
execution. Fixed by deferring disposal until after new controller is
fully registered.
2. Stale configuration caching: Configuration object wasn't refreshed after
startServer(), so we connected with outdated serverInfo. Fixed by always
calling getEnvironment() after startServer() to get current server info.
3. Environment manager early return: startServer() had an early return when
config.serverInfo was set, preventing verification that the server was
actually running. This caused connections to wrong/stale servers when
switching TO a previously-used environment. Fixed by always calling
serverStarter.startServer() (which is idempotent) to ensure current info.
Additional improvements:
- Made kernel spec installation idempotent and ensured it runs when reusing
existing venvs
- Removed legacy auto-create fallback path that's no longer needed
- Added proper TypeScript non-null assertions after server info validation
0 commit comments