posit-dev / posit-dev/positron

`RSessionManager.getConsoleSession()` needs to learn about the multi-console world

Open
#6,980 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lang: r theme: multisession console
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

https://github.com/posit-dev/positron/blob/de61cedbbc6945692bff1453244af69b44c69aba/extensions/positron-r/src/session-manager.ts#L150-L181

This currently is unaware of multi-console, and will always choose the newest created R session. That means if you:

  • Start R 1
  • Start and switch to R 2
  • Switch back to R 1

Then IIUC getConsoleSession() will pick R 2 as the console session, which is not right.

Contributor guide

Open the contributing guide

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

Start with extensions/positron-r/src/session-manager.ts lines 150-181 and inspect how getConsoleSession() selects among R sessions. Reproduce the three-step sequence in the issue; done means switching back to R 1 causes getConsoleSession() to choose R 1 rather than the newest-created R 2.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
desktop, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.