Skip to content

feat: add WindowManager.is_session_starting() - #3081

Merged
rwols merged 1 commit into
mainfrom
feat/is-session-starting
Oct 18, 2026
Merged

rwols merged 1 commit into
mainfrom
feat/is-session-starting

Conversation

@rchl

@rchl rchl commented Oct 16, 2026

Copy link
Copy Markdown
Member

Adds WindowManager.is_session_starting(), which reports whether a session is being started in the window: the server is being installed, started, or LSP is waiting for the response to initialize. Such a session isn't returned by get_sessions() yet, so there was no public way to tell that a session is on its way.

lsp_smoke_test needs this to end all sessions after a test: a session that is still starting can only be ended once it has started, and if it's left running, it can affect the next test. It currently reads WindowManager._new_session, which only covers waiting for initialize, not installing the server, and doesn't exist on feat/asyncio (see the matching PR for that branch).

On main, a start is in progress while _new_listener is set, which covers installing, starting and initializing, and further views wait in _pending_listeners.

test_sends_did_open_to_multiple_sessions checks that it's False once the sessions have started.

@rchl

rchl commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

I need to think whether it makes sense to have like a session_name argument...

@rchl

rchl commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

For its purpose I think it's fine as is.

@rwols
rwols merged commit edaf7e3 into main Oct 18, 2026
9 checks passed
@rwols
rwols deleted the feat/is-session-starting branch October 18, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants