Repository navigation
Stand Threads over the page at every width - #1043
Conversation
Threads no longer takes a strip from the page. Above 840px the body used to yield the panel a transparent right border, so opening Threads re-centred and narrowed the column, re-wrapped prose, withdrew margin residents and could flip a bounded workspace to flow. The panel now stands over the right of the window at every width and the page is laid out for one width whatever is open. Behaviour that moved: - The column, its wrapping, the document height and the scroll position are unchanged when Threads opens or closes (new test_threads_cover_the_page_and_leave_its_column_where_it_was, at 900px and 1400px). - The panel is modal (covering boundary: scrim, inert page, scroll lock) only where it leaves less than a usable page (320px) beside it, which a phone window gives it by default and a user can draw it to. That replaces the 840px COVERING media query: `panelCovers` in chrome-layout.js asks the panel's standing width against the window. Elsewhere the page beside the panel stays live, as it did in the old beside posture. - The live root keeps a stable scrollbar gutter, so taking the covering scroll lock no longer widens the window by the scrollbar (which reflowed the page under any covering surface and would have flipped `panelCovers` back and forth). - The drawn edge is capped at the window rather than half of it, since the panel takes nothing from the page. - At desktop widths under roughly 1700px the open panel stands over the right of the column and the margin rail. While it stands over a rail row the banner offers the Page Map, as it does where the rail is not drawn. - Pressing a card's quote closes the panel when the passage would land mostly under it (`panelHides`), and keeps it open otherwise. - The response bar withdraws when the open panel leaves it no room, at any width, and hands focus to the Threads list; its right bound is the panel's own left edge. - The Asks tray is unchanged: it still takes a left strip beside the page, and it is now the only surface that does, so the scroll-anchoring border, the pre-boot restore attribute (now data-lf-restore-asks, written only for that tray) and the shell-reading margin postures answer to it alone. TODO #28 is done and removed; notes/layout-model.md records what now holds and the margin cost. Removed: COVERING and panelWouldCover, the body's right border strip and its pre-boot data-lf-restore-panel twin, the pre-boot thread-panel width, the drawn edge's media query (replaced by an `over` reading), and the layer test that held 840 equal to twice THREAD_PANEL_W. Tests: assertions that held the strip now hold the Asks tray's strip (scroll anchoring, sidebar/sidenote postures, wide-widget room, rail hand-off to the Page Map, margin landing in the closing task); covering tests read at 400-430px where the panel leaves no usable page; tests that press page or margin controls on the right with Threads open read at 1920px, where the panel stands clear of them; new cases hold the 430px phone covering, the stable gutter, the rail hand-off with Threads open, and quote travel at 1000px and 1920px. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
scrollbar-gutter: stable on the root reddens the gate: eight cases fail at this head, three of them in the everyday gate's own test_chrome_contracts.py, and all eight go green again with that one declaration removed and nothing else changed.
The suite's browser is Playwright's headless Chromium, which runs with --hide-scrollbars. There overflow-y: scroll reserves nothing, so the root's content box has always been the full window; scrollbar-gutter: stable reserves the classic 15px anyway. Every right-anchored fixed box and the body shell move 15px left, which is exactly the shape of each failure — the panel's right edge lands at 1385 of a 1400px window, body.getBoundingClientRect().right at 1185 of 1200, a drawn edge 15px wider than the hand left it.
The declaration is doing real work — without it the covering scroll lock changes documentElement.clientWidth, panelCovers flips, and the posture flaps, as the comment in chrome-layout.js says. So this is about where it goes, not whether. Scoping it to the covering rule beside the lock it protects (html[data-lf-live]:has(body[data-lf-covering-surface])) would leave the unlocked root as it is; whether that holds the width steady across the lock in a browser with real scrollbars is the thing to check, and it isn't a check this suite can make (see the inline note on the new assertion).
Failing cases and the isolation
CI test (everyday gate, tests/test_chrome_contracts.py):
test_threads_cover_the_page_and_leave_its_column_where_it_was[900]—885 == 900 ± 1test_threads_cover_the_page_and_leave_its_column_where_it_was[1400]—1385 == 1400 ± 1test_notices_stay_at_the_visible_pages_right_edge—1167 == 1182 ± 1
Also failing locally, in nightly files:
tests/test_render_controls.py::test_an_auxiliary_surface_lands_one_responsive_layout[sidebar]and[sidenote]—1125 == 1440 - 300tests/test_render_controls.py::test_page_and_panel_scroll_in_separate_regions—bodyRight 1185, window 1200tests/test_render_gate.py::test_the_user_draws_an_edge_to_the_width_they_want[comments]andtest_a_window_with_no_room_for_a_chosen_width_does_not_un_choose_it[comments]— the drag lands 595 where 580 was asked fortests/test_render_pages.py::test_a_left_sidebar_uses_the_margin_until_the_page_needs_it_backandtest_opposite_margin_residents_wait_for_the_room_they_need—sideways == -15
Isolation: with scrollbar-gutter: stable deleted from theme.css and the rest of the branch untouched, all eleven selected cases pass (uv run pytest tests/test_chrome_contracts.py tests/test_render_controls.py tests/test_render_gate.py tests/test_render_pages.py -n0 -k "threads_cover_the_page or auxiliary_surface_lands or page_and_panel_scroll or draws_an_edge or no_room_for_a_chosen_width or left_sidebar_uses_the_margin or opposite_margin_residents" → 11 passed).
Mechanism, reduced to a bare page in the same browser: at a 740px viewport with html { height: 100%; overflow-y: scroll }, clientWidth is 740 and a position: fixed; right: 0 box ends at 740; setting scrollbar-gutter: stable takes both to 725.
The stable scrollbar gutter moved every right-anchored fixed box and the body 15px left in headless Chromium, so it is gone and the unlocked root is unchanged. `panelCovers` now asks `innerWidth`, which counts the root's scrollbar, instead of the root's client width: the covering lock hides a classic scrollbar, so a client-width reading answered differently either side of its own lock. A new case runs with a classic scrollbar shown (730px covers, 745px does not); a client-width reading fails the 745px case. The "under the open panel" rule is one reading now, `panelStandsOver` in panel-elements.js: the panel hides a page box when it stands over more than half its width. Quote travel (`panelHides`) and exposure both use it, so an agent message whose right edge reaches under the panel is still read, where before any overlap withdrew the whole message. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The everyday gate is red at this head and the branch caused it: tests/test_interact_layer.py::test_the_resources_a_fixture_owns_are_taken_from_that_fixture fails with ['test_render_controls.py:4017 launch — browser, iphone owns it']. That is the _playwright.chromium.launch(...) in the new covering test — the suite reads launch calls statically and admits them only from conftest.py. It reproduces on the merge ref in three seconds, so uv run pytest tests/test_interact_layer.py -n0 -k resources_a_fixture_owns confirms a fix without a browser run.
The other finding is the exposure rule in read.js, and it is the reason to look at the new shared predicate rather than only at the test that trips the gate.
Sharing panelStandsOver between travel and exposure merges two questions whose correct thresholds differ. Travel asks whether a destination would land mostly out of sight, so a majority reading is right there. Exposure asks whether the user has actually seen the words, and read is a durable log event — a majority reading there admits text the page cannot attest to. Measured on this head, with an agent comment seated in a widget's x-conversation box and Threads open:
| window | body | under the panel | panelStandsOver |
outcome |
|---|---|---|---|---|
| 1400px | 712px wide, 297–1009 | 29px (4%) | false | read event written |
| 900px | 712px wide, 47–759 | 279px (39%) | false | read event written |
At 900px the last third of every line of that message is behind an opaque panel, and the page records that the user read it. The seat does not re-wrap as the window narrows — it keeps its 712px and slides further under the panel — so the hidden fraction grows with narrowing right up to the 50% cut-off. Neither reading is reachable on main: above 840px the panel took a strip and the seat re-flowed clear of it, and below 840px the old panelWouldCover rule refused the read outright.
read.js already holds the standard this contradicts, a few lines below: shown.left > box.left + EPSILON || shown.right < box.right - EPSILON refuses a message whose horizontal extent is not wholly shown. The panel is an obstruction of exactly that kind, and the new comment exempts it on the grounds that it is "not one of the clips the full-width rule below asks about". Two named readings over the one edge — the majority test for travel, any-overlap for exposure — would give each question its own answer without a threshold threaded through a shared predicate.
Nothing in the suite holds either rule: no test exercises exposure with the panel open over a page-side seat, which is why the rule has moved twice in this PR without a failure.
I can push both fixes as one commit if you'd like — a conftest.py fixture for the scrollbar-shown browser, and the exposure reading split from the travel one.
Exposure now treats the open thread panel as an occluder of the part it stands over, so the full-width rule withholds a receipt from a message any part of which is under it. The majority rule stays for quote travel only: `panelEdgeOver` in panel-elements.js is the one reading of where the panel's edge stands over a node, and each caller decides how much counts as hidden. A new read-state case holds it with Threads open over a diff's thread outlet: no receipt at 900px until the panel closes, a receipt at 1920px with the panel open; the majority rule fails the 900px case. The scrollbar-shown browser is a conftest fixture now (`scrollbar_browser`, wired like `iphone`) rather than a launch inside the test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…p through one entry (#1085) The open thread panel stands over the right of the page (#1043), but nothing in the page's one reading of what is on screen knew that. Two readers each carried their own copy of the panel's edge (`panelEdgeOver` in exposure, `panelHides` for the quote press), and travel knew nothing about it at all. So `a` onto an Ask the panel mostly covered stood the user on it where it was, under the panel. For an Ask the panel only partly covered, the Ask's key badges were placed on option controls under the panel and painted over the panel's own threads. ## Mechanism - **The panel declares itself an occluder.** `declareOccluder` in `geometry.js` works the way `declareCoverRoom` does for sticky covers. `shownRect`'s clip walk (and `clippedRect`/`clippedContents`) removes what a declared occluder stands over from any box stacked beneath it and not inside it. What remains is the largest rectangle the occluder leaves, so every pixel of the answer is visible. "Stacked beneath" is read from the outermost positioned ancestor's z-index, and the top layer sits above everything, so a door's menu or the key-badge layer is not hidden by the panel. `panelEdgeOver` and read.js's extra line are gone. Exposure, key badges, the design-mode legend and aim, the response bar's region bounds, and travel all read the same answer. - **One owner clears what hides a destination.** `clearFor(where)` on the auxiliary-surface owner closes the selected surface when it covers the page, or when it stands over most of the destination (`hides` in `geometry.js`, the more-than-half rule `panelHides` used). It replaces `panelHides` in the thread card and the Ask view's covering-tray check. The Ask view's badge hiding reads the covering surface instead of `trayIsOpen("asks") && trayCovers()`. - **One trip entry.** `trip(where, { landing, url, keep, intent, there })` in `anchor-travel.js` clears (through the caller's retained intent, since clearing can move focus out of the surface), then either stays or departs and returns whether the caller moves the page. `scrollToThread`, the Ask view and `navigateToDatum` all go through it, and `depart`/`stay` are no longer exported. After clearing, travel reads past whatever surface still stands: what that surface covers, no scroll can show. A trip taken from inside the panel (the panel's `t` walk, a landing in a conversation) passes `keep` and never clears the panel. - **"Journey", not "walk".** The history-entry chain of trips was called a walk, which the glossary uses for same-kind ordered movement. It is now a journey (`lfJourney` in history state), and the glossary gains **Trip** and **Journey**. - `stepScroller` uses shadow.js `under` in place of `contains`, which stops at shadow roots. ## Behavior that moved - `a` onto an Ask the open panel mostly covers now closes the panel. Before, the ring landed under the panel. (New test at 820px.) - An Ask the panel only partly covers still stays beside the panel. Its binding badges now label only the controls the user can see, where before badges for controls under the panel were painted over the panel's threads. (New test at 1280px. Both cases fail on the base.) - Datum travel (`navigateToDatum`) no longer departs when its destination is already readable: no history entry, no `#source` fragment, no re-centring. Before, it pushed unconditionally. `test_call_diff_projects_stable_commentable_rows` now asserts that. - Exposure is unchanged: a message any part of which is under the open panel is still not read. The rule now comes from `shownRect`. - Design-mode legend boxes end at the panel's edge rather than running over it. `LEGEND_TRUE` measures against the visible part. - A covering Asks tray is now closed at the trip, after the Ask's reveal and before focus lands. Before, it was closed before the reveal. ## Deferred The Asks tray still decides whether it covers the page by the `width <= 600px` media query (`trays.js`, mirrored in `chrome.css`), where the panel asks how much page its drawn width leaves. That is a CSS-owned layout posture shared with the stylesheet. Moving it to a measured reading is a layout change separate from travel. `clearFor` reads it through `covers()`, so that change will not touch travel. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Threads no longer takes a strip from the page. Above 840px the body used
to yield the panel a transparent right border, so opening Threads
re-centred and narrowed the column, re-wrapped prose, withdrew margin
residents and could flip a bounded workspace to flow. The panel now
stands over the right of the window at every width and the page is laid
out for one width whatever is open.
Behaviour that moved:
are unchanged when Threads opens or closes (new
test_threads_cover_the_page_and_leave_its_column_where_it_was, at
900px and 1400px).
only where it leaves less than a usable page (320px) beside it, which
a phone window gives it by default and a user can draw it to. That
replaces the 840px COVERING media query:
panelCoversinchrome-layout.js asks the panel's standing width against
innerWidth.Elsewhere the page beside the panel stays live, as it did in the old
beside posture.
panelCoversreadsinnerWidth, which counts the root's scrollbar,rather than the root's client width: the covering lock hides a classic
scrollbar, so a client-width reading gave a different answer either
side of its own lock (at 745px it covered and held the lock that made
its reading wrong). The unlocked root is unchanged.
the panel takes nothing from the page.
right of the column and the margin rail. While it stands over a rail
row the banner offers the Page Map, as it does where the rail is not
drawn.
panelEdgeOver(panel-elements.js) is the one reading of where theopen panel's edge stands over a page node, and each caller decides how
much of the node under it counts as hidden:
mostly (more than half) under it (
panelHides), and keeps it openotherwise;
so an agent message any part of which is under the open panel earns
no read receipt until the panel closes or a wider window clears it.
any width, and hands focus to the Threads list; its right bound is the
panel's own left edge.
page, and it is now the only surface that does, so the scroll-anchoring
border, the pre-boot restore attribute (now data-lf-restore-asks,
written only for that tray) and the shell-reading margin postures
answer to it alone.
TODO #28 is done and removed; notes/layout-model.md records what now
holds and the margin cost.
Removed: COVERING and panelWouldCover, the body's right border strip and
its pre-boot data-lf-restore-panel twin, the pre-boot thread-panel width,
the drawn edge's media query (replaced by an
overreading), and thelayer test that held 840 equal to twice THREAD_PANEL_W.
Tests: assertions that held the strip now hold the Asks tray's strip
(scroll anchoring, sidebar/sidenote postures, wide-widget room, rail
hand-off to the Page Map, margin landing in the closing task); covering
tests read at 400-430px where the panel leaves no usable page; tests
that press page or margin controls on the right with Threads open read
at 1920px, where the panel stands clear of them; new cases hold the
430px phone covering, the rail hand-off with Threads open, quote travel
at 1000px and 1920px, and the covering answer across its own lock with a
classic scrollbar shown (730px covers, 745px does not; a client-width
reading fails the 745px case), and exposure with Threads open over a
diff's thread outlet (no receipt at 900px, a receipt at 1920px; the
majority rule fails the 900px case).
🤖 Generated with Claude Code