Skip to content

e2e test - zoom plot #8370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Jul 23, 2025
Merged

e2e test - zoom plot #8370

merged 58 commits into from
Jul 23, 2025

Conversation

rodrigosf672
Copy link
Contributor

@rodrigosf672 rodrigosf672 commented Jul 1, 2025

Verify that plot zoom works.

QA Notes

@:web @:win @:plots

  • default play button based on defined
  • await for plot before timeout?
  • uncomment R (and put it under the R tests)
  • {language} - {description}
  • UI that gives away that the plot has actually loaded (since relying on element doesn't work)

@rodrigosf672 rodrigosf672 requested a review from testlabauto July 1, 2025 20:00
Copy link

github-actions bot commented Jul 1, 2025

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

readme  valid tags

@rodrigosf672 rodrigosf672 changed the title e2e test - zoom plot e2e test - zoom plot (draft) Jul 1, 2025
menuTrigger: page.getByLabel('Fit'),
menuItemLabel: '200%'
});
await page.waitForTimeout(2000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to check for the plot instead of a wait? These can just be very brittle, but sometimes I know they are unavoidable.

Copy link
Contributor Author

@rodrigosf672 rodrigosf672 Jul 1, 2025

Choose a reason for hiding this comment

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

There is a way, which I had adopted before pushing this. The problem is that the "plot" appears and then there is a lagging-shimmering effect that occurs (hence messing up with screenshot). Do you think it'd be better to add the wait and then the timeout afterwards, just to be safe (and to have more specific error if it occurs)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha. Great minds think alike. 🤓

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it acceptable for the test to check image size instead? The zoom level affects the image scaling and that should be a resilient check over comparing to reference images.

I could also add some class attributes to the img element if that helps signal the zoom level has been applied.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just as a note: this doesn't actually use reference images, but rather the buffers returned from page.screenshot(). Thats not to say that using the sizes wouldn't also work... just not sure what the size of a truncated image is in playwright.

@testlabauto testlabauto requested a review from midleman July 1, 2025 20:20
Copy link
Contributor

@midleman midleman left a comment

Choose a reason for hiding this comment

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

This looks pretty good! I think it would be worthwhile to add a R test for the same checks, but be sure to put it in the other describe block with the other R tests (rather than in with the Python tests). Also, the test isn't passing for me locally...
Screenshot 2025-07-01 at 3 39 58 PM

menuTrigger: page.getByLabel('Fit'),
menuItemLabel: '200%'
});
await page.waitForTimeout(2000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ha. Great minds think alike. 🤓

@rodrigosf672 rodrigosf672 changed the title e2e test - zoom plot (draft) e2e test - zoom plot Jul 15, 2025
rodrigosf672 and others added 18 commits July 16, 2025 12:01
### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- #2871 Change `APPLY FILTER` to title case.

#### Bug Fixes

- N/A


### QA Notes

in R console 

```r
c <- cars
```

and then view `c` in data explorer. Should see title case.

![Screenshot 2025-06-30 at 1 36
57 PM](https://github.com/user-attachments/assets/21e30c90-7084-4198-845b-90f7bd224c2d)
Quick change to support arrows to navigate the Plots history. 

Addresses #8327.

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- Improved keyboard navigation in the Plots pane; arrow keys now
navigate the plot history. (#8327)

#### Bug Fixes

- N/A


### QA Notes

The arrow keys aren't scoped to the orientation of the filmstrip -- that
is, "up" and "left" will take you to the previous plot, and "down" or
"right" to the next one, regardless of whether the filmstrip is on the
top or bottom.

tags: `@:plots`
#8384)

This change makes it possible to interrupt a long-running computation in
order to reconnect to an R or Python session. In most cases, these
computations will eventually finish, but some things that make the
session busy (e.g. Shiny apps) literally run until they are interrupted.

The fix is to add a Cancel button to the reconnect notification:

<img width="467" alt="image"
src="https://github.com/user-attachments/assets/b758077c-7b9c-49b0-bfc2-8d882e66f4a2"
/>

When invoked, this Cancel button offers a way to interrupt the session:

<img width="413" alt="image"
src="https://github.com/user-attachments/assets/44b0f6c0-d8c8-4e55-838a-f45c81c06c95"
/>

Addresses #8041.

In an ideal world, we would be able to reconnect even if the session is
busy. However, a lot of the operations we perform in order to connect
the sessions to Positron require that we send messages to the shell
socket, so they won't work while the kernel is busy. See #7447 for some
infrastructure that would help us mitigate this.

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- It is now possible to interrupt R and Python sessions in order to
reconnect to them (#8041)

#### Bug Fixes

- N/A


### QA Notes

You can use `Sys.sleep(500)` or something to simulate a long-running
operation in addition to the Shiny app example in the issues
Auto-update to 1.5.51 with SHA256:
f3c831fcc59398435c31b6100fc9a7ddd872dc8412dfa963a53fda025525a114
triggered by a commit to `main` in
[rstudio-workbench-vscode-ext](https://github.com/rstudio/rstudio-workbench-vscode-ext)

Co-authored-by: posit-jenkins-enterprise[bot] <203673010+posit-jenkins-enterprise[bot]@users.noreply.github.com>
<!-- Thank you for submitting a pull request.
If this is your first pull request you can find information about
contributing here:
  * https://github.com/posit-dev/positron/blob/main/CONTRIBUTING.md

We recommend synchronizing your branch with the latest changes in the
main branch by either pulling or rebasing.
-->

<!--
  Describe briefly what problem this pull request resolves, or what
  new feature it introduces. Include screenshots of any new or altered
  UI. Link to any GitHub issues but avoid "magic" keywords that will
  automatically close the issue. If there are any details about your
  approach that are unintuitive or you want to draw attention to, please
  describe them here.
-->
Addresses #8184.


### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- N/A

#### Bug Fixes

- N/A


### QA Notes

<!--
Positron team members: please add relevant e2e test tags, so the tests
can be
  run when you open this pull request.

- Instructions:
https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
- Available tags:
https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->
@:assistant @:console @:interpreter @:new-folder-flow @:notebooks
@:plots @:win


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
Some things I'm going to pay special attention to:
- How/if the new tools interact with Assistant
- Creation of venvs with `Python: Create Environment...` and the New
Folder Flow
- `Python: Select Interpreter` command, our picker, and canceling them
with Esc/Back
- Does our desired logic for default interpreter for workspaces still
work?
- Do locators (native and js) still work as expected (naming?)
- How venvs are activated in the terminal

---------

Co-authored-by: positron-bot[bot] <173392469+positron-bot[bot]@users.noreply.github.com>
Tiny change to add indentation to the trace logs for Anthropic API
calls.

### QA Notes

1. Run Positron command `Developer: Set Log Level...` and set to trace.
2. Interact with Positron Assistant
3. Run Positron command `Developer: Show Logs...` and choose Assistant

Observe that JSON traffic is pretty-printed so it's much easier to read
This change adds native IPC support to the kernel supervisor.
Previously, all communication with the server happened over TCP. This
works well as a simple cross-platform solution (and also sets us up for
remote sessions in the future) but also has a lot of drawbacks. After
the change, TCP remains as an option, but the default transport is local
IPC, which is more performant and secure and may also help address
security/firewall/AV problems.

Addresses #5800.

### How it Works

In TCP mode, Kallichore starts an HTTP server that listens on a local
TCP port. Connections to individual sessions happen on a WebSocket; each
session gets its own WebSocket.

In IPC mode, the same protocols are used, but the transport is
different. The server creates a single domain socket (or named pipe) on
which it listens for HTTP requests. When Positron connects to an
individual session, it requests a specific domain socket just for that
session. The server returns the path to this socket, which the client
connects to.

```mermaid
sequenceDiagram
Positron ->> Kallichore: Create session
Positron ->> Kallichore: Start session
Kallichore ->> Session: ZeroMQ
Session ->> Kallichore: ZeroMQ
Positron ->> Kallichore: Connect to session
Kallichore ->> Positron: Socket path
Positron ->> Session: Kernel messages
Session ->> Positron: Kernel messages
```


Communication over the session's domain socket (or named pipe) happens
using the WebSocket protocol, just as it would if it were a TCP
connection.

### Eliminating TCP

Note that while this change prevents the supervisor from starting any
servers, it does not completely eliminate TCP from the supervisor. In
particular, we still have the following usages:

- When connecting to the Python kernel, Kallichore attempts to bind to
ports in order to find free ports for ipykernel to bind to. This is only
necessary for Python, because R is able to find its own free ports.
- ZeroMQ connections are always made with TCP, so though Kallichore can
now be configured such that it is not a TCP server, it is still a TCP
client. ZeroMQ does support non-TCP transports in theory, but in
practice only TCP is supported by the Jupyter standard and our kernels.

### TCP Mode

All the TCP/WebSocket code remains as a fallback (and for future use in
remote scenarios). You can switch back to TCP mode using this option:

<img width="559" alt="image"
src="https://github.com/user-attachments/assets/4637cf9a-060a-4ee0-8c6a-897b4c554f9d"
/>

### Workbench & Remote SSH

In Workbench and Remote SSH, the supervisor is started before Positron
is, which means we can't read the settings yet to figure out which
transport to use. This setting consequently only affects local desktop
configurations. Workbench and Remote SSH will always use Unix domain
sockets for now, as they're always on Linux. We can try to make this
configurable if it turns out that this isn't suitable.

### Release Notes

#### New Features

- Improved performance and security for connections to R and Python
sessions (#5800)

#### Bug Fixes

- N/A


### QA Notes

Some things worth double-checking after this change:
- idle timeouts
- restore from sleep
- large plots/ipywidgets

If you find a problem when using IPC, please try switching back to TCP,
restarting Positron, and seeing if the problem still happens.
Addresses #8348.

@:notebooks

Converts Positron Notebooks 2.0 from intercepting the existing
NotebookEditor to a separate editor registration that receives priority
for `.ipynb` files. This eliminates the hijacking behavior that forced
all notebook operations through Positron Notebooks and allows users to
opt out without modifying global settings. The change reduces
maintenance burden by removing the requirement to fully support the
notebook extension API.


### Release Notes

#### New Features
- Positron Notebooks 2.0 now registers as a separate editor for `.ipynb`
files instead of intercepting the default notebook editor
- Users can now easily switch between Positron Notebooks and VS Code's
default notebook editor without changing global settings

#### Bug Fixes
- N/A

### QA Notes
This PR includes the following tests:
- **E2E tests**
(`test/e2e/tests/notebook/notebook-editor-configuration.test.ts`) verify
that the correct editor opens based on the
`positron.notebooks.defaultEditor` setting and that switching between
editors works seamlessly
- **Unit tests** for configuration handling
(`src/vs/workbench/contrib/positronNotebook/test/browser/positronNotebookConfigurationHandling.test.ts`)
test editor re-registration when settings change, priority changes, and
proper cleanup
- **Unit tests** for editor resolution
(`src/vs/workbench/contrib/positronNotebook/test/browser/positronNotebookEditorResolution.test.ts`)
ensure only `.ipynb` files are handled by Positron Notebooks and
configuration defaults work correctly

For manual testing you can test that Positron Notebooks 2.0 can be
toggled on/off and that the correct editor opens for `.ipynb` files.
Verify that when disabled, users can still access VS Code's default
notebook functionality.

1. Enable Positron Notebooks 2.0 in settings:
`"positron.notebooks.defaultEditor": "positron"`
2. Create or open a `.ipynb` file - should open in Positron Notebooks
editor
3. Disable Positron Notebooks 2.0 in settings:
`"positron.notebooks.defaultEditor": "vscode"`
4. Open the same `.ipynb` file - should now open in VS Code's default
notebook editor
5. Verify notebook functionality works correctly in both editors

Expected behavior: The notebook editor should seamlessly switch between
Positron Notebooks and VS Code's default editor based on the setting,
without requiring workspace or global configuration changes.
Addresses #1360
Addresses #3163

CC @thomasp85 

Thanks to @kevinushey for some advise on the regex here

All examples from the issue look resolved

<img width="713" alt="Screenshot 2025-07-02 at 10 21 18 AM"
src="https://github.com/user-attachments/assets/0d54c3fb-6aff-4e38-8bf0-e5f13ae0aa59"
/>
<img width="487" alt="Screenshot 2025-07-02 at 10 20 01 AM"
src="https://github.com/user-attachments/assets/baa43889-0760-474f-9e63-c3416f046365"
/>
<img width="187" alt="Screenshot 2025-07-02 at 10 20 25 AM"
src="https://github.com/user-attachments/assets/23e1a38f-c32e-4b0b-8e7e-af29e294f7f2"
/>


### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- N/A

#### Bug Fixes

- R: `@examples` documentation highlighting no longer highlights further
than expected (#1360).


### QA Notes

<!--
Positron team members: please add relevant e2e test tags, so the tests
can be
  run when you open this pull request.

- Instructions:
https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
- Available tags:
https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
…ion (#8431)

If in a docker image, add the param:
```
--disable-dev-shm-usage
```

### QA Notes

@:web @:win
Fixes #8406.

statsmodels/statsmodels#9584 is fixed and
they've created a release. I validated that our previously-failing
`plotnine` test does succeed with scipy 1.16.0 and the newest
statsmodels, so we can unpin scipy.

Funny enough, even with unpinning, we still pick up scipy 1.15.3,
because the latest plotnine has also put a ceiling of scipy<1.16. But
they'll probably unpin that soon due to the fix, so our nightlies should
then automatically pick up the latest everything.
This change adds 4 new LLM tools that can be used to read an R package's
help and vignettes.

<img width="415" alt="image"
src="https://github.com/user-attachments/assets/bd404fde-e160-4e19-ac4f-c9b944ee6ac3"
/>

Requires posit-dev/ark#868 on the Ark side.

Addresses #8016 (for R)


### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- Positron Assistant can now reference R help pages and package
vignettes (#8016)

#### Bug Fixes

- N/A


### QA Notes

The LLM has been instructed to use help when it needs to, but a fun
thing about LLMs is that they mostly don't know what they don't know.
Asking for help with a package that is newer than the LLM's knowledge
cutoff date is a good way to get it to fall back to tool calls to look
up help; if you ask it about common usage for long-standing base R
functions, it is not likely to need help pages. You can also just tell
it to look up a help page or vignette and it'll do the right thing.
Addresses #8443 by allowing the console font to be configured independently of the editor font.
Auto-update to 1.5.52 with SHA256:
23e0dffb0b5fd2ea41dd13b24354fed000285bf48038edcd26b5dccdd68e28fb
triggered by a commit to `main` in
[rstudio-workbench-vscode-ext](https://github.com/rstudio/rstudio-workbench-vscode-ext)

Co-authored-by: posit-jenkins-enterprise[bot] <203673010+posit-jenkins-enterprise[bot]@users.noreply.github.com>
timtmok and others added 26 commits July 21, 2025 15:32
…8496)

### Summary

- addresses #7638
- removes the run/debug play button from the editor actions when a chat
session is open in an editor

### Release Notes

#### Bug Fixes

- Assistant: non-functional run/debug play button removed from editor actions when a
chat session is open in an editor (#7638)

### QA Notes

@:assistant

1. Chat with Assistant in the sidebar to get some R and Python code
suggestions in the chat (Ask mode is probably best here)
2. Run the command `Chat: Open Chat in Editor` to open the conversation
in an editor
3. Scroll through the chat to bring the R and Python code into focus
4. The play button should not appear at any point when interacting with
the chat in an editor
### Summary

- addresses #8433
- renames the chat command from `/quarto` to `/exportQuarto` to better
align with the command behaviour

### Release Notes

#### Bug Fixes

- Assistant: renamed chat command from `/quarto` to `/exportQuarto`
(#8433)

### QA Notes

@:assistant

The chat command is now `/exportQuarto` and should not be included in
the welcome screen anymore (only `/help` should be suggested).
### Summary

### QA Notes
@:new-folder-flow
### Summary

Replaced the manual Miniforge3 installation with the
`conda-incubator/setup-miniconda` GitHub Action. This avoids permission
errors and interactive TOS prompts during install, while keeping the
same Miniforge3 variant and latest version.

### QA Notes

@:new-folder-flow
…8542)

## Intent

- Addresses: #8522

### Current state on `main`:

- ❌ Edits sometimes cannot be applied to notebooks via the inline editor
chat
- ❌ Token usage
- Either minimal token usage, but the task (editing the code) does not
occur; or
- Massive token usage (tool calls can cause a LOT of references to get
attached -- in this case, I had several log files that matched the text
being searched for in the tool call), but the edit succeeds

### Changes in this PR:

- ✅ Edits can be applied to notebooks via the inline editor chat
- 🟡 Moderate token usage (utilizes what we've implemented for inline
editor chat for regular code files, such as .py, .r, etc.)
- 🟡 Assistant flow for notebooks is much faster than what's on `main`
and what's shown in the issue #8522

We can probably make further improvements, such as reducing the
prompting, but the main issue seemed to be tool calls inflating the
context.

#### Inline Edit for a Python file with the same contents as the ipynb

For comparison, here's the same content in a python file instead of a
Jupyter Notebook
- in this instance, 1000+ input tokens were used here, vs. 600+ in the
notebook

### Release Notes

#### Bug Fixes

- Assistant: reduce token usage when Assistant is invoked via inline
notebook editor (#8522)

### QA Notes

@:assistant

#### Setup
- use this file:
[assistant.json](https://github.com/user-attachments/files/21245242/assistant.json),
but change the extension to `.ipynb` (can't attach ipynb files on
github)
- ensure the Ruff extension is installed in Positron

#### Steps
- look for the comment `# fix with assistant the two issues reported by
Ruff` in the notebook
- hover over the yellow squiggly on the line below the comment and click
"Fix with Assistant" in the hover widget that appears
- <img width="459" height="77" alt="image"
src="https://github.com/user-attachments/assets/3eb88cd2-3ba0-484f-a005-51fcd9b7bd0e"
/>
- DON'T close the inline chat or accept the change
- a fix should be provided within a few seconds, and the tokens consumed
should be < 1000 input tokens and < 1000 output tokens, rather than tens
of thousands
- BEFORE closing/accepting the chat, run the `Positron Assistant: Export
the current chat to a file in the workspace` command and find `"result"`
in the log file that is generated
- within the `"result"` block, note the time elapsed (milliseconds) and
the token usage, which should look something like this:
        ```json
          "result": {
            "timings": {
              "totalElapsed": 2991
            },
            "metadata": {
"modelId":
"39b64d15-9e6f-4f5a-a4b2-270ca1c21a3f-claude-3-5-sonnet-latest",
              "tokenUsage": {
                "inputTokens": 1108,
                "outputTokens": 168
              }
            }
          },
        ```
Need to dig into why it's failing on browser.

### QA Notes

<!--
Positron team members: please add relevant e2e test tags, so the tests
can be
  run when you open this pull request.

- Instructions:
https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
- Available tags:
https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
The new token usage tests are very flakey because the tests that run before don't signout of the model provider, and so signin fails.

## QA Notes
All tests should pass
This change removes the `RUST_LOG` environment variable from the kernel
supervisor's environment. It is (now) unnecessary since we already use a
command-line argument to set the log level, and because kernels inherit
the supervisor's environment, it can affect the log level of Rust-based
programs invoked from the kernels (such as uv).

Addresses #8538.


### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- N/A

#### Bug Fixes

- Remove superfluous `RUST_LOG` environment variable from R and Python
sessions

### QA Notes

- It should still be possible to specify `RUST_LOG` manually via e.g.
the Environment Variables feature
- The R extension sets a value for `RUST_LOG` as well, so you'll see
that value in R sessions
- The main thing to verify here, in addition to `RUST_LOG` no longer
being overridden, is that the kernel's log level setting still works
This is a broad change that affects the way Assistant works with R and
Python sessions. Prior to the change, information about the "current"
session was always included, implicitly and invisibly, with your
request. This led to a lot of good questions about what Assistant was
looking at and whether there was a way to keep it from doing so.

After the change, Assistant cannot see any information about your
session unless you grant it permission to do so.

Addresses #7595. 

By default it is still able to see your current session, but instead of
being included invisibly, it appears as a visible attachment in the chat
window, like a file. You can turn it off with one click.

<img width="356" height="128" alt="image"
src="https://github.com/user-attachments/assets/5d23043c-c26e-43d6-9651-9983142a1523"
/>


For more privacy-minded users, it is possible to opt out of this
behavior, so that by default Assistant does not have access to your
data.


<img width="479" height="294" alt="image"
src="https://github.com/user-attachments/assets/e3f82af4-4a07-4251-80af-14c2dd1362e1"
/>


If they opt out of the default/implicit context, users need some way to
attach the context if it's needed, so there are now tools you can use to
explicitly add sessions to Assistant's context. The context attach
command has a new _Interpreter Sessions..._ entry:

<img width="619" height="335" alt="image"
src="https://github.com/user-attachments/assets/bba1a2eb-88d9-49a7-9da3-4b6b5e877eaf"
/>


Right now, session access is a blunt instrument. Attaching session
context gives Assistant:


- information about the session itself
- the variables in the session
- a summary of recent executions in the session, i.e. recent inputs,
outputs, and errors
- the ability to run tools that interact with the session
- etc.

We'll see if folks need more fine-grained control than that. There's
some tension here between making sure people are aware of/in control of
what gets sent to the LLM vs. a low-config experience that just works
and answers questions as you'd expect.

Some notes on the implementation:

- A consequence of letting users attach sessions as context is that it
is now possible to attach multiple sessions. This might enable some cool
use cases or might just be confusing! I'm interested in user feedback.
- Because it is now possible to attach multiple sessions, all language
model tools that talk to sessions need have a session identifier
parameter so it's clear which one the model is trying to interact with.
- Language model tools can now use the `requires-session` tag to avoid
being made available when there are no sessions present, and the
`requires-session:python` tag (for example) to further scope
availability to Python sessions.

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- Control Positron Assistant's access to data in your Python and R
sessions (#7595)

#### Bug Fixes

- N/A


### QA Notes

If you ask a question about a session but later try to hide it, Positron
Assistant may still remember it because of prompt/conversation history
and caching.

tags: `@:assistant`
### Summary
Skipping while @jonvanausdeln investigates.


### QA Notes

n/a
### Summay
Fixing Conda issue.

### QA Notes
Ran full suite:
https://github.com/posit-dev/positron/actions/runs/16345067971
Due to #8568 turning off the chat token test for web


### QA Notes
@:web @:assistant
<!--
  Positron team members: please add relevant e2e test tags, so the tests can be
  run when you open this pull request.

  - Instructions: https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
  - Available tags: https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
I can't seem to consistently reproduce the appearance of this message;
it was definitely caused by some combination of settings but
unfortunately I have cleared all my state 😩. Regardless, disabling the
link handler won't hurt anything.

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- N/A

#### Bug Fixes

- #8507 Remove VSCode specific "Native REPL" language from Python
console startup message.


### QA Notes

<!--
Positron team members: please add relevant e2e test tags, so the tests
can be
  run when you open this pull request.

- Instructions:
https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
- Available tags:
https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
The Chat status item in the bottom bar is now hidden if only a Plot or
Data Explorer editor is open, and the user does not have an active chat
session in the window.

Addresses #8159
Refactors how services are provided to React components. Instead of prop-drilling services through component properties, which was becoming burdensome, we now provide services through the `PositronReactServicesContext`.
Restores the log level to INFO; addresses #8539.

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- The default log level has been returned to Info (was Debug) to reduce
log noise. Please consider using the Set Log Level command to restore
Debug-level logging when reporting bugs. (#8539)

#### Bug Fixes

- N/A


### QA Notes

You can check the log level by using the _Developer > Set Log Level_
command.
Addresses #8245. The approach is inspired by pydevd which backs the
debugger used by most Python IDEs today.

The focus is on safely (i.e. no hangs) and efficiently calculating and
sending display values over the wire, _not_ on perfectly formatting
those display values, hence the large max character values. The idea is
that further formatting would be handled in the UI, although we can
change this if needed.

I've mostly left the display formatting of the larger third party
objects as is (numpy, pandas, etc). The lower level changes here should
make refinements to those easier in future.

### Release Notes

#### New Features

- N/A

#### Bug Fixes

- Improved the performance of Python variable updates (#8245).

### QA Notes

See the repro steps in #8245 as well as the new unit tests.

@:variables @:data-explorer @:console

---------

Signed-off-by: Wasim Lorgat <mwlorgat@gmail.com>
Co-authored-by: Isabel Zimmerman <54685329+isabelizimm@users.noreply.github.com>
#8208)

First pass at #7114 

Provides Assistant with a `getDataSummary` tool, currently only
implemented for Python, that provides a JSON structured summary of a
data object by using the Positron API to communicate with the Variables
Comm. I updated the variable's python backend to reuse existing
functionality from the data explorer.

I used the `inspectVariables` tool as a guide for retrieving info from
the variables comm.

---------

Signed-off-by: Wes McKinney <wesm@apache.org>
Co-authored-by: Wes McKinney <wes@posit.co>
Co-authored-by: sharon <sharon-wang@users.noreply.github.com>
Due to rstudio/reticulate#1811 we need to pin uv to a 0.7 version until reticulate is fixed


### QA Notes
@:reticulate
<!--
  Positron team members: please add relevant e2e test tags, so the tests can be
  run when you open this pull request.

  - Instructions: https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags
  - Available tags: https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts
-->


<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->
…logs POMs (#8581)

### Summary
We were previously mixing the responsibilities of popups, modals,
dialogs, and toasts into a single POM, which made it unclear which
methods applied to which UI components. This PR separates them into
dedicated, focused POMs:
* `dialog-modals.ts`
* `dialog-popups.ts`
* `dialog-toasts.ts`

Also, added a basic outline for the `Copy as Code` Data Explorer test.
The test is currently skipped as the feature is still under development.
* `data-explorer/copy-code.test.ts`

### QA Notes
@:console @:web

Running full suite:
https://github.com/posit-dev/positron/actions/runs/16378500737
Signed-off-by: Rodrigo Silva Ferreira <129895386+rodrigosf672@users.noreply.github.com>
@rodrigosf672 rodrigosf672 dismissed midleman’s stale review July 23, 2025 15:11

Changes addressed and Marie is out of town.

@rodrigosf672 rodrigosf672 merged commit 593afed into main Jul 23, 2025
16 of 22 checks passed
@rodrigosf672 rodrigosf672 deleted the rsf/zoom-plot branch July 23, 2025 15:11
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 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.