Skip to content

feat(interactive): let each workspace folder set its own arf - #1988

Merged
eitsupi merged 1 commit into
mainfrom
feat/interactive-arf-ipc-discovery
Nov 22, 2026
Merged

eitsupi merged 1 commit into
mainfrom
feat/interactive-arf-ipc-discovery

Conversation

@eitsupi

@eitsupi eitsupi commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

r.interactive.arfPath had no scope, so VS Code read it per window and every workspace folder used one value, both for listing running arf sessions and for new sessions.

  • r.interactive.arfPath is machine-overridable, so each workspace folder can set its own arf. Listing and new sessions resolve it from the workspace folder they are for, as they do its directory. Without an editor in a workspace folder, as when Connect runs from an empty or untitled editor, the first folder's setting applies.
  • The setting's description says to set it in the remote or folder settings on a remote host.

@eitsupi
eitsupi requested a review from renkun-ken November 22, 2026 02:02
@eitsupi
eitsupi marked this pull request as ready for review November 22, 2026 02:02
@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from 5c7d0a2 to eed1915 Compare November 22, 2026 02:20
@eitsupi
eitsupi changed the base branch from main to fix/interactive-adopted-stop November 22, 2026 02:20
@eitsupi
eitsupi added this pull request to stack #1989 November 22, 2026 02:20

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I ran the discovery and backend suites and both real-arf adoption tests on macOS with arf 0.7.2. All 49 passed, including evaluation after the agent closed.

I’m requesting changes to the workspace-folder setting, the CLI deadline, and the handling of arf restarts during discovery and bootstrap. The inline comments include the observed behavior and suggested regression coverage.

Comment thread package.json Resolved
Comment thread src/interactive/arf.ts Resolved
Comment thread src/interactive/arf.ts Resolved
Comment thread src/interactive/backends/arf.ts Resolved
Comment thread website/docs/features/r-interactive.md Resolved
@eitsupi eitsupi changed the title feat(interactive): list arf sessions with the arf CLI refactor(interactive): list arf sessions with the arf CLI Nov 22, 2026
@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from eed1915 to 0d9523e Compare November 22, 2026 02:57
@eitsupi
eitsupi requested a review from renkun-ken November 22, 2026 03:00

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The same-PID restart check and bootstrap over the verified attach connection both passed on 0d9523e. The user guide now covers private session directories, and discovery returned at five seconds with a SIGTERM-handling wrapper. All 60 focused local tests passed on macOS with arf 0.7.2, including the two real adoption tests.

I also ran Connect in a two-folder VS Code 1.145.2 workspace. With a file open in A or B, it ran that folder’s configured executable. The manifest assertion covers the scope change. I’m requesting fixes for the first-folder setting when Connect is launched from an empty or untitled editor and for the pipes left open after a wrapper times out. I’ve included the observed results inline, along with a small developer README correction.

Comment thread src/interactive/manager.ts Resolved
Comment thread src/interactive/arf.ts Resolved
Comment thread src/interactive/README.md Resolved
@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from 0d9523e to 04ced2c Compare November 22, 2026 08:40
@eitsupi
eitsupi requested a review from renkun-ken November 22, 2026 08:42
@eitsupi
eitsupi marked this pull request as draft November 22, 2026 08:59
@eitsupi
eitsupi marked this pull request as ready for review November 22, 2026 09:30
@eitsupi eitsupi changed the title refactor(interactive): list arf sessions with the arf CLI feat(interactive): let each workspace folder set its own arf Nov 22, 2026
@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from e544344 to 026b0e3 Compare November 22, 2026 09:59

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the folder selection on 026b0e3e in VS Code 1.145.2 with distinct arf executables for folders A and B and a third workspace-wide setting. Connect ran each open file’s folder executable from that folder. With no editor or an untitled file active, it ran A’s executable from A. New Session offered the same executable in all four cases.

The stacked base also addresses the other two items from my last review. The CLI timeout closes both output pipes, and the developer README describes bootstrap on the verified attach connection. The inherited-pipe regression passed. Across the discovery and backend suites, the two real-arf adoption tests, and the new VS Code fallback regression, all 83 local tests passed. Approving.

@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from 026b0e3 to 901adf1 Compare November 22, 2026 14:53

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rechecked 901adf1 against 983d5fc. The PR patch is identical to the one approved on 026b0e3. In VS Code 1.145.2, Connect and New Session used each open file’s folder-specific arf and fell back to the first folder with no editor or an untitled file. The updated base also passed the test that adoption preserves the listing that found the session. All 89 focused local tests passed on macOS, including both real-arf adoption tests.

I found one nonblocking case in the base’s InteractiveManager.pick(). When Connect opens with no editor, it lists with folder A’s arf. I then opened a file in B through the VS Code API while the real picker remained open. Selecting New persistent R session offered B’s arf. pick() had captured undefined, so create() read the active editor again. Capturing the fallback folder URI when the picker opens would keep listing and creation on the same folder. I verified the provider selection and dismissed it before launch.

Base automatically changed from fix/interactive-adopted-stop to main November 22, 2026 15:08
r.interactive.arfPath had no scope, so VS Code read it per window and
every workspace folder used one value, both for listing running arf
sessions and for new sessions. It is now machine-overridable, so a
folder can set its own arf, which listing and new sessions resolve from
the folder they are for. Without an editor in a workspace folder, as
when Connect runs from an empty or untitled editor, the first folder's
setting applies, as its directory does.
@eitsupi
eitsupi force-pushed the feat/interactive-arf-ipc-discovery branch from 901adf1 to 512328f Compare November 22, 2026 15:08
@eitsupi
eitsupi merged commit eab2eac into main Nov 22, 2026
14 checks passed
@eitsupi
eitsupi deleted the feat/interactive-arf-ipc-discovery branch November 22, 2026 15:09
@renkun-ken

Copy link
Copy Markdown
Member

I checked the version merged into main at eab2eac9. Its Git tree matches both the final PR head 512328f0 and the previously approved 901adf1. I found no new issues. The setting-scope, first-folder fallback, and adoption regression tests all passed locally.

I also rechecked the two-folder behavior in VS Code 1.145.2. Connect used the first folder’s arf with no editor or an untitled file, and each folder’s own arf with a saved file open there. New Session offered the same executables.

The previously reported picker edge case is still reproducible. With Connect open and no active editor, listing used folder A. Opening a file in B with preserveFocus: true kept the picker open, and choosing New persistent R session then offered B’s arf. I stopped at provider selection. Capturing the fallback folder when Connect opens would keep that selection consistent.

@eitsupi

eitsupi commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

The Connect picker case reported in the review, where New persistent R session used the folder of an editor opened while the picker was open, is fixed in #1992.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants