Repository navigation
Conversation
A WSL pane reports Linux directories, and the port menu handed that cwd to the Windows browser host as is: Playwright's workspace lookup realpaths it, and `/home/me` resolved as `C:\home\me` (ENOENT). Git Bash's MSYS `/c/...` had the same problem. The sidecar now records a pane's WSL distro and answers a `hostDirectory` context op: `/mnt/c/x` and Git Bash's `/c/x` become `C:\x`, other WSL paths the distro's `\wsl.localhost\<distro>\...` share (the path `dor` sends from the same directory). The port menu and a Tool's Break use it, and Explore translates through it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
7492cbb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://475d6d77.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-wsl-playwright-screencas.mouseterm.pages.dev |
dormouse-bot
approved these changes
Oct 22, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening a port as a Playwright screencast from a WSL (Ubuntu) pane failed with
ENOENT: no such file or directory, lstat 'C:\home'. agent-browser worked because it is not project-scoped.The port menu (
openContextPort) passed the pane's reported cwd, a Linux path like/home/me/app, to the Windows browser host as the binding cwd. The Playwright host's workspace lookup (playwrightWorkspace→realpathSync) resolved it asC:\home\me\app. A Git Bash pane's MSYS/c/...cwd has the same problem.dor playwrightrun inside WSL was unaffected: the launcher already sendsPWDtranslated to\wsl.localhost\<distro>\....Fix
pty-core.js):wsl.exe -d <distro>).hostDirectoryterminal-context op translates a directory the pane reported:/mnt/c/xand Git Bash's/c/xbecomeC:\x.\wsl.localhost\<distro>\..., the same pathdorsends from that directory.openDirectory(Explore) translates through it too. Explore's existing validation still refuses UNC paths, so this only enables/mnt/<drive>and MSYS drive paths there.Wall.tsx):openContextPortand a Tool's Break ask for the translated cwd before building the browser params (hostCwdOf). If the host can't answer, they fall back to the reported path.dor-browser.md→ Pane Context Menu Connect.A Playwright pane already opened with the bad cwd keeps it in its saved params. Close it and reopen the port.
Testing
/homeand/mntpaths, Git Bash, pass-through and Explore. The sidecar suite passes: 214 pass, 0 fail.lib/src/components/Wall.test.tsxpasses (188).tscpasses for lib, standalone and vscode-ext; spec-lint OK.\wsl.localhost\Ubuntu\home\<user>resolves withrealpathSync, as the Playwright host needs.🤖 Generated with Claude Code