Skip to content

chore: ignore the Playwright CLI browser profile directory - #4361

Merged
itomek merged 1 commit into
mainfrom
gitignore-playwright
Sep 25, 2026
Merged

itomek merged 1 commit into
mainfrom
gitignore-playwright

Conversation

@itomek

@itomek itomek commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Driving a browser from this repo used to leave .playwright-cli/ sitting in git status forever — a persistent Chromium profile the playwright-cli skill writes to the repo root. It was never meant to be committed, and an untracked directory that never goes away trains people to ignore git status noise. Now it's ignored.

Test plan

  • Pattern matches the real directory:
$ git check-ignore -v .playwright-cli
.gitignore:320:.playwright*	.playwright-cli
  • git status is clean with the directory present.

The playwright-cli skill writes a persistent Chromium profile to
.playwright-cli/ at the repo root, so every session that drives a browser
leaves it sitting in git status as untracked noise.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

This adds one ignore rule so the persistent browser profile the Playwright skill drops in the repo root stops showing up in git status forever. Nothing is tracked under that name today, so nothing gets accidentally hidden, and the PR shows the pattern actually matching the directory.

One thing worth a thought before merge: the pattern is a bit wider than the directory it's aimed at, so a future Playwright config file with a similar name would be silently ignored too. Narrowing it to the exact directory keeps the fix and removes that risk. Not blocking.

Real-world evidence

N/A — repo-config-only change, no runnable surface. The PR's own git check-ignore -v output is the right proof for this kind of change and it's present; the verdict rests on that plus static review.

🔍 Technical details

🟢 Minor — .gitignore:320: pattern is broader and less anchored than needed

.playwright* is unanchored, so it matches at any depth and covers any future .playwrightrc / .playwright.config.* a contributor might legitimately want tracked. Nothing matching exists today (git ls-files | grep -i playwright → empty), so this is a forward-looking tightening only.

# Playwright CLI browser profile/cache (playwright-cli skill)
/.playwright-cli/

Strengths

  • The comment names what writes the directory and which skill owns it, so the next person can tell whether the rule is still needed instead of guessing.
  • Verified with git check-ignore -v rather than "looks right" — the correct evidence for an ignore-rule change.

@itomek
itomek added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 932dfdf Sep 25, 2026
24 checks passed
@itomek
itomek deleted the gitignore-playwright branch September 25, 2026 14:55
@itomek

itomek commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

Good catch on the unanchored pattern — tightened to /.playwright*/, which keeps the wildcard but restricts it to directories at the repo root.

🔍 Technical details

Trailing slash restricts the match to directories, leading slash anchors it to the repo root. Both behaviours verified:

$ git check-ignore -v .playwright-cli
.gitignore:321:/.playwright*/	.playwright-cli

$ git check-ignore -v .playwright.config.ts || echo "NOT IGNORED (correct)"
NOT IGNORED (correct)

kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Sep 25, 2026
Follow-up to amd#4361, which merged before its review feedback could be
applied. The rule it added, `.playwright*`, is wider than the thing it
was aimed at: it matches at any depth and catches files as well as
directories, so a future `.playwright.config.ts` would be silently
untracked and nobody would notice until it went missing. This narrows it
to directories at the repo root, which is the only place the Playwright
CLI actually writes.

### Test plan

- [x] Still ignores the real profile directory:

```
$ git check-ignore -v .playwright-cli
.gitignore:321:/.playwright*/	.playwright-cli
```

- [x] No longer swallows a config file:

```
$ git check-ignore -v .playwright.config.ts || echo "NOT IGNORED (correct)"
NOT IGNORED (correct)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant