Skip to content

Conversation

@juliasilge
Copy link
Contributor

This PR addresses:

With this change, you can now correctly use the UiFrontendEvent.OpenEditor event such as via rstudioapi::navigateToFile() on a web build:

Screenshot 2025-12-06 at 4 49 05 PM

It also makes reprex work:

Screenshot 2025-12-06 at 4 49 57 PM

This is similar to #10092 so I did a bit of an audit and fixed one more example of us inappropriately handling the scheme.

Release Notes

New Features

  • N/A

Bug Fixes

  • Workbench: fixed a bug when opening editors such as with rstudioapi::navigateToFile() or when using reprex

QA Notes

If you have a real file that really exists at a /real/path/that/does/exist, then with this PR you should be able to successfully run .ps.ui.navigateToFile("/real/path/that/does/exist") from the R console both:

  • in a regular desktop build (this always worked)
  • in a web build (this is now fixed with this PR)

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

Comment on lines +267 to +270
const uri = URI.from({
scheme: this._pathService.defaultUriScheme,
path: openWith.path
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered if maybe this would fix #10893 but sadly, it does not. I still think we should make this change because this event won't do the right thing without this fix.

@juliasilge juliasilge marked this pull request as ready for review December 7, 2025 21:30
@juliasilge juliasilge requested a review from jennybc December 7, 2025 21:30
Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not personally brought up a dev build (especially on a relevant platform, e.g. remote/web) to run this (my brain is elsewhere atm), but this certainly has the distinct ring of "yes, this is the way". So with that caveat, LGTM.

@juliasilge juliasilge merged commit 6550044 into main Dec 8, 2025
12 checks passed
@juliasilge juliasilge deleted the bugfix/rpc-open-editor-event-reh branch December 8, 2025 18:22
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants