Skip to content

base red: gallery health lets rows above a bottom-opened line rise (#32644's design); row grammar opens before first paint - #33784

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
base-red-gallery-misc-shifts
Nov 3, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
base-red-gallery-misc-shifts

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Base red: gallery health on feat-cmux-next. This fixes three of its layout-shift states.

What was red, and why

agent-pane.agent-pair-note#held-list (0.0059 vs baseline 0) and agent-pane.composer#queued-from-agent-open (0.031 to 0.034 vs 0). In both jobs that render them, the rows above (user-1, assistant-2) move up 3 to 7 px when a disclosure opens at the bottom of the transcript.

agent-pane.transcript-row-grammar#open (load 0.3295 vs 0.06552; red in one job, 0 in the other, and 0 on one retry of the other). The variant clicks its toggles in a layout effect. The rows subscribe to the disclosure store (useSyncExternalStore) only in a passive effect, which can run after the first paint. Some runs painted the rows closed and then open a frame later. The CLS sources are the three rows under the first one, plus the send line's actions and chevron. Present since the variant landed (#28291).

Fix

  • shift.ts: a tracked box that comes before the step's target and moves straight up is exempt, but only while the target's transcript row carries data-bottom-fold. App.tsx sets that marker for exactly the length of such a fold. Anywhere else a rising row still counts, and so does a drop or a sideways move. This mirrors the existing push-down exemption. There is a unit test in test/gallery-shift.test.ts.
  • RowGrammar.gallery.tsx: after the clicks, the layout effect remounts the rows under a new key. They read the store before the browser paints, so the first frame is the open one.

No baseline file changes.

Not fixed here (both flaky, red in one of two jobs)

  • pages.home-channels#emoji-return (type "rocket", 0.083 vs 0.057): typing filters the grid one letter at a time. How many of those in-between grids get painted depends on frame timing. The variable part is one CLS entry (0.0096 in one job, 0.0351 in the other).
  • agent-pane.composer-context#repo-worktrees-search (type "unread", 0.0070 vs 0.00447): the list moves 7.5 px in both jobs. In one job it also changes width by 11.8 px (and its check mark moves by 11.7 px), which matches a scrollbar appearing in an in-between filter result on the Linux runner's classic scrollbars.

I left both for a follow-up rather than gaming the play.

Risk

Low. Gallery tooling and one gallery fixture only; no shipped code. The exemption applies only during a bottom fold the app itself declares.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the red gallery health states on feat-cmux-next. The box tracker now accepts the rise #32644 designs into rows above a line opened at the transcript's very bottom, and the row-grammar fixture paints its open state on the first frame. Gallery tooling and one fixture only; no shipped code.

Bug Fixes

  • A box before the target that moves straight up is exempt only while the target's row carries data-bottom-fold (set by App.tsx for the length of that fold); drops and sideways moves still count, covered by a new unit test. Fixes agent-pair-note#held-list and composer#queued-from-agent-open.
  • RowGrammar.gallery.tsx remounts its rows under a new key from the layout effect, so the disclosure store is read before the browser paints and the closed-then-open first frame is gone.

Two other states (pages.home-channels#emoji-return and agent-pane.composer-context#repo-worktrees-search) remain flaky and are left for a follow-up rather than patched around.

Written for commit d80720d. Summary will update on new commits.

View guided diff Turn on auto-fix

…ay rise; row grammar opens before its first paint

#32644 made a line opened at the very bottom push the text above it up (Leo,
2026-11-02: "YOU EXPAND UP WHILE YOUR SCCROLL IS AT THE VERY BOTTOM AKA YOU
... PUSH THE TEXT UP VISUALLY INSTEAD OF EXPANDING DOWN LIKE USUAL / JUST THAT
CASE"). The box tracker still scored that designed rise as layout shift, so
agent-pair-note#held-list and composer#queued-from-agent-open went red at
0.0059 and ~0.03 against 0. A box before the target that moves straight up is
now exempt while the target's row carries data-bottom-fold (the transcript's
own marker for that fold), mirroring the push-down exemption; anywhere else a
rising row still counts.

transcript-row-grammar#open clicked its toggles in a layout effect, but the
rows subscribe to the disclosure store in a passive effect that may run after
the first paint: some runs painted the rows closed, then open (CLS 0.3295).
Remounting the rows from that layout effect reads the store before paint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review d80720d: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr33784 -f ref=base-red-gallery-misc-shifts -f platform=macos -f backend_mode=local

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 3, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)/
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo
teamleaderleo merged commit b146190 into feat-cmux-next Nov 3, 2026
171 of 186 checks passed
@teamleaderleo
teamleaderleo deleted the base-red-gallery-misc-shifts branch November 3, 2026 12:50
teamleaderleo added a commit that referenced this pull request Nov 4, 2026
… clicked step (carries #32820) (#33987)

* test(agent pane fold): open the "Received N messages" row before its lines

messages" row, so the fanout-infra line the fold test waits for is not
drawn until that row opens. The test and the gallery entry's plays now
open it first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-2f629b93d5a20c58e6f8

* gallery: B/C/D disclosure variants keep the push-up from opening the waiting group at the end

With the "Received 3 messages" row opened first, the plays render
again (they timed out on base). Opening the waiting group at the
transcript's end then pushes the rows above up 66px (the pinned end,
Leo 2026-11-02), measured 0.0777 in gallery health run 41563279796,
the same kind of shift a-shipped-open already carries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-2f629b93d5a20c58e6f8

* gallery: a-shipped-open carries the waiting group's push-up too

Gallery health run 41564747382 measured a-shipped-open at 0.2829: the
waiting group opening at the end (0.0777, as in B/C/D) plus the report
opening (0.2051). On base the play times out, so its row of 0.16476
predates #32720.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-2f629b93d5a20c58e6f8

* gallery: incoming-message-disclosure plays open each fold as its own clicked step

The plays opened the "Received 3 messages" row and the waiting group with
raw element clicks in one task, then waited. At the transcript's end each
opening pushes the rows above up by design (#32644), and the box-shift gate
exempts that only while the step's own target sits in the row marked
data-bottom-fold (#33784). A raw click is no step and has no target, so the
push-up landed in the following wait, scored as shift (c-line-count 0.1328,
user-1 and assistant-2 moving -21.9px). Each opening is now ctx.click, settled
before the next, and fanout-infra's report opens the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* gallery health: incoming-message-disclosure shift rows back to what the plays measure

With each opening its own clicked step, gallery health run 41665103842
measured b-received-wording, c-line-count and d-sender-only at 0 (back to
base's 0, from #32820's 0.0777) and a-shipped-open at 0.16622/0.16639
(0.1664, from #32820's 0.2829; base's 0.16476 predates #32720's received row,
whose opening now lands in the same play). The report line is waited for
before it is clicked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

* gallery health: keep base's other shift rows; only the four disclosure rows change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant