posit-dev / posit-dev/ark

Behavior of `options(browse =)` outside of Positron

Open
#588 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: jupyter kernel
Dominant language
Rust
Stars
337
Forks
32
Avg merge
8d 17h
Merged PRs (30d)
11

Description

Right now we always override options(browse =) and add our special Positron specific behavior. This isn't great for Jupyter kernels

https://github.com/posit-dev/ark/blob/738afbaa7984b592f8ab78bd714e04efe8bbf09c/crates/ark/src/browser.rs#L37-L59

From @lionel-

The right thing to do outside Positron is to use the default action, i.e. open in a web browser. So we should not set up that option unless Positron is connected. Ideally Positron would inject the option via its init file. Or the UI comm could launch an idle task to do it, but there would a short time where the option is not set with this approach.

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 in crates/ark/src/browser.rs around lines 37-59 and trace how the browse option is set and how a Positron connection is identified. Verify the behavior in a Jupyter kernel outside Positron, then confirm that the default browser action remains available there while the special option is used only when Positron is connected.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, rust
Domain
backend
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.