posit-dev / posit-dev/positron
Statement range executions currently aren't considered as `input_reply`s, is that right?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Check out this RStudio behavior where if we send input to the console from an editor with Cmd + Enter, then that input is used when we are in a readline() prompt:
https://github.com/user-attachments/assets/60578f31-c180-4c0f-95d4-0e538a953cab
Compare that with Positron, where instead the input is sent into a queue that only runs after the user manually types something into the Console
https://github.com/user-attachments/assets/f3f1c897-9e8a-43c7-9084-01381fbd6ff3
This briefly surprised me when creating this reprex. I had all the aaaaas in the editor and sent them to the console with cmd+enter.
https://github.com/posit-dev/ark/pull/536#discussion_r1773822974
Admittedly I never do this in practice, and could see an argument for requiring an "input reply" to be actual user input physically typed into the console (meaning there would not be a bug here). If that's the case, I think we should add a test for this case to prove to our future selves that we have thought about this behavior.
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 tracing how console input reaches a readline() prompt, using the behavior comparison and the discussion on ark#536 as context. Determine whether statement-range executions should count as input replies; completion means either matching RStudio's behavior with a regression test or documenting and testing the intentional queueing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- cli, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100