posit-dev / posit-dev/positron
Jupyter: Refreshing the UI starts new comms instead of reusing existing ones
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
After a normal start of ark we have 3 comms (frontend, environment, LSP):
[[R] 2023-08-22T09:31:58.621265000Z [ark-unknown] INFO crates/amalthea/src/comm/comm_manager.rs:134: Comm channel opened; there are now 3 open
But after a refresh of the UI we start all 3 again and we end up with 6 comms total:
[R] 2023-08-22T09:32:53.875875000Z [ark-unknown] INFO crates/amalthea/src/comm/comm_manager.rs:134: Comm channel opened; there are now 6 open comms
I also see that there are now two environment threads running in ark instead of one. (The LSP and frontend threads on the other hand don't have duplicates.)
I'm guessing we need to add to our protocol/startup process a query for reattaching to an existing comm if any?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading crates/amalthea/src/comm/comm_manager.rs and tracing the protocol/startup path used when the Jupyter UI refreshes. Reproduce a normal start followed by a refresh, then compare the comm and environment-thread logs. Done means refreshing reuses the existing comms and leaves only one environment thread instead of opening duplicates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, rust, typescript
- Domain
- api, backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100