Skip to content

Commit 5493b0e

Browse files
CopilotTheLarkInn
andauthored
Rebrand "Playwright on Codespaces" to "Playwright Local Browser Server" (#5581)
* Initial plan * Rebrand Playwright on Codespaces to Playwright Local Browser Server - Renamed directory from playwright-on-codespaces-vscode-extension to playwright-local-browser-server-vscode-extension - Updated rush.json with new package name and project folder - Updated package.json: name, displayName, description, repository path, homepage, command categories - Updated extension.ts: EXTENSION_DISPLAY_NAME and terminal names - Updated utilities.ts: EXTENSION_INSTALLED_FILENAME and comments - Updated README files in vscode extension and playwright-browser-tunnel - Updated main README.md with new paths and descriptions Co-authored-by: TheLarkInn <3408176+TheLarkInn@users.noreply.github.com> * Update pnpm-lock.yaml after rebrand and verify build Co-authored-by: TheLarkInn <3408176+TheLarkInn@users.noreply.github.com> * Address code review feedback - Fix autoStart default value documentation (false, not true) - Update LICENSE file with new package name - Update extension.ts marker file comment - Fix remaining "Playwright on Codespaces" reference in README - Fix typo: "check's" -> "checks" in utilities.ts Co-authored-by: TheLarkInn <3408176+TheLarkInn@users.noreply.github.com> * Complete documentation for commands and settings - Add missing manageAllowlist command to README - Add missing promptBeforeLaunch setting documentation Co-authored-by: TheLarkInn <3408176+TheLarkInn@users.noreply.github.com> * fix assets and comment * rush change * add publish configuration * reset lockfile changes * update command ids * DROP: rush update * update readme * update extension command registration ids * update default ports to 56767 * repo-toolbox --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TheLarkInn <3408176+TheLarkInn@users.noreply.github.com> Co-authored-by: Sean Larkin <TheLarkInn@users.noreply.github.com>
1 parent 5c78f0e commit 5493b0e

27 files changed

Lines changed: 141 additions & 99 deletions

File tree

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@
119119
]
120120
},
121121
{
122-
"name": "Launch Playwright on Codespaces VS Code Extension",
122+
"name": "Launch Playwright Local Browser Server VS Code Extension",
123123
"type": "extensionHost",
124124
"request": "launch",
125-
"cwd": "${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/dist/vsix/unpacked",
125+
"cwd": "${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/dist/vsix/unpacked",
126126
"args": [
127-
"--extensionDevelopmentPath=${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/dist/vsix/unpacked"
127+
"--extensionDevelopmentPath=${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/dist/vsix/unpacked"
128128
],
129129
"sourceMaps": true,
130130
"outFiles": [
131-
"${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/**/*.js"
131+
"${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/**/*.js"
132132
]
133133
}
134134
]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ These GitHub repositories provide supplementary resources for Rush Stack:
234234
| [/rigs/local-web-rig](./rigs/local-web-rig/) | A rig package for Web projects that build using Heft inside the RushStack repository. |
235235
| [/rush-plugins/rush-litewatch-plugin](./rush-plugins/rush-litewatch-plugin/) | An experimental alternative approach for multi-project watch mode |
236236
| [/vscode-extensions/debug-certificate-manager-vscode-extension](./vscode-extensions/debug-certificate-manager-vscode-extension/) | VS Code extension to manage debug TLS certificates and sync them to the VS Code workspace. Works with VS Code remote development (Codespaces, SSH, Dev Containers, WSL, VS Code Tunnels). |
237-
| [/vscode-extensions/playwright-on-codespaces-vscode-extension](./vscode-extensions/playwright-on-codespaces-vscode-extension/) | VS Code extension to enable Playwright testing in GitHub Codespaces. |
237+
| [/vscode-extensions/playwright-local-browser-server-vscode-extension](./vscode-extensions/playwright-local-browser-server-vscode-extension/) | VS Code extension to enable Playwright testing in remote VS Code environments (such as Codespaces, Dev Containers, VS Code Tunnels) while launching and driving the actual browser process on your local machine. |
238238
| [/vscode-extensions/rush-vscode-command-webview](./vscode-extensions/rush-vscode-command-webview/) | Part of the Rush Stack VSCode extension, provides a UI for invoking Rush commands |
239239
| [/vscode-extensions/rush-vscode-extension](./vscode-extensions/rush-vscode-extension/) | Enhanced experience for monorepos that use the Rush Stack toolchain |
240240
| [/vscode-extensions/vscode-shared](./vscode-extensions/vscode-shared/) | |

