Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Flaky under load: UI tests hit the 5 s vitest timeout (palette_caps_results and others)

Aperta
#58 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, tauri, typescript
Ambito
testing

Direzione di ricerca

Start with src/features/palette/CommandPalette.test.tsx and inspect the palette test’s typing and timeout; then check the two intermittent tests in src/App.test.tsx and src/features/settings/SettingsDialog.test.tsx for slow interactions. Keep the timeout local to the heavy test and preserve checks for the 200 item limit, best match ordering, and one catalog load. Run pnpm test repeatedly under CPU load, then pnpm lint.

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

Descrizione

area:frontend good first issue size:S status:ready type:task
Context

On a loaded dev machine (load average 10–37, another build running), pnpm test fails with Test timed out in 5000ms on UI tests that pass alone and on CI:

  • src/features/palette/CommandPalette.test.tsx > palette_caps_results: 5 000 tables render at most 200 items and the best match comes first (fails most often: it renders 5 002 catalog entries and types with user.type twice);
  • seen once each: src/App.test.tsx > restored_workspace_connects_on_activation, src/features/settings/SettingsDialog.test.tsx > Tab cycles inside the dialog.

pnpm test --testTimeout=30000 passes all 876 tests on the same machine, so these are timing budgets, not bugs. Seen while shipping #55 and #57. No testTimeout is set in the vitest config (default 5 s).

To do
  • Give the heavy palette test its own budget (test(..., 20_000)), and type the query with user.type(input, "tbl_4", { delay: null }) or a single fireEvent.change where the keystroke-by-keystroke path is not what is under test.
  • Check the two other tests for avoidable slow paths (per-key typing, long findBy* chains); raise their timeout only if needed.
  • Do not raise the global timeout for every test: slow tests should stay visible.
Acceptance criteria
  • pnpm test green 5 runs in a row while a CPU load runs in parallel (e.g. stress-ng --cpu $(nproc) --timeout 300s or a cargo build in another checkout).
  • The palette test still checks: at most 200 items, best match first after each query, catalog loaded once.
  • pnpm test && pnpm lint green
Files likely touched
  • src/features/palette/CommandPalette.test.tsx
  • src/App.test.tsx, src/features/settings/SettingsDialog.test.tsx
  • vitest.config.ts (only if a per-file setting is cleaner)
Related plan / spec

No response

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
1h 2m
PR unite (30g)
41

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 Cemoche/tablemax

Tutte le issue di Cemoche/tablemax

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.