Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed --full-page
Binary file not shown.
24 changes: 24 additions & 0 deletions .changeset/root-screenshot-dash-flag-ignore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
---

chore: delete the committed root screenshot `--full-page`, and ignore dash-prefixed root files

Release-nothing: removes a stray binary from the repository root and touches
`.gitignore` / `AGENTS.md` only — no package code changes.

The repository root carried a **tracked** 68KB PNG whose filename was literally
`--full-page` (1280x577). A screenshot CLI flag landed in the output-filename
slot and was committed alongside #3085, so every `git worktree add` since has
materialised the file into a fresh tree.

The existing safety net could not catch it. `.gitignore` anchors `/*.png` and
friends at the root precisely for stray screenshots, but this file has no
extension to match on — the flag *is* the name. `.gitignore` now also ignores
`/--*`: root-anchored, and matching the accident by its **shape** rather than
by its content type. Nothing legitimate lives at the repository root under a
flag name, so a root entry starting with `--` is an argument-parsing mistake by
construction. Nested paths are unaffected (`packages/**/--foo` still shows up).

Footnote for whoever meets the next one: a leading-dash filename is parsed as an
option by every CLI, so it needs `--` and an explicit path —
`git rm -- './--full-page'`, `rm -- ./--full-page`.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ playwright-report
/*.webp
/*.heapsnapshot
/*.trace
# The extension-less shape the patterns above cannot catch: a root entry whose
# name starts with `--` is a CLI flag that got captured as an output filename
# (`... --full-page` written as `... > --full-page`, or a misordered argument),
# so it carries no extension to match on. Such a name is an argument-parsing
# accident by construction — nothing legitimate lives at the repo root under a
# flag name. See #3193, where a 68KB PNG literally named `--full-page` rode in
# with #3085 and reached every new worktree.
/--*

# Vite timestamp files
*.timestamp-*.mjs
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export const SchemaRenderer = ({ schema }: { schema: UIComponent }) => {

### Housekeeping
- 截图/trace 一律存 `/tmp/`,任务尾清理。禁止写入仓库根。
- `.gitignore` 已锚定 `/*.png` 等防兜底,但仍要主动清。
- `.gitignore` 已锚定 `/*.png` 等防兜底,并额外忽略根级 `/--*` —— 名字以 `--` 开头的根文件必然是把 CLI 参数当成了输出文件名(#3193:一张叫 `--full-page` 的 68KB 截图被提交进来,因为没有 `.png` 后缀,`/*.png` 兜不住)。兜底只是最后一道,仍要主动清。
- 删这类文件要用 `--` 断开参数解析:`rm -- ./--full-page`、`git rm -- './--full-page'`。
- 任务结束:停**自己起的**后台服务(见下方"服务纪律";别按端口杀别人的)、清 `.playwright-mcp/`。
- 改完代码提交时:功能改进(feature)需写 changeset(`pnpm changeset`);纯 bug 修复不需要。

Expand Down
Loading