Repository navigation
Unify comment box framing and restore muted placeholder text - #2384
Conversation
The page card exposed its ring padding as a second white frame, while the anchored field used separate border and shadow focus paint. Both now use the same frame, outline and floating elevation, with a transparent page-card backing. Let the text field own placeholder ink instead of overriding its slotted hint with message typography. Cover empty page and anchored states in the visual catalog and retain the blue focus and forced-color routes.
test_phone_diff_headers_keep_distinguishing_parent_folder_readable failed at teardown on loaded CI runners: the second lf-diff file header "moved without input by (0, 49)px" after the tap that opened the first file. Opening a closed file loads its evidence in a promise (the Markdown grammar and Shiki rendering) that lf-diff declares through `present`, so the page's presentation proof stays pending until the lines land. The shift watch ended a gesture's ownership on `lfRenderingSettled` alone, which by its contract (runtime/rendering.js) cannot see promise-held work. On a slow machine the loop settled before the file's lines arrived, so their growth read as passive. The product behaved correctly: the files below moved because the user opened the one above them. The watch now ends a gesture's rendering once the page has also presented its current publication (`lfReadiness(null, "presented")`), widget preparations included, which is the declared completion `pageReadiness` already states. Deferred arrivals stay outside that credit, so a late arrival still fails as passive. New test: test_an_input_owns_a_widget_preparation_it_began_until_presented holds the Markdown grammar with page.route, so the loop settles while the preparation is pending, and checks that the press owns the growth and that a passive move after presentation still fails. With the old reading it fails with the same 49 px report the CI runs showed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The watcher change and its regression test are identical to #2391. Once the issue below is addressed, one of these PRs can carry that repair and the other can be closed as a duplicate of this part.
…readiness The previous commit kept a gesture's shift credit open until the page's `presented` readiness stage, so while any widget preparation was pending the gesture owned every movement on the page. Review showed the cost: with the diff's Markdown grammar held, moving an unrelated control 40 px went unreported. The runtime now publishes each widget preparation's lifecycle on its validation seam (`lfObserveWidgetPreparations`, owned by `attachWidgetPresentation` in semantic-state.js): "begin" when a widget declares it and "settle" in the task that settles its completion. The shift watch records a preparation declared while an input's rendering (or an earlier landing's) runs. When that preparation settles, the watch opens a rendering for the same input that runs until the loop settles again, as the input's own rendering does. A preparation's wait owns nothing, and the gesture's own rendering again ends on `lfRenderingSettled`. test_an_input_owns_the_landing_of_a_widget_preparation_it_began now holds the grammar and checks three things. A control moved while the preparation waits is reported (the reviewer's case, which the page-wide version missed). The landing's push on the files and control after it is the press's. A move after the landing is reported. With landings uncredited it fails at the landing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Review of 3106d41 found the credit still too broad. A preparation took as its owner whichever input's rendering happened to be running, so a passive timer that opened a diff file during an unrelated button's counted work gave that file's landing to the button. Its 49 px push on a later control then went unreported. The runtime's preparation identity now names the declaring widget's element (`owner`). Every input rendering the shift watch opens records the node it was aimed at: the pointer or key event's composed target, or the typing field. A preparation belongs to an input only if that target lies inside the declaring widget in the rendered tree and the input's rendering, or a landing it owns, is still running. A preparation started by a timer, by news, or by input aimed at another widget lands passive. New test: test_a_preparation_no_input_aimed_at_lands_passive opens a diff file from a held response the page requested before an unrelated press, while the press's counted work runs. The landing must be reported. With the overlap-only watch from 3106d41 it is not. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Trace native disclosure activation through its queued toggle, retire that source at dispatch even without a page listener, and preserve valid synthetic activation when a later click is canceled. The watcher credits preparation completion only to its actual input callback, so pending loads never mask independent movement in the same widget.
leaf-agent
left a comment
There was a problem hiding this comment.
The new toggle attribution still misses two user-initiated paths. Both reproduced in Chromium with this input sensor: their toggle work has no input source, so a resulting layout change can be reported as passive.
leaf-agent
left a comment
There was a problem hiding this comment.
The test check failed on two reproducible assertions. The new input_work_page helper closes a context lent by the browser fixture; test_the_resources_a_fixture_owns_are_taken_from_that_fixture rejects that close. The inline suggestion leaves teardown with the fixture while preserving this helper's error assertion.
test_an_expanded_diff_file_can_retry_its_failed_chunk_in_place also fails after expect_request observes a retry but before its route handler appends to attempts and pending. I reproduced the same ordering at the test's next retry assertion locally. That test came from the merged main branch; its route-list assertions need to wait for the route handler, as render_harness.holding does.
CI failed: fixture-owned context closed in the new test helper; retry test also reads route state before delivery.
The response controls now paint a solid outline when focused after #2384 unified their frame with the comment field. Two reaction browser assertions still required the former shadow, so they failed in [main CI run 38159211604](https://github.com/max-sixty/leaf/actions/runs/38159211604) even though the focused controls drew the current ring. This updates those assertions to check the visible outline and its accent color in both light and dark schemes. Verification: the four parametrized cases in `test_tab_extends_the_comment_with_individual_emoji_buttons` and `test_a_focused_response_choice_wears_the_layer_s_band` failed before this change and pass after it (`uv run pytest -q` with those two test selections). The PR claims those two failures; the run contains other independent failures. --------- Co-authored-by: leaf-agent <[email protected]>
…#7504) #7449 gave every key hint the one keycap face, which the maintainer chose over sparing a text box's keys. As a result, the floating response bar's placeholder key no longer inherits the placeholder's quiet ink. `test_the_floating_response_bar_has_one_compact_face` still asserted that the placeholder and its key share one colour, so it has failed on every push to `main` since #7449 with `assert 2 == 1`. This PR changes only the test, and nothing on screen changes. The test now checks the face the maintainer chose: - the placeholder keeps a text field's quiet placeholder ink, so an empty hint doesn't read as prose. This is what #2384 added the assertion to protect. - its key wears the keycap ink of every other key badge. At rest, both inks are compared with the floating panel's own field, rendered beside the bar: its empty placeholder and the key badge of the press its end offers. After a click into the field the panel's press leaves, so the entered hint is checked against its own resting face. The test injects nothing into the page. The old assertion fails on `main`; the revised test passes, run locally with `uv run pytest tests/browser/test_render_anchors.py::test_the_floating_response_bar_has_one_compact_face -n0`. Closes #7498 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
The page comment card added a padded white rim around its field, while the anchored comment used separate border and focus styling. Both now share the frame, blue focus ring, and compact elevation. Removing the placeholder from message typography restores its muted gray in light and dark themes. The visual comparison catalogue includes explicit resting comment states alongside focused ones.
CI exposed gaps in the layout watcher’s attribution of delayed widget preparation. This change strengthens the shared input-work sensor so native disclosure delivery, scripted changes, inline handlers, and reused events retain the exact dispatch source. The watcher credits a preparation’s landing only when its declaration belongs to an observed input. Unrelated movement during the wait and independently begun preparations remain detectable, including another load in the same disclosure. Deterministic controls reproduce those missed cases against the prior watcher.
Rendering readiness exposes settled updates and settled preparations as one structured reading: full readiness composes both, while the watcher selects update settlement for each credited landing. All consumers use that reading. Validation includes 343 runtime tests, focused browser checks for causal preparation landings and input lifetime, the words watcher and original phone route, and reviewed macOS delivery captures. Keyboard focus, narrow touch layout, light/dark hints, and the shared frames with dictation controls pass their browser checks.