test_app_shell test_04b: the restored reading place lands on a neighbouring note under load
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend, testing-qa
Direzione di ricerca
Start with useReadingPosition in app/apps/web/src/app/drafts.ts, which restores the scroll place at mount, and with test_04b_reading_position_is_kept_per_view in test_app_shell. First measure the failure rate on main with and without a CPU limit, then find which late layout change moves the place without a DOM mutation (the issue suggests browser scroll anchoring). Done means the restored place stays on the anchored note across the view switch under load, with no test-side waiting that hides the transient state.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found while working on #271 (PR #455). test_app_shell test_04b_reading_position_is_kept_per_view fails intermittently under host load, and the failure is in the product's reading-place restore (app/apps/web/src/app/drafts.ts, useReadingPosition), not in the test's wait logic.
Symptom
At the view switch (Home → Wiki → Conversation) the first visible note is one note above the anchor:
AssertionError: 'Reading position check, note 1: …' != 'Reading position check, note 2: …'
: the same note is at the top after a view switch
The instrumented runs below passed with service workers blocked in every context (the state of #455 before its last commit). The base commit e06248c5 passed with service workers allowed, as did one run of the final #455 code. Three module runs of #455 before its last commit failed with service workers blocked, under concurrent UI runs on the host (load not measured).
What the instrumented runs show
The probes were temporary instrumentation of useReadingPosition and were removed afterwards:
- Save path is fine: the scroll to
top 600with anchorcapture-n1is saved on the next frame. - Restore at mount runs while the notes are the only content:
restore-before top 0, notes 40, anchor capture-n1, want 600, thenrestore-after top 358. - The place then reaches 600 without a further
scrollevent and without a MutationObserver callback (nomo-firedentries), so something other than a DOM mutation moves it. Browser scroll anchoring is the leading candidate, not confirmed. - Under a 0.3 CPU limit, three reads within about 2 ms returned note 2, then note 1 (scrollTop 358), then note 2 again: the position flaps between neighbouring notes while blocks above the notes render.
CPU-limit measurements (docker update --cpus 0.3 on the UI runner only)
| Run | Limit | Modules | Result | Note |
|---|---|---|---|---|
| instrumented | none | test_app_shell |
Ran 20 tests in 67.382s / OK |
save and restore probes, no failure |
| instrumented | 0.3 CPU | test_app_shell |
Ran 20 tests in 215.248s / OK |
restore-after top 358, later 600 |
| instrumented | 0.3 CPU | test_app_shell + test_motion test_01 ×3 |
Ran 23 tests in 98.901s / OK |
flapping reads 2 → 1 → 2 at the switch |
| instrumented | none | test_app_shell |
Ran 20 tests in 81.455s / OK |
restore-before top 0, restore-after top 358, read at switch = note 2 |
Failing runs without a CPU limit (host shared with other UI runs):
- 24 changed modules:
Ran 274 tests in 871.572s/FAILED (failures=2), test_04b and an unrelated test_07b. test_app_shell test_project_surface:Ran 39 tests in 111.446s/FAILED (failures=1), test_04b only.
Base commit e06248c5, same two modules: Ran 39 tests in 96.693s / OK.
Tried, not effective
Both were run in the failing module and both kept failing: overflow-anchor: none on the pane while the place settles, and a ResizeObserver on the pane's column. Neither is in the code.
Not established
Whether the test's service-worker blocking (#455 blocks workers in routing tests only; test_04b now runs with workers allowed, as on main) changes page-load timing enough to expose the transient restore. The evidence so far is not enough to decide.
Suggested next steps
- Repeat
test_app_shellseveral times, with a CPU limit and without, to measure the failure rate on currentmain. - Find which layout change moves the place without a DOM mutation (browser scroll anchoring, images, late styles).
- Make the final place independent of those changes, then remove any test-side waiting that would hide the transient state.
Refs #271, PR #455.
- Lingua principale
- TypeScript
- Stelle
- 3
- Fork
- 0
- Merge medio
- 18h 3m
- PR unite (30g)
- 254
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ColdPhase/flux
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Live platform rows: Firefox Join fails at ICE on native Linux Docker (child of #63 AC-3)Forse già presa @Zamojski5 l’ha presa 1 giorno fa. Aperta
ColdPhase/flux#496 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ColdPhase/flux
Issue simili
-
documentation good first issue hacktoberfest help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libredb/libredb-studio#1756 ·
I maintainer di solito rispondono entro 1 giorno
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
lingdojo/kana-dojo#32365 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
friction
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kentcdodds/kody#3706 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
copperheadhq/copperhead#378 ·
I maintainer di solito rispondono entro 1 giorno