GT for VS Code stops working after the connected workspace is closed
- Dominant language
- JavaScript
- Stars
- 3.6k
- Forks
- 133
- PR merge metrics
- No merged PRs in 30d
Description
Extensions are run once per workspace, so if there are two workspaces open, GhostText will open the port in one and then fail in the other one.
If the first workspace is closed, the other one does not attempt to open the port again.
Tasks:
- [x] Add enable/disable server commands, so that the user can try to restart the server
- [ ] Detect workspace closures and try to reopen the server
- [ ] Potentially look into launching a persistent child process and orchestrate VS Code from there, bypassing this setup (this would involve additional message passing step, so it's a last resort)
This also causes:
- https://github.com/fregante/GhostText/issues/274
Contributor guide
Research direction
Start by reviewing the VS Code extension's existing enable/disable server commands and how it handles workspace lifecycle events. Reproduce the case with two workspaces, close the workspace that opened the port, and verify that the remaining workspace reopens the server without requiring manual intervention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100