Repository navigation
Cut five long browser journeys to the behaviour each one owns - #1793
Conversation
test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline now protects one behavior: a thread the diff seats inline is the core thread, so the user can read its workflow lines, reach it by `t` and by its comment note, share one draft with the panel, react, resolve, and reopen it there, and news updates both views in place. Thirty commits since Sep 14 edited this test, each following a deliberate change to class names, Escape, filters, button faces or rings rather than catching a regression in the seat. Dropped, with the owner of each: - the light/dark parametrization, the card palette, Send button faces, and the text-box ring band: the seat's appearance belongs to the `inline` case of test_render_thread_snapshots.py, and the ring to the ring census; - the held reply send at 0.5 opacity: the same snapshot journey's first-frame and delivery observations own it, for this seat; - go-to-threads focus, the panel's status filter, and the resolved summary's padding: Threads' own navigation and narrowing tests; - the comment note's aria-details across the shadow boundary: test_an_id_staged_into_a_shadow_tree_is_still_the_pages_id reads a diff row's notes through that relation; the note's resting opacity is the note's own presentation; - the reaction picker released by a withdrawn outlet: test_a_failed_thread_surface_returns_its_threads_to_core_fallback, which withdraws an outlet through the same clearThreadSurface. Fault control: an inline seat that rebuilds its thread view on every presentation fails at the inline identity probe. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_real_page_passages_can_be_quoted protects one behavior: on a real authored page, a mouse drag across any kind of passage raises the Comment button and paints its mark inside what was selected. It dragged across every visible block alone and into its neighbour, 2n-1 drags per page: 998 across the four pages, 219 s on main's runner, most of them repeating a paragraph or list item it had already proved. The sweep now drags once per passage shape and once per adjacent pair of shapes, where a shape is what has made selection and search come apart before: the block's tag, the widgets around it, whether the runtime says it, and its text transform and white space. That is 252 drags (feature-gallery 693 -> 150, pr-walkthrough 181 -> 64, ship-review 23 -> 16, visual-review-gallery 101 -> 22). The four pages stay, since each brings shapes the others lack. Fault control: words inside lf-metric no longer counted as page words (passages.js pageWords) fail feature-gallery with three passages that raised no Comment button. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_a_failed_thread_surface_returns_its_threads_to_core_fallback protects one behavior: when a widget's thread surface stops holding its threads, whichever way it stops, its old views go, its threads return to the core surface with the unsent draft, its reaction picker lets go of the keyboard, and the next widget still reconciles. `begin` and `end` threw from the same callback as `outletFor`, and surfaces.js answers every throw in prepare() with the same empty plan and report, so they cost about 14 s each for no code path of their own. The eight remaining cases each take a different path: a throw, unregister outside and inside the callback, disconnection, an outlet moved out of its owner, a detached outlet, no placement, and a datum removed mid-callback. The fixture's `check` helper and the `end` phase that unregister and disconnect borrowed go with them. The reaction strip is read open by its class rather than by counting six reactions, and the fallback is reached by its comment note alone, without the marker press before it. Fault control: a failed widget that no longer pushes its empty plan keeps its old seats, and `outletFor` and `moved` fail with "core views survived in a failed or disconnected widget". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_the_feature_gallery_exercises_the_injected_core_surfaces protects one behavior: on the gallery visitors try, each core surface opens and shows the gallery's own content: its Ask in the Asks drawer, its resolved and media threads in Threads, its earlier version, the other open page, and at phone width its Page Map, with the contents spine out of the first screen. Twenty commits edited it, every one following a deliberate change to Escape, title placeholders, filters, or close controls. Dropped, with the owner of each: - the guide's prose naming the surfaces, which has no machine side; - the untitled thread's topic: test_a_thread_nobody_picked_up_reads_its_opening_words; - the image viewer's modality, unchanged URL, and focus return: test_a_pasted_image_survives_the_reply_draft_and_renders_from_the_message, which now also presses `w` behind the modal viewer, the one check that had no other home; - Escape's way out of Threads: test_the_threads_list_hands_focus_to_the_thread_it_shows_open; - the Page Map's close cross at its header's end: moved to test_the_g_chord_opens_an_empty_page_map, which opens the same dialog on a one-paragraph page. The resolved filter is asserted enabled before it is pressed, so a gallery without a resolved thread fails on that fact rather than a click timeout. Fault control: the gallery's companion log without its resolve event fails at the resolved filter, which the narrowing then offers disabled. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_a_thread_can_be_answered_in_the_margin_without_opening_threads protects one behavior: a thread's margin marker opens its card on the thread, `c` writes in its reply box, and Send answers the thread with Threads left shut; with Threads open, the same marker answers in the panel and opens no card. Eighteen commits edited it, each after a deliberate change to placement, the key badge, or the card's markup. Dropped, with the owner of each: - the 1920 width and the card's geometry beside or past the cluster: test_a_thread_beside_its_words_takes_the_room_to_the_visible_edge, test_a_thread_in_a_short_rail_stands_on_the_side_with_room, test_an_inline_thread_keeps_one_readable_card_across_page_claims (its 1920 card clears the cluster), and the side rule's Node tests in tests/runtime/comment-placement.test.mjs; - the first-frame placement probe: test_a_thread_card_is_unseen_until_its_first_placement_lands; - the "Reply c" hint's fonts and badge: the shared compose placeholder, read by test_render_options_addition and the Threads `c` tests; - the marker's accent border and aria-expanded: test_a_thread_margin_entry_opens_inline_when_the_panel_is_closed and the margin selection tests; - a close-and-reopen detour that typed and cleared a draft. Fault control: a marker that opens its own card while Threads is open (margin-projection.js openThreadChoice) fails where the card must stay hidden. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # tests/test_render_startup.py
leaf-agent
left a comment
There was a problem hiding this comment.
The removed dark run leaves the diff-seated thread without a dark appearance check. The snapshot cases have one inline case, which inherits scheme="light"; the dark cases cover only the margin and panel, and their page has no lf-diff. A dark-only change to the diff thread's palette or focus band would now pass these checks. Please add a dark inline snapshot or retain a dark appearance assertion before dropping this case.
test_render_margin.py conflicted where #1781 widened test_a_thread_can_be_answered_in_the_margin_without_opening_threads to a 2400 case so the card's past-the-row branch stays covered, and moved its geometry to the card's whole measure (592px). The answering journey keeps this branch's one-width shape; #1781's geometry moves whole into test_a_margin_card_clears_its_row_only_where_that_costs_no_width, which opens the card at 1920 (over the row) and 2400 (clear of it) and asserts main's placement and edge rules unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1787 lets the agent's reply on the inline diff thread be read before the user's two replies arrive, so its seat holds two of them behind its notice rather than three. The lifecycle journey keeps that: it waits for the read reply and opens the "2 new replies" notice. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The lifecycle journey no longer runs in dark, so the thread the diff seats inline had no dark appearance check: the dark snapshot cases covered the margin and panel only, on a page with no lf-diff, and a dark-only change to the diff thread's palette or focus band passed every gate. `inline-dark` joins the thread snapshot cases: the inline journey's fixture page in the dark scheme with reduced motion, six reviewed checkpoints from draft to acceptance. The Mac profile is captured and accepted here, which moves the leaf-assets pin and the README's image URLs to it; the other seven cases' Mac captures pass against the previous pin before re-acceptance. Fault control: a dark-only background on the diff's seated thread (packages/diff/shadow.css) fails inline-dark at all six checkpoints while the light inline case passes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1790 made leases.release_lease unlock before it closes, because closing leaves the lock held while a forked child still holds the descriptor. test_a_presence_read_crossing_freshness_returns_to_the_current_lease still released its waiter lease with lease.close(); it now calls release_lease. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The new inline-dark case has six approved captures in the pinned macOS profile, but none in the pinned Linux profile. SnapshotRun.capture reports missing geometry for each stage and compares against a missing PNG, so the Linux appearance test cannot pass for this case. Please capture, review, and publish the Linux profile's six stages in leaf-assets before merging.
SnapshotRun.capture compared a stage against a baseline the pinned profile did not hold, so pytest-image-snapshot raised ImageNotFoundError at the first stage and ended the journey. A new case's first run on a profile, such as inline-dark on the Ubuntu CI profile, therefore left one actual image instead of six, and the CI evidence that profile is accepted from was incomplete. A missing image is now recorded like missing geometry: the stage fails with "missing approved image", and the journey goes on to capture every later stage, which finish() reports together. Checked by hiding the pinned Mac inline-dark-pending.png: the case fails with that one message and compares the remaining stages. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1789 replaced the Asks drawer with the Queue panel. The feature gallery journey opens `.lf-queue`, finds the gallery's Ask among `.lf-queue-row`s, and keeps main's check that the row is of kind "ask" through `data-lf-kind`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The six inline-dark checkpoints for the Linux profile come from CI run 37263447385, the Ubuntu journey on 2b76dfa, whose other seven cases passed against the pinned Linux images. Each stage was reviewed beside the approved Mac capture: the same dark card, focus band on the field, dimmed sending reply, restored draft after refusal and newer draft, differing only in the DejaVu faces. The other cases' Linux files are republished unchanged. Other sessions published Mac captures to leaf-assets between these accepts, and one dropped inline-dark from the Mac profile, so the Mac profile is republished exactly as 4386643b held it. This pin differs from 4386643b only by the six Linux inline-dark images and their geometry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Main now compares thread appearance on macOS only, so the missing-image path in SnapshotRun.capture follows main's COMPARED gate and its comment no longer names a CI run. The leaf-assets pin moves to d8f21142, built on main's pin 486692ed plus the 24 inline-dark files (Mac and Linux images and geometry) and nothing else; every file 486692ed holds is unchanged. The Mac inline-dark images are recaptured on this merged tree: against the earlier approved set, five stages are byte-identical and the drafted stage differs in eight corner antialias pixels by one level, so #1797 did not change the seat's dark appearance. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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]>
Five long browser journeys also checked things other tests own, such as colours, focus rings and panel filters, so deliberate UI changes kept breaking them. The most-edited,
test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline, was edited by 30 commits since Sep 14, each following an intended UI change; none caught a regression. Each test now asserts only the behaviour it owns.Changes
test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline: a thread the diff seats inline is the core thread. From the diff the user reaches it withtor its comment note, shares one draft with the panel, reacts, resolves and reopens it, and news updates both views in place. Palette, Send faces and ring band are left totest_render_thread_snapshots's inline case; panel filter and go-to-threads focus to the Threads tests. The dark/light parameter goes.test_real_page_passages_can_be_quoted: drags once per passage shape and once per adjacent pair of shapes, instead of 2n−1 drags per page (998 → 252). All four pages stay.test_a_failed_thread_surface_returns_its_threads_to_core_fallback: drops thebeginandendcases, which reach the samecatchinsurfaces.jsasoutletFor, along with the six-reaction count. Main's keyboard-activation case from Preserve reply editing and attach comment surfaces through scrolling #1705 is kept.test_the_feature_gallery_exercises_the_injected_core_surfaces: checks that each core surface shows the gallery's own content. Two checks with no other owner move: pressingwbehind the image viewer goes totest_a_pasted_image_survives_…, and the Page Map's close cross totest_the_g_chord_opens_an_empty_page_map.test_a_thread_can_be_answered_in_the_margin_without_opening_threads: drops the geometry, first-frame, font and border checks other tests own, and the 1920 width.Thread snapshots: a new
inline-darkcase indev/leaf_dev/thread_snapshots.pytakes over the dark appearance check the lifecycle test dropped. It has reviewed images for both the Mac and Linux profiles, andleaf-assets.jsonis moved to pin them.SnapshotRun.capturenow records a missing baseline image as a failure and keeps going, as it already did for missing geometry, so a new case's first run captures every stage.test_a_margin_card_clears_its_row_only_where_that_costs_no_width: new. It holds the placement checks main added to the margin-answer test in Keep a thread card's margin row clear only where that costs no width #1781, at 1920 and 2400, while that test stays at one width.test_render_startup.py's lease test callsrelease_lease(lease), which Fix two load-sensitive tests: release leases by unlocking, and give the shift watch a pre-scroll pose #1790 made unlock before closing.Validation
inline-darkat all six stages, while the lightinlinecase passes.Each test fails on a planted fault in the code it protects:
lf-metricwords not counting as page words (quoting)Local times under heavy load: