leanprover / leanprover/lean-workbench

External process shutdown is not handled

Open
#61 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
9
Forks
1
Avg merge
2d 3h
Merged PRs (30d)
35

Description

The vscServers map (and collabServers as well, probably)
https://github.com/leanprover/lean-workbench/blob/c3240a71af4faa54dfe5e22b15f4fc25eda7206b/src/lib/server/editorSessions.ts#L138
is not updated correctly when a VSC process dies of its own accord (as opposed to being killed by Next.js). We are left with a broken entry in vscServers that is never removed, preventing the user from reopening their project.

The fix seems to be to call dispose in proc.once('close', .. in VscodeServerHandle, but the state machine is complicated and this might cause other issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/lib/server/editorSessions.ts around line 138 and trace VscodeServerHandle, especially the proc.once('close', ...) path. Confirm that an independently exiting VSC process removes its vscServers entry, consider the corresponding collabServers state, and verify that the user can reopen the project afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.