No e2e scenario where layout shift is actually visible

Open
#726 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, vite

Research direction

Start with tests/e2e/test_layout_first_paint.py to understand the existing cold-page CLS measurement and its test setup, then run that scenario as the baseline. Add a separate visible-page scenario using a CSS change, delayed font response, or second client render, recording FCP, CLS, and body replacements. Done means the scenario fails on a deliberately noisy page, passes on the current page, and its measured figures and testing machine are published in docs/deployment/performance.md.

Written by the indexing model from the issue text.

Description

Problem

tests/e2e/test_layout_first_paint.py measures a cold page and records CLS 0.000. It cannot catch
a second client reveal, a late font or a CSS edit, because none of them happen in that scenario.
The numbers published after #713 and #715 therefore cover one case only.

Issue #718 needs a test where the second reveal is visible, and the font issue needs a test where
the web font arrives after first paint.

Change to make

Add a measured scenario that applies a CSS change or a second client render while the page is
visible, and records FCP, CLS and body replacements. Slow the client or delay the font response if
needed to make the shift observable. Publish the new figures with the machine in
docs/deployment/performance.md.

Out of scope

The existing cold page measurement stays as it is. The boot gate, HMR body replacement and ISR
cache have their own issues.

Checks

The new test fails on a deliberately noisy page that forces a body replacement, and passes on the
current one. The measured numbers appear in the performance doc with the machine they were taken
on.

Dominant language
Python
Stars
11
Forks
6
Avg merge
2h 14m
Merged PRs (30d)
265

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NexyPy/nexy

All issues in NexyPy/nexy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.