Skip to content

Resolve the NES language server through the assistant installation lookup - #18608

Merged
gtritchie merged 1 commit into
mainfrom
bugfix/nes-language-server-install-resolution
Aug 20, 2026
Merged

gtritchie merged 1 commit into
mainfrom
bugfix/nes-language-server-install-resolution

Conversation

@gtritchie

Copy link
Copy Markdown
Member

paiLanguageServerPath() hardcoded <XDG_DATA>/pai/bin/dist/nes, so the language server behind Posit Assistant code suggestions ignored both RSTUDIO_POSIT_AI_PATH and system-wide installs. The chat backend honors both, since it resolves through locatePositAssistantInstallation().

Two divergences followed:

  • With only a system-wide install (/etc/rstudio/pai/bin), chat worked and code suggestions never started. The failure logged at debug level only, so it was invisible unless assistant logging was turned up.
  • With RSTUDIO_POSIT_AI_PATH pointed at a dev build, chat ran the dev build while the language server came from whatever was in the per-user install, with nothing reporting the mismatch.

paiLanguageServerPath() now derives its directory from locatePositAssistantInstallation(), so both halves of the assistant resolve the same installation. The lookup within an installation is split out as nesLanguageServerPath(installPath) and covered by tests: empty install path, an installation with no NES script, resolution under an arbitrary install root, the language-server.js fallback, and the .cjs preference.

One behavior change worth noting: locatePositAssistantInstallation() accepts an installation only when the chat files are present (dist/client/index.html, dist/server/main.js), so a directory holding dist/nes alone no longer resolves. Shipped packages contain both.

Fixes #18597.

…okup

paiLanguageServerPath() hardcoded <XDG_DATA>/pai/bin/dist/nes, so the
language server behind code suggestions ignored RSTUDIO_POSIT_AI_PATH and
system-wide installs -- both of which the chat backend honors, since it
resolves through locatePositAssistantInstallation(). With only a
system-wide install present, chat worked and suggestions never started;
with the override set, the two halves could run out of different
installations, with nothing reporting the mismatch.

Derive the NES directory from locatePositAssistantInstallation() instead.
The lookup within an installation is now a separate nesLanguageServerPath(),
covered by tests.

Addresses #18597
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
2386 0 152 3
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 2 0 10 0
✅ desktop-linux 593 0 31 0
✅ desktop-macos 599 0 26 0
✅ desktop-windows 598 0 31 1
✅ server-linux 568 0 44 2
✅ setup 26 0 10 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 059432ce70086158638c0783a82f9b2e890f3088 - Run #652

@gtritchie
gtritchie merged commit 38c887e into main Aug 20, 2026
29 checks passed
@gtritchie
gtritchie deleted the bugfix/nes-language-server-install-resolution branch August 20, 2026 15:45

This branch was previously deployed

1 inactive deployment
e2e-playwright — 059432ce Deployed Aug 19, 2026 by gtritchie via linux-desktop / E2E (ubuntu-24-x86_64) #652
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.

NES language server ignores RSTUDIO_POSIT_AI_PATH and system-wide installs

1 participant