Repository navigation
Add optional Playwright trace review and comments - #1850
Merged
Merged
Conversation
leaf-agent
reviewed
Oct 5, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new resources selector affects which media bytes a source preserves, but the page-lifetime contract comparison still compares only schema and records. With a bound source, changing its selector from images[].url to other[].url under the same contract returns no transition error. That lets a re-vendored page keep the same source id while its previously declared images stop being captured in snapshots and exports. Include resources in that comparison so a change in media meaning requires a new source id.
The PR description and TODO.md also leave the choice between Leaf's timeline and Playwright's viewer unresolved. I’m withholding approval until that design decision is made.
leaf-agent
previously approved these changes
Oct 6, 2026
leaf-agent
approved these changes
Oct 6, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 6, 2026
A publication to `max-sixty/leaf-assets` cloned the repository's head and set a directory to exactly the files that run produced. If another branch had published a file into that directory since this branch's pin, the file was on the head but missing from this run, so the publication deleted it. While #1793 was in review, another session's thread-image publication removed its new `inline-dark` images this way. - **`clone`** now checks out the revision `leaf-assets.json` pins. A stage's additions, replacements and removals are therefore measured against the set this branch reads. - **`publish`** commits that change, records it at `refs/leaf-assets/change` in the checkout, and `replay`s its file list onto the current head: - each file the change added or altered takes the change's copy; - each file it removed is removed, whatever the head did to that file meanwhile; - files other branches published since the pin survive. - **Retries.** A refused push replays onto the new head and tries again, up to three times. A later `publish` call on the same checkout replays the kept change onto the head as it then stands. - **Catalog links** derive from the commit each attempt pushes. An unchanged checkout keeps its pin rather than moving to the head. - **Thread-snapshot acceptance** (`thread_snapshots_revision`, from #1850) still installs its whole expectation tree exactly as staged. `clone` and `stage` return a `Checkout` (its path, the pin key it was cloned from, and with `replace_tree=True` the directory it owns), and `publish` takes that value. `replay` installs an owned tree whole from the change, so head files outside the tree survive. The pin a checkout publishes is the one it was cloned from: `stage`/`clone` take `revision_key`, and `publish` no longer does. - **`AGENTS.md`**: - a conflict on the media `revision` takes the later pin, which now holds both branches' files; - a file both branches published is published again from the merged tree; - a conflict on `thread_snapshots_revision` is accepted again from the merged tree. ## Validation `test_a_publication_keeps_what_others_published_since_its_pin` is new. - **Two branches share one pin.** Between them they add, rewrite and remove files, and touch the same files in each direction: - both rewrite one file; - the first removes a file the second rewrites; - the first rewrites a file the second removes. - **Result.** The head holds the first's addition, the second's addition, and the second's choice on every shared file. - **Retry.** A third publication is refused by the remote. Another publisher then lands, and the third's retry lands on top with both changes. - **Against older code.** - Pre-PR code: the test fails on the first branch's dropped file. - This PR's earlier cherry-pick version: it fails on both modify/delete conflicts. The existing publication test passes in both variants, including the refused push and its retry. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Browser recordings can now be reviewed and commented on through an optional Leaf package. Playwright owns recording and the original trace archive; Leaf imports native action checkpoints, PNG screenshots, filmstrip frames and saved accessibility elements into one timeline. Following a comment restores the recorded moment, and the full Playwright viewer remains linked beside the controls.
This PR ships the optional Leaf timeline for a trial alongside Playwright recording and its native viewer. Max requested that provisional integration be merged and recorded that he is not sure it is great. Permanent retention remains undecided; TODO.md makes further DOM selection work conditional on keeping the integration.
playwrightpackage, a trace-format-9 importer, a review widget and a worked example. Direct selection of arbitrary DOM elements and passages remains in Playwright's viewer.Validation: browser/import/recording tests, mouse/Enter/Space navigation, and real desktop and phone journeys with 40 timeline stops: image origin, width and controls remain fixed, with at most 1.1 px image-height variation from native JPEG rounding. Image ink stays aligned after desktop-to-phone resizing. Formatting, JavaScript, TypeScript and bundle gates pass after integrating main. The full Python gate passed 2,344 tests; the importer/deadline repair then passed all 185 focused checks. After integrating the latest main, all 48 macOS image checkpoints pass at the existing strict tolerance, and both trace browser regressions pass (12 tests passed, one Linux-only test skipped). Resource-lifetime regressions and the 102-page website build also pass. CI validates the pushed head.