Repository navigation
Set a root workspace's copy at the page's width in either posture - #659
Merged
Merged
Conversation
Copy mode's main box for a root workspace was stated only for the bounded posture, so a copy taken while the root fit answered flow was set in the prose column with the margin strip subtracted. Entering copy mode resizes the body, which is what makes the fit answer, so the copy width depended on which of the two landed first.
This was referenced Sep 13, 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.
The scheduled
cinightly run 34719169306 ond2c2a29came back 2 failed, 2559 passed.test_revision_changes_follow_authored_text_into_declared_shadow_treeswas already repaired by #648, which merged 19 minutes after the run started. This is the other one.Cause
tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidenceread the two desktop captures at 1042 px where it wants 1278. A copy of a root workspace is set at the page's width, and that box is stated inhtml.lf-copy body > main:has(...)— but only its height and block padding were. The width,max-width, margin and offset came from the screen rule above it, which is qualified on[data-lf-reading-posture="bounded"]. So a copy taken while the root fit answeredflowfell back tomain's ordinary box: the prose column, less whatever the right strip claims. With the 240 px rail CI measured on that page, that column leaves the evidence host 1044 px, andlf-shot'smin(100%, var(--lf-vr-capture-width))clamps a 1280 px capture to 1042.Which posture the copy is set in was a race. Entering copy mode reveals every case and drops the workspace to
height: auto, which resizes the body, which is exactly what makes the root fit observer re-answer on the next frame. The test read the widths in the window before that frame landed. On this sandbox the read wins and the page still reportsbounded; under the nightly's load it does not.Fix
State the whole copy box on the root context, where it already belonged: a copy holds no window, so its width follows from the element being the root workspace and not from the posture the live page happened to be drawn in. The copy is now the same page-width workspace whichever posture the fit lands on, and no longer a reading of a race.
The test now also reads the widths again once the fit has answered, so the reading it pins is the settled one rather than one the page passes through.
Verification
Docker is unavailable in this sandbox, so
scripts/linux-suite.shcould not supply CI's fonts. Instead the rail claim CI measured was stood up directly on the page, which reproduces the failing number to within the rail's own width:--railonmain[388, 388, 388, 388, 1221, 1221]after settle[388, 388, 388, 388, 1278, 1278]240px(CI's reading)[388, 388, 388, 388, 1040, 1040][388, 388, 388, 388, 1278, 1278]Reverting only the CSS fails the test's new settled assertion, so the regression cannot come back silently.
Suites run on this branch:
tests/test_render_projection.py,tests/test_render_gate.py,tests/test_render_export.py,tests/test_render_widgets.py,tests/test_render_options.py,tests/test_render_conversations.py,tests/test_render_drafts.py,tests/test_render_visual_review_journey.pyandtests/test_site.pyunder--run-nightly, plus the everyday suite and pre-commit on the changed files.Failures this sandbox cannot run, checked against unmodified
mainSeven failures across those runs are the sandbox rather than the change; each was reproduced at
mainin the same directory, or is mechanically out of the diff's reach.test_staged_writes_honor_umask_without_copying_a_replaced_symlink_mode,test_the_stated_host_wildcard_serves_both_families,test_app_server_observer_connects_over_a_private_unix_socket,test_codex_launch_owns_one_private_app_server— read-only/tmp, the sandbox umask, and no IPv6, which is the set Name the everyday-suite cases an agent sandbox cannot run #628 is naming.test_render_export.py::test_the_example_preview_command_exports_a_file_that_opens_on_its_ownandtest_exporting_an_example_leaves_the_live_preview_untouched— "export needs a browser, and none launched"; the sandbox cannot start the installed Chrome these two drive.test_render_conversations.py::test_resolve_acknowledges_the_press_and_recovers_a_refusalfailed twice under-n2, on a different parameter and with a different symptom each time, and passed on the third run.ASK_PAGEhas no workspace and never enters copy mode, so neither selector in the diff can reach it. The same selection passed four times atmain, once in this same directory.