Skip to content

Commit a14b9be

Browse files
committed
chore(skill): document why each git-log path is watched
Replace the stale reference to the upstream "client side changes" workflow with an inline explanation of what each watched path can affect on the Java side, so the rolling instructions stand on their own.
1 parent 35cc577 commit a14b9be

1 file changed

Lines changed: 39 additions & 5 deletions

File tree

.claude/skills/playwright-roll/SKILL.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,45 @@ Help the user roll to a new version of Playwright.
77
ROLLING.md contains general instructions and scripts.
88

99
Start with running ./scripts/roll_driver.sh to update the version and generate the API to see the state of things.
10-
Afterwards, work through the list of changes that need to be backported.
11-
You can find a list of pull requests that might need to be taking into account in the issue titled "Backport changes".
12-
Work through them one-by-one and check off the items that you have handled.
13-
Not all of them will be relevant, some might have partially been reverted, etc. - so feel free to check with the upstream release branch.
10+
Afterwards, walk through the upstream changes that affect the Java client and port the relevant ones.
11+
12+
## Determining what to port
13+
14+
List the upstream commits that touched a client-relevant path since the last release. The paths cover everything that can change the public Java surface or the wire protocol:
15+
16+
- `docs/src/api/` — the source of truth for `api.json`. Method/option additions, removals, and `langs:` filter changes flow from here.
17+
- `packages/playwright-core/src/client/` — the JS client implementation that the Java client mirrors.
18+
- `packages/isomorphic/` — selector engines, locator generation/parsing, and aria-snapshot logic shared between client and server. Changes here can affect client-side helpers like `getByRoleSelector`.
19+
- `packages/playwright/src/matchers/matchers.ts` — assertion-method definitions. Changes here usually correspond to new options on `LocatorAssertions` / `PageAssertions`.
20+
- `packages/protocol/src/protocol.yml` — the wire protocol schema. Method/event additions, parameter renames, and result-shape changes affect what the Java `*Impl` classes need to send/receive.
21+
22+
```bash
23+
cd ~/playwright
24+
PREV_TAG=$(git tag | grep -E '^v1\.[0-9]+\.[0-9]+$' | sort -V | tail -1) # e.g. v1.59.1
25+
git log "$PREV_TAG"..HEAD --oneline -- \
26+
'docs/src/api/' \
27+
'packages/playwright-core/src/client/' \
28+
'packages/isomorphic/' \
29+
'packages/playwright/src/matchers/matchers.ts' \
30+
'packages/protocol/src/protocol.yml'
31+
```
32+
33+
Walk that list top-to-bottom (oldest-first is easier — newest is at top, so reverse). For each commit:
34+
1. Read the commit (`git show <sha>`) to see what client/protocol/docs changed.
35+
2. If it's JS-internal (bundling, dispatcher conventions, electron, mcp, dashboard, trace-viewer, test-runner) — skip.
36+
3. If it touches `docs/src/api/` or types, check `langs:` annotations — features marked `langs: js`/`langs: js, python` don't apply to Java.
37+
4. If it adds/changes a public API method or option that applies to Java, port it. The api.json regenerated by `roll_driver.sh` already contains the new types/options, so the generated Java interfaces usually pick them up automatically — what's typically missing is the `*Impl` wiring.
38+
5. Watch for follow-up reverts — a "feat: X" commit might be undone by a later "Revert X". Check whether the change still exists in HEAD before porting.
39+
6. Maintain a running notes file (e.g. `/tmp/roll-notes.md`) listing each upstream PR as ported / skipped / verified-already-supported, with a one-line reason. This file becomes the body of the eventual PR.
40+
41+
## What to include in the rolling PR
42+
43+
- Driver version bump
44+
- Generated interface diffs from `roll_driver.sh`
45+
- `*Impl` wiring for each ported feature
46+
- Generator updates (import lists, special-cases) if new types appeared
47+
- A small test per new public API surface — listener for new events, basic call for new methods, regression for changed return types
48+
- PR description: list each upstream PR ported, each skipped (with reason), and each verified-already-supported
1449

1550
Rolling includes:
1651
- updating client implementation to match changes in the upstream JS implementation (see ../playwright/packages/playwright-core/src/client)
@@ -164,5 +199,4 @@ Branch naming for issue fixes: `fix-<issue-number>`
164199

165200
## Tips & Tricks
166201
- Project checkouts are in the parent directory (`../`).
167-
- When updating checkboxes, store the issue content into /tmp and edit it there, then update the issue based on the file
168202
- use the "gh" cli to interact with GitHub

0 commit comments

Comments
 (0)