feat(screenshot): add a capture runner and fix e2e verb papercuts - #242
Merged
Merged
Conversation
The viewer renders only files near the viewport, so verbs on a listed but off-screen file timed out looking for its container. They now move the cursor there first: header verbs walk with J/K and keep a collapsed file collapsed, line verbs use gotoFile and expand it. Line verbs also wait for the target row to stop moving before pressing, fail fast on files with no rows, list the rendered lines when one is missing, and selectLines waits for the composer. SKILL.md documents the thread shape (messages, not comments).
A scenario exports one interaction function and, optionally, a repo; the
runner reviews the fixture by default, owns the server, browser,
before/after runs and cleanup, and prints only output paths plus a
labelled compare image.
- --before runs a cached git-archive build of the base revision with its
own server and client (startDiffle({ root })), never touching dist/client.
- buildClient is silent unless it fails and skips a fresh build.
- demoRepo builds throwaway repos with -C and an inline identity.
- test/e2e/harness.spec.ts pins every verb in CI.
- toggleCollapse parks the pointer; fileItem also accepts older headers.
BREAKING CHANGE: withBaseClient, installClient, CLIENT_DIR and
scenario.template.mts are removed; npm run screenshot now takes a
scenario for the runner.
pavelzw
approved these changes
Sep 30, 2026
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.
Makes screenshotting a change cheap for agents, on top of the e2e harness from #214, and fixes two papercuts users reported. Replaces #238, which targeted the harness #214 removed.
Runner
A scenario exports one interaction function and, optionally, a repo. The runner owns the server, browser, before/after runs and cleanup.
npm run screenshot -- lig.ts --before c9dc8d2506prints only this:{ before, after }files (demoRepo: temp dir,git -C, inline identity) or a repo path.--beforeruns agit archivebuild of that revision with its own server and client, throughstartDiffle({ root }). It is cached per commit, and never swapsdist/clientor registers a worktree.buildClientprints only on failure and skips a build whose sources haven't changed, which also speeds up the e2e global setup. ffmpeg is quiet and the intermediate webm is removed.failure-<side>.png; exit status 1.💥 Breaking:
withBaseClient,installClient,CLIENT_DIRandscenario.template.mtsare removed.npm run screenshotnow takes a scenario for the runner.Harness fixes (
test/e2e/browser.ts)J/K, keeping a collapsed file collapsed; line helpers usegotoFile, which also expands it.selectLineswaits for the composer and says if it never opens.toggleCollapsemoves the pointer away first. The app's tooltip removestitlefrom the hovered button, so a second toggle found nothing.fileItemalso accepts headers from beforedata-path, so--beforeworks on older revisions.anchor.path,messages[0].body, nocomments(reported).test/e2e/harness.spec.tspins every helper in CI, so markup changes break there instead of in an agent's script.