ui-react: three rail pointer files resize the shared outer window and never give it back

Aperta Adatta ai principianti
#3,938 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing

Direzione di ricerca

Leggi i tre file pointer indicati e confronta la loro configurazione di teardown con quella di brand-placements.layout.tsx, activity-report.layout.tsx, desktop-navigation.pointer.tsx e destination-press.pointer.tsx. Conserva ogni valore restituito da formViewport e ripristina la finestra esterna in afterEach o afterAll secondo la convenzione -100/-120 indicata. Abbina ogni chiamata a un ripristino usando git grep -n "formViewport(" packages/ui-react/tests/browser, poi esegui ogni file indicato con node scripts/visual.mjs --filter=<file>; il lavoro è completato quando tutti e tre passano e ripristinano la finestra anche in caso di errore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent-ready area: ui-react priority: p2 type: test

Context

commands.formViewport(width, height) resizes the outer browser window. That window is shared with every later file in the same Vitest project. Each layout and pointer file that calls it is expected to give the size back with formViewport(previous.width - 100, previous.height - 120); brand-placements.layout.tsx and activity-report.layout.tsx already do this. If a file never gives it back, the next file starts at that file's size, which changes the iframe's scale.

Three rail pointer files call it and never restore it:

  • packages/ui-react/tests/browser/phone-navigation.pointer.tsx:131
  • packages/ui-react/tests/browser/session-drafts.pointer.tsx:203
  • packages/ui-react/tests/browser/working-sessions.pointer.tsx:132

The test-health audit of shard e3855-ui-react-01 (#3855) fixed the same leak in desktop-navigation.pointer.tsx and destination-press.pointer.tsx. These three files were outside that audit's clusters.

Scope

In each of the three files:

  • Keep the first value formViewport returns.
  • Restore it in teardown, using the -100/-120 convention, so it runs even when the test fails.

Out of scope

  • The formViewport command itself.
  • Any other file.
  • Timeouts.

Acceptance criteria

  • Each of the three files restores the outer window in afterEach or afterAll.
  • Each file still passes in its pointer projects (node scripts/visual.mjs --filter=<file>).

Verification

Run git grep -n "formViewport(" packages/ui-react/tests/browser and pair every call with its restore. Then run the three files once each in the pinned image.

Contract impact

None.

Lingua principale
TypeScript
Stelle
4
Fork
0
Merge medio
6h 8m
PR unite (30g)
864

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di schlessera/brain-kit

Tutte le issue di schlessera/brain-kit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.