[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, node.js, typescript
- Ambito
- tooling
Direzione di ricerca
La cartella di output predefinita deriva da outputDir() in packages/playwright-core/src/tools/backend/context.ts, e gli snapshot vengono scritti in un file da packages/playwright-core/src/tools/backend/response.ts. Inizia leggendo come viene creata la cartella, poi verifica la correzione della CLI in packages/playwright-core/src/tools/cli-daemon/program.ts, che aggiunge .playwright-cli/ a .gitignore. È completato quando un'esecuzione del server in un repository git nuovo lascia git status --porcelain pulito, ad esempio scrivendo .playwright-mcp/.gitignore con il contenuto *.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What's going on?
After browser_navigate, browser_click, browser_type and most other calls, the MCP server writes a snapshot of the page to .playwright-mcp/page-<time>.yml. When the page logs anything, its console messages go to console-<time>.log beside it. The folder is created in the workspace: the client's MCP root, or the server cwd when there is no root. For a coding agent that is the project, usually a git repository, and nothing ignores the folder:
$ git status --porcelain
?? .playwright-mcp/console-2026-11-22T00-13-19-546Z.log
?? .playwright-mcp/page-2026-11-22T00-13-19-601Z.yml
A snapshot is the text of the page. On a signed-in page that means names, e-mail addresses and account details, one git add -A away from a commit. I noticed it when the first snapshot of a session, taken on a Google account chooser, listed every signed-in address. On my own machine, 10 git repositories have this folder: 8 have a .playwright-mcp/ line added to their .gitignore, and in the other 2 it sat untracked (412 files) until I counted.
#42307 reported the same gap for the CLI, and #42318 fixed it: playwright-cli install now appends .playwright-cli/ to .gitignore, "since traces and storage state saved there can contain credentials". The MCP server has no install step, so nothing does this for .playwright-mcp/. (microsoft/playwright-mcp#1789 asked to move these files out of the workspace and was declined, with the advice to treat .playwright-mcp like .env. I am not asking to move them.)
Steps
git init demo- Start the server with
demoas its cwd, or announcedemoas the client's only MCP root. - Call
browser_navigateon a page that logs to the console. git -C demo status --porcelainprints the two lines above, andgit check-ignoreexits 1 for both files.
Expected: the default output folder stays out of git status. One way that leaves the user's .gitignore alone: when the server creates .playwright-mcp/, it also writes .playwright-mcp/.gitignore containing *, as Python's venv and pytest's cache directory do. With that file added by hand, git status in the steps above is clean.
The folder comes from outputDir(); every snapshot except an explicit browser_snapshot goes to a file.
Version
@playwright/mcp 0.0.86 (playwright-core 1.66.0-alpha-2026-11-18), and the same with playwright-core 1.66.0-alpha-2026-11-21. Windows 11, Node 24.21.0; the folder logic is not platform-specific.
- Lingua principale
- TypeScript
- Stelle
- 100k
- Fork
- 6.9k
- Merge medio
- 16h 8m
- PR unite (30g)
- 281
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
agent-triage-done
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/playwright#44264 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] WebKit keeps every removed iframe's JS heap alive (memory grows until the page crashes)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
microsoft/playwright#44290 ·
I maintainer di solito rispondono entro 1 giorno
-
[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
microsoft/playwright#44288 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
microsoft/playwright#44287 ·
I maintainer di solito rispondono entro 1 giorno
-
[MCP] browser_tabs list/select indices diverge across HTTP sessions with --shared-browser-contextAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
microsoft/playwright#44279 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
blamechris/chroxy#9272 ·
I maintainer di solito rispondono entro 1 giorno
-
no-repo-link tool-submission
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
BraveOPotato/NoSignups#2458 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
drmrd/vernacular#1061 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] PUT /profiles/{id} silently drops design_prompt — designed voice profiles cannot be editedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100