Repository navigation
Simplify diff layout with native source and conversation rows - #3656
Merged
Merged
Conversation
leaf-agent
reviewed
Oct 23, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
Removing isPagePaint from the public widget API breaks pages carrying the previous vendored diff widget: that widget imports the named export, while a serving Leaf supplies this new runtime. The widget's module cannot link, and the page's protocol remains 17. AGENTS.md, “Pages across Leaf updates” requires a protocol bump for a break in widget-api.js so those pages are refused until re-vendored. Bump the protocol and regenerate its derived artifacts with this removal.
leaf-agent
previously approved these changes
Oct 23, 2026
…king # Conflicts: # dist/kernel/kernel.json
leaf-agent
approved these changes
Oct 23, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 23, 2026
…ght (#3675) The native diff rows introduced in #3656 put numbered comment buttons above the focused file header's full-path tooltip. Raise the pinned header above those buttons so keyboard and touch users can read the complete path. The diff example's first-paint height also lagged its rendered height after the row change and the shared scrollbar clearance in #3670; update its reserved height to the measured 156px. In [main run 39886063961](https://github.com/max-sixty/leaf/actions/runs/39886063961), the full-path hit test and two first-paint cases failed. All three pass on this branch, as does the focused horizontal scrollbar clearance case. The latter is supplied by the merged #3670 change, so this PR adds no second padding rule. --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
…3835) A session landing about a dozen PRs on 2026-10-23 kept naming test failures as "fails on main too" and moving on. Checked against main, most of them had no owner: the corpus render gate had failed three nightlies with no `tend-ci-fix` PR or issue, and four browser tests failed only on macOS, which `tend-ci-fix` never sees. This change gives such failures an owner in the guidance, and fixes the ones that were still failing. ## Guidance `tests/AGENTS.md` ("Selecting checks") already sent macOS-only failures to a local session, but the inherited-failure step ended at "name it and land", a paragraph away from that rule. The inherited-failure step now says to check for an owner first. The ownership rule says what `tend-ci-fix` owns: a failure in main's latest run while its run on it is going, or while an open `fix/ci-*` pull request or `ci-fix:` issue names it. Everything else goes to a local session once no session, worktree (Codex's included) or open pull request covers it: macOS-only failures, and failures whose `tend-ci-fix` run was refused (as the bot's rate limit refused two on 2026-10-23) or ended without naming them. It also says to confirm a macOS-only failure at normal priority, since `taskpolicy -b` slows headless Chrome's frames from about 17ms to about 100ms, and two of the four "macOS-only" failures came from that alone. ## Fixes - **Folded margin pin (product bug).** Pressing `e` on a folded pin's toggle showed the six reactions and then tore them down: the unfolded face hides the toggle, and focus falling to the page closed the options. `presentCluster` (`margin-projection.js`) now moves focus from a toggle the new face hides to the first option, where a press on the toggle lands. New test: `test_reactions_raised_from_a_folded_pin_s_toggle_take_the_focus`. `test_reactions_keep_all_six_buttons_on_an_occupied_target[390-keyboard]` failed on macOS because the pin folds there (Charter's metrics leave no seat at 390px) and `.focus()` on the hidden Accept did nothing; it now Tabs to Accept, as a user would. - **Suggestion picker test.** The send button takes its new label a frame after the picker's, so for that frame two buttons are named "Comment"; the locator is scoped to `.lf-response-options`. - **Gesture sampling.** `gesture_writes` read anchor-positioned chips inside `requestAnimationFrame`, before Chrome moves anchored boxes in that frame, so samples lagged a frame. It now reads in a task posted after the frame renders, skipping frames that don't move the scroller. This fixes `test_a_chip_seated_below_its_neighbour_rides_the_scroll_with_it` (59 vs 60px at slow frame rates). - **Corpus render gate** (`test_the_layer_holds_its_whole_page_rules_on_the_corpus`): - Aims: the sweep now holds each control to the `--aim-floor` it declares itself, as the floor rule does, so diff line numbers (which opt out in `packages/diff/styles/shadow.css`) are no longer flagged. A floor inherited from a container still counts as the document's, and an aim covered to nothing is always short. The transparency skip that used to excuse the line numbers went away when #3656 made them visible. `wt-merge`'s terminal lines declare a zero floor (the scrubber and chapters are the touch route), and `github-discoveries`' refresh button folds in the floor. - `lf-shot` fit itself inside its stage's ResizeObserver delivery, changing the stage's height there ("ResizeObserver loop completed with undelivered notifications"). The fit now runs through `frameFor` after delivery, as `lf-chart` and `page-layout` do; after a width change, the old fit shows for one frame. - Paper: the marker check now counts only list items, and `lf-shot`'s drawing is built from generated boxes again (`shotBox` in `shot-view.js`), with offers only on its presses. That removes the `display: block !important` print overrides, which had made the gate read its card dress as a promise of a press. On paper, the label the screen isn't showing now prints as plain words. ## Testing At normal priority on the merged head: the corpus gate, the reactions and picker tests, the chip and scroll-paint tests, `test_shot_controls_have_disjoint_targets_and_labels_stay_passive`, the control-archetype and focus-ring journeys and `projection/test_visual_review.py` (36 passed), plus `pnpm run test:runtime` (540 passed) and `pnpm run check`. A container-level `--aim-floor: 0px` on `wt-merge` makes the corpus gate fail, as it should. No printed PDF of `lf-shot` was inspected. > _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.
Opening a large diff made Leaf coordinate separate gutter and source columns, resize observers and conversation spacers. Render each source line with its numbered comment button in one native block row, with its conversation following in normal flow. Pierre still owns parsing and highlighting; retained rows preserve source selection and open editors.
This removes 196 net lines from the widget and the 40-line Pierre resize adapter. A matched Chromium stress run with 4,000 displayed rows reduced the longest frame from 3.07 to 2.45 seconds and forced style/layout from 1.86 to 1.31 seconds. The remaining pause is substantial; this simplifies and improves the renderer without claiming to solve large-diff responsiveness. Startup adds no requests.
The unused public
isPagePaintexport is removed. Protocol 18 makes older vendored widgets refresh before they run against the changed API.Validation: 521 runtime tests, 133 framework/build tests, 85 Worker tests, browser build/type checks, two focused protocol checks, and focused browser checks covering native selection/copy, retained nodes/editors, comments, horizontal scrolling, wrapping, print and highlight paint in Chromium and Firefox. Independent source and visual review passed. Cross-browser coverage records why inherited highlight styles cannot yet replace the universal rules.