feat: Add "Reload Extension" button when LS fails to start
Description
Follow-up to !3187 (merged) which added the LS startup status bar indicator.
When the Language Server fails to start, the error notification now includes a "Reload Extension" button that triggers a full extension reload via workbench.action.reloadWindow, ensuring all extension state is cleanly re-initialized.
Related Issues
References #2282 (closed) (disable Duo status bar item is TBD in the follow up)
How has this been tested?
In the LS, delay the initialize handler by more than 30 seconds:
await new Promise((resolve) => setTimeout(resolve, 35000));Link the updated LS in the extension running bun run watch -- --editor=vscode.
After 30s the error notification fires with two buttons: "Reload Extension" and "Show Logs". Clicking "Reload Extension" reloads the VS Code window and the extension restarts.
Aftre reload you can remove the delay in the LS and once LS is rebuilt and copied to the VSCode assets, next "Reload extension" will start extension normally
- If
src/browserorsrc/commonhas been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. - Consider an end-to-end test for significant new features that aren't covered by integration tests.
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog - None - other non-user-facing changes