apps/playwright-browser-tunnel/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@ Run a Playwright browser server in one environment and drive it from another env
55

66
This package is intended for remote development / CI scenarios (for example: Codespaces, devcontainers, or a separate “browser host” machine) where you want tests to run “here” but the actual browser process to run “there”.
77

8-
## Relationship to the Playwright on Codespaces VS Code extension
8+
## Relationship to the Playwright Local Browser Server VS Code extension
99

10-
This package is the core tunneling/runtime layer used by the **Playwright on Codespaces** VS Code extension (located at [vscode-extensions/playwright-on-codespaces-vscode-extension](../../vscode-extensions/playwright-on-codespaces-vscode-extension)).
10+
This package is the core tunneling/runtime layer used by the **Playwright Local Browser Server** VS Code extension (located at [vscode-extensions/playwright-local-browser-server-vscode-extension](../../vscode-extensions/playwright-local-browser-server-vscode-extension)).
1111

1212
In a typical Codespaces workflow:
1313

1414
- Your **tests** run inside the Codespace and call `tunneledBrowserConnection()`.
15-
- `tunneledBrowserConnection()` starts a WebSocket server (by default on port `3000`) that a browser host can attach to.
16-
- The VS Code extension runs on the **UI side** and starts a `PlaywrightTunnel` which connects to `ws://127.0.0.1:3000`.
17-
- In Codespaces, this works when port `3000` is forwarded to your local machine (VS Code port forwarding makes the remote port reachable as `localhost:3000`).
15+
- `tunneledBrowserConnection()` starts a WebSocket server (by default on port `56767`) that a browser host can attach to.
16+
- The VS Code extension runs on the **UI side** and starts a `PlaywrightTunnel` which connects to `ws://127.0.0.1:56767`.
17+
- In Codespaces, this works when port `56767` is forwarded to your local machine (VS Code port forwarding makes the remote port reachable as `localhost:56767`).
1818
- Once connected, the extension hosts the actual Playwright browser process locally, while your tests continue to run remotely.
1919

2020
The extension provides a UI wrapper around this library (start/stop commands, status bar state, and logs), while `@rushstack/playwright-browser-tunnel` provides the underlying protocol forwarding and browser lifecycle management.
2121

2222
### Detecting whether the VS Code extension is present
2323

24-
Some remote test fixtures want to detect whether the **Playwright on Codespaces** extension is installed/active (for example, to skip local-browser-only scenarios when the extension isn’t available).
24+
Some remote test fixtures want to detect whether the **Playwright Local Browser Server** extension is installed/active (for example, to skip local-browser-only scenarios when the extension isn’t available).
2525

26-
The extension writes a marker file named `.playwright-codespaces-extension-installed.txt` into the remote environment’s `os.tmpdir()` using VS Code’s remote filesystem APIs.
26+
The extension writes a marker file named `.playwright-local-browser-server-extension-installed.txt` into the remote environment’s `os.tmpdir()` using VS Code’s remote filesystem APIs.
2727

2828
On the remote side, `isExtensionInstalledAsync()` checks for that marker file and returns `true` if it exists:
2929

3030
```ts
3131
import { isExtensionInstalledAsync } from '@rushstack/playwright-browser-tunnel';
3232

3333
if (!(await isExtensionInstalledAsync())) {
34-
throw new Error('Playwright on Codespaces extension is not installed/active in this environment');
34+
throw new Error('Playwright Local Browser Server extension is not installed/active in this environment');
3535
}
3636
```
3737

@@ -76,7 +76,7 @@ const terminal = new Terminal(terminalProvider);
7676

