stably 4.12.9 → 4.12.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,22 +133,17 @@ async function startMcpDaemonServer(config, contextFactory) {
133
133
  });
134
134
  const screen = JSON.parse(screenSize.value);
135
135
  daemonDebug("screen size:", screen.width, "x", screen.height);
136
- // Quick check: if viewport won't fit with decorations (~100px width, ~200px height),
137
- // skip measurement and go straight to maximize + device emulation.
136
+ // If viewport won't fit with decorations, just maximize the window.
137
+ // No device emulation here the daemon doesn't know which project will be selected,
138
+ // so run-test's page fixture is the sole authority on viewport emulation.
138
139
  if (vp.width + 100 > screen.width || vp.height + 200 > screen.height) {
139
- daemonDebug("viewport", vp.width, "x", vp.height, "exceeds screen, using maximize + device emulation");
140
+ daemonDebug("viewport", vp.width, "x", vp.height, "exceeds screen, maximizing window");
140
141
  // Chrome requires fullscreen → normal → maximized (can't go directly fullscreen → maximized).
141
142
  if (currentBounds.windowState === "fullscreen") {
142
143
  await cdpSession.send("Browser.setWindowBounds", { windowId, bounds: { windowState: "normal" } });
143
144
  }
144
145
  await cdpSession.send("Browser.setWindowBounds", { windowId, bounds: { windowState: "maximized" } });
145
- // Use Emulation.setDeviceMetricsOverride directly instead of page.setViewportSize()
146
- // because setViewportSize also resizes the window, pushing it off-screen and hiding
147
- // the tab bar and address bar.
148
- await cdpSession.send("Emulation.setDeviceMetricsOverride", {
149
- width: vp.width, height: vp.height, deviceScaleFactor: 0, mobile: false
150
- });
151
- daemonDebug("device emulation applied:", vp.width, "x", vp.height);
146
+ daemonDebug("window maximized");
152
147
  } else {
153
148
  // Viewport fits — un-maximize, measure decorations, resize window exactly.
154
149
  if (currentBounds.windowState === "maximized" || currentBounds.windowState === "fullscreen") {
@@ -307,7 +307,7 @@ function outputDir(config, clientInfo) {
307
307
  return import_path.default.resolve(config.outputDir);
308
308
  const rootPath = (0, import_server2.firstRootPath)(clientInfo);
309
309
  if (rootPath)
310
- return import_path.default.resolve(rootPath, config.skillMode ? ".playwright-cli" : ".playwright-mcp");
310
+ return import_path.default.resolve(rootPath, config.skillMode ? ".stably-browser" : ".playwright-mcp");
311
311
  const tmpDir = process.env.PW_TMPDIR_FOR_TEST ?? import_os.default.tmpdir();
312
312
  return import_path.default.resolve(tmpDir, "playwright-mcp-output", String(clientInfo.timestamp));
313
313
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // ../../app/node_modules/.pnpm/@stablyai-internal+playwright-cli@0.4.19/node_modules/@stablyai-internal/playwright-cli/playwright-cli.js
3
+ // ../../app/node_modules/.pnpm/@stablyai-internal+playwright-cli@0.4.20/node_modules/@stablyai-internal/playwright-cli/playwright-cli.js
4
4
  var fs = require("fs");
5
5
  var path = require("path");
6
6
  if (process.platform === "darwin" && !process.env.PLAYWRIGHT_DAEMON_SOCKETS_DIR) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stably",
3
- "version": "4.12.9",
3
+ "version": "4.12.10",
4
4
  "packageManager": "pnpm@10.24.0",
5
5
  "description": "AI-powered E2E Playwright testing CLI. Stably can understand your codebase, edit/run tests, and handle complex test scenarios for you.",
6
6
  "main": "dist/index.mjs",
@@ -87,7 +87,7 @@
87
87
  "playwright": "1.59.0-alpha-1771104257000",
88
88
  "@stablyai/codegen-agent-constants": "workspace:*",
89
89
  "@stablyai-internal/api-client": "workspace:*",
90
- "@stablyai-internal/playwright-cli": "0.4.19",
90
+ "@stablyai-internal/playwright-cli": "0.4.20",
91
91
  "@stablyai-internal/pwtrace": "0.3.1",
92
92
  "@stablyai/agent-hooks": "workspace:*",
93
93
  "@stablyai/agent-schemas": "workspace:*",
@@ -1,11 +0,0 @@
1
- --- lib/mcp/browser/config.js
2
- +++ lib/mcp/browser/config.js
3
- @@ -305,7 +305,7 @@
4
- function outputDir(config, clientInfo) {
5
- if (config.outputDir)
6
- return import_path.default.resolve(config.outputDir);
7
- const rootPath = (0, import_server2.firstRootPath)(clientInfo);
8
- if (rootPath)
9
- - return import_path.default.resolve(rootPath, config.skillMode ? ".playwright-cli" : ".playwright-mcp");
10
- + return import_path.default.resolve(rootPath, config.skillMode ? ".stably-browser" : ".playwright-mcp");
11
- const tmpDir = process.env.PW_TMPDIR_FOR_TEST ?? import_os.default.tmpdir();