Repository navigation
Description
What happens
Since #4480 (ec2280f92, "guard the chrome with one CSS rule"), every Leaf page I tried crashes Chrome's renderer on load whenever the page zoom isn't 100%, or the display's device scale factor isn't 1. The tab dies about a second after load. Before it dies, the page fetches /api/state but never posts its first /api/interaction. One user saw the whole browser go down, then crash again when it restarted and restored the tab.
I expected the page to render at any zoom, as it did before #4480.
Smallest repro
- Serve any page, even one heading and one paragraph, with Leaf
345ac731f090ord0fb1f6adc32. Currentmain(fb71279dc) ships the same guard unchanged. - Open it in desktop Chrome at 110% page zoom.
- The tab crashes. At 100% zoom it renders.
Under the same conditions Leaf 7c09289d1ccd, the commit before #4480, renders fine.
What I measured
All of this ran on Linux, with Google Chrome 153.0.8010.47 (headed and --headless=new) and 155.0.8059.79 (--headless=new).
- Zoom and scale: every page zoom I tried crashes, from 0.5 to 3. So does a forced device scale factor of 1.25, 1.5 or 2 at 100% zoom. Zoom 100% at scale 1 renders.
- macOS: untested. Because scale 2 crashes on Linux, a Retina display may crash too.
- Headless shell: Chromium's headless shell (152 and 155) didn't crash at any device scale factor I tried, 0.67 to 2. A render check that draws with the headless shell, or only at 100% zoom and scale 1, can't see this crash.
- One rule: deleting the guard rule in
styles/chrome-guard.cssstops the crash..lf-chrome ::after { all: revert-layer }alone is enough to crash.- The
::before,::placeholderand element parts of the guard, each alone, don't crash.
- Which pseudo-elements: restricting that rule to one control at a time, only the floating panel's buttons crash it:
.lf-fp-leaf,.lf-fp-expand,.lf-fp-chipand.lf-fp-minimize. The reach::afteron.lf-icon-action,.lf-fp-sendand.lf-compose-dictatedoesn't. - Which longhands: within
all, setting justzoomandview-timeline-insettorevert-layeron.lf-chrome ::aftercrashes. Either one alone doesn't. - Keyword:
all: revertinstead ofall: revert-layerdoesn't crash. - Standalone: a page outside Leaf with the same guard rules, a layered
::afterreach, form fields, a modal dialog and anchor names didn't crash. So I don't have a Chromium-only reproducer yet. The renderer stops on a trap, as a failed CHECK does, during a main-frame update.
Fix candidates
- Restate zoom after the reset in the guard. This stops the crash at 110% in Chrome 153 and 155:
Adding
.lf-chrome, .lf-chrome *, .lf-chrome ::before, .lf-chrome ::after, .lf-chrome ::placeholder { all: revert-layer; zoom: normal; }
view-timeline-inset: initialinstead also works. Addingzoom: unsetstill crashes. - As a stopgap from the page side, a page rule heavier than the guard works:
:root .lf-chrome ::before, :root .lf-chrome ::after { zoom: normal; }. With it, the page renders in Chrome 153 and 155 at zooms 0.9, 1.1 and 1.25. - Users can reset the server host's page zoom to 100% with Ctrl+0. That stops every page on the host crashing.
A render check that also draws at a zoom other than 100% in full Chrome would have caught this.
Seen on leaf 345ac73.
This was written by Claude Code on behalf of max-sixty
Activity
leaf-agent commentedon Oct 28, 2026
Triage is blocked on running full Chrome in this CI sandbox; I haven't opened a fix PR or verified either proposed reset here.
I attempted a served-page regression with installed Google Chrome 156.0.8078.73 through Playwright's
chromechannel and--force-device-scale-factor=1.25. Chrome aborts before it opens the page:That is a browser-startup failure, not a reproduction of the reported renderer crash. The existing
browserfixture launches Playwright's headless shell (_browserfixture), so its passing results would not settle the full-Chrome failure described here.The next verification needs a full-Chrome run outside this sandbox: a served-page startup and panel interaction at non-unit display scale, failing with the current guard and passing with the selected correction. Keeping that regression in CI would cover the rendering path the current shell checks miss. This remains unresolved; the immediate blocker is the verification environment, rather than missing reproduction details from the reporter.
Guard the chrome's elements only, dropping its pseudo-element parts a…