7777
const tunnel = new PlaywrightTunnel({
7878
mode: 'wait-for-incoming-connection',
79-
listenPort: 3000,
79+
listenPort: 56767,
8080
tmpPath: path.join(os.tmpdir(), 'playwright-browser-tunnel'),
8181
terminal,
8282
onStatusChange: (status) => terminal.writeLine(`status: ${status}`)
@@ -97,7 +97,7 @@ Use `tunneledBrowserConnection()` in the environment where your tests run.
9797

9898
It starts:
9999

100-
- a **remote** WebSocket server (port `3000`) that the browser host connects to
100+
- a **remote** WebSocket server (port `56767`) that the browser host connects to
101101
- a **local** WebSocket endpoint (random port) that your Playwright client connects to
102102

103103
```ts

apps/playwright-browser-tunnel/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineConfig({
1313
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
1414
use: {
1515
/* Base URL to use in actions like `await page.goto('/')`. */
16-
// baseURL: 'http://localhost:3000',
16+
// baseURL: 'http://localhost:56767',
1717

1818
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
1919
trace: 'on'

apps/playwright-browser-tunnel/src/tunneledBrowserConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface IHandshakeAck {
2626
action: 'handshakeAck';
2727
}
2828

29-
const DEFAULT_LISTEN_PORT: number = 3000;
29+
const DEFAULT_LISTEN_PORT: number = 56767;
3030

3131
/**
3232
* Disposable handle returned by {@link tunneledBrowserConnection}.

apps/playwright-browser-tunnel/src/utilities.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ import { tmpdir } from 'node:os';
66
import { FileSystem } from '@rushstack/node-core-library';
77

88
/**
9-
* The filename used to indicate that the Playwright on Codespaces extension is installed.
9+
* The filename used to indicate that the Playwright Local Browser Server extension is installed.
1010
* @beta
1111
*/
12-
export const EXTENSION_INSTALLED_FILENAME: string = '.playwright-codespaces-extension-installed.txt';
12+
export const EXTENSION_INSTALLED_FILENAME: string =
13+
'.playwright-local-browser-server-extension-installed.txt';
1314

1415
/**
15-
* Helper to determine if the Playwright on Codespaces extension is installed. This check's for the
16+
* Helper to determine if the Playwright Local Browser Server extension is installed. This checks for the
1617
* existence of a well-known file in the OS temp directory.
1718
* @beta
1819
*/
1920
export async function isExtensionInstalledAsync(): Promise<boolean> {
20-
// Read file from os.tempdir() + '/.playwright-codespaces-extension-installed'
21+
// Read file from os.tempdir() + '/.playwright-local-browser-server-extension-installed'
2122
const tempDir: string = tmpdir();
2223

2324
const extensionInstalledFilePath: string = `${tempDir}/${EXTENSION_INSTALLED_FILENAME}`;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/playwright-browser-tunnel",
5+
"comment": "Update marker file names to reflect Copilot rebranding",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@rushstack/playwright-browser-tunnel"
10+
}

common/config/azure-pipelines/vscode-extension-publish.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ parameters:
1717
vsixPath: 'extension.vsix'
1818
manifestPath: 'extension.signature.manifest'
1919
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/debug-certificate-manager-vscode-extension'
20+
- key: 'playwright-local-browser-server-vscode-extension'
21+
projectRelativeAssetsDir: dist/vsix
22+
vsixPath: 'extension.vsix'
23+
manifestPath: 'extension.signature.manifest'
24+
projectPath: '$(Build.SourcesDirectory)/vscode-extensions/playwright-local-browser-server-vscode-extension'
2025
- key: 'rush-vscode-extension'
2126
projectRelativeAssetsDir: dist/vsix
2227
vsixPath: 'extension.vsix'

common/config/subspaces/default/pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rush.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,8 +1478,8 @@
14781478
"tags": ["vsix"]
14791479
},
14801480
{
1481-
"packageName": "playwright-on-codespaces",
1482-
"projectFolder": "vscode-extensions/playwright-on-codespaces-vscode-extension",
1481+
"packageName": "playwright-local-browser-server",
1482+
"projectFolder": "vscode-extensions/playwright-local-browser-server-vscode-extension",
14831483
"reviewCategory": "vscode-extensions",
14841484
"tags": ["vsix"]
14851485
},

0 commit comments

Comments
 (0)