chrometools-mcp 3.5.4-beta.0 → 3.5.4

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.5.4] - 2026-02-16
6
+
7
+ ### Fixed
8
+ - **Angular stale DOM in analyzePage** — Added `whenStable()` wait (Protractor-style) before DOM traversal. Prevents reading intermediate DOM state during Angular change detection after user interactions. Zero overhead when Angular is already stable; 3s timeout safety net
9
+ - **Stale element registry** — `window.__ELEMENT_REGISTRY__` is now cleared before each `analyzePage` call. Old APOM IDs from previous analyses no longer point to non-existent elements
10
+ - **False "ELEMENT DETACHED" warning on click** — Click tool no longer reports "handler did NOT fire" when Angular re-renders DOM after a successful click. The scary warning with executeScript workaround suggestions is replaced with a neutral "Click was successful" note
11
+
5
12
  ## [3.5.3] - 2026-02-16
6
13
 
7
14
  ### Fixed
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import {Server} from "@modelcontextprotocol/sdk/server/index.js";
4
4
  import {StdioServerTransport} from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrometools-mcp",
3
- "version": "3.5.4-beta.0",
3
+ "version": "3.5.4",
4
4
  "description": "MCP (Model Context Protocol) server for Chrome automation using Puppeteer. Persistent browser sessions, UI framework detection (MUI, Ant Design, etc.), Page Object support, visual testing, Figma comparison. Works seamlessly in WSL, Linux, macOS, and Windows.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -163,17 +163,11 @@ export async function executeClickAction(page, element, options = {}) {
163
163
  }
164
164
 
165
165
  // Element detached during click (Angular *ngFor + Zone.js)
166
+ // This is NORMAL for Angular apps: click fires → handler runs → Zone.js triggers
167
+ // change detection → *ngFor recreates elements → original handle is detached.
168
+ // The click DID work — detachment is a consequence of successful state change.
166
169
  if (elementDetached) {
167
- hintsText += '\n⚠️ ELEMENT DETACHED: Element was removed from DOM during clickhandler did NOT fire.';
168
- hintsText += '\n Cause: Angular Zone.js triggers change detection mid-click, *ngFor recreates elements.';
169
- hintsText += '\n App fix: add trackBy to *ngFor, or cache array reference instead of returning new one.';
170
- hintsText += '\n Workaround options:';
171
- hintsText += '\n 1. Click via executeScript (bypasses Puppeteer element handle):';
172
- hintsText += '\n executeScript({ script: "document.querySelector(\'YOUR_SELECTOR\').click()" })';
173
- hintsText += '\n 2. Call Angular component method directly:';
174
- hintsText += '\n executeScript({ script: "ng.getComponent(document.querySelector(\'component-tag\')).methodName()" })';
175
- hintsText += '\n 3. Re-analyze page and use new element ID:';
176
- hintsText += '\n analyzePage({ refresh: true }) → click({ id: "NEW_ID" })';
170
+ hintsText += '\nNote: Element was re-rendered after click (Angular change detection). Click was successful use analyzePage to see updated state.';
177
171
  }
178
172
 
179
173
  if (hints.suggestedNext.length > 0) {