fix: transitions honor prefers-reduced-motion, and Playwright runs with it, so no click lands on a list still sliding open
Summary
"a saved script can be deleted from the list" failed once in CI (run). Its trace shows the Delete click 97 ms after "Show Saved Scripts", while the list was still inside its 200 ms transition:slide. Playwright clicked at y 704, the bottom edge of the 720 px viewport, where the target's box had been measured. The failure screenshot has a different script in that row and the target below the viewport, and no DELETE request went out. The slide moved the list after Playwright scrolled to it, so the click hit a row part with no handler.
Changes
Every Svelte transition reads prefersReducedMotion from svelte/motion and uses a duration of 0 when the user asks for reduced motion, the pattern from the Svelte docs. Playwright runs with reducedMotion: 'reduce', so nothing animates under a click in E2E.
Type of Change
- Bug fix (non-breaking change that fixes an issue)
- New feature (non-breaking change that adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
- Documentation update
- Refactoring (no functional changes)
- CI/CD or tooling changes
Test Plan
- Backend unit tests pass (
cd backend && uv run pytest tests/unit) - Frontend unit tests pass (
cd frontend && npm run test) - Backend E2E tests pass (
docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e') - Frontend E2E tests pass (
cd frontend && npm run test:e2e) - API spec and client regenerated if routes or schemas changed (
./deploy.sh openapi, then./deploy.sh types), never edited by hand - Manual testing performed
Validation: lint, svelte-check, format:check and 868 unit tests pass. The race never fired in 115 local runs on main, CPU slowed 6x included, so the proof is the CI trace. With the change, the full local suite fails only tests that need the worker and admin tests that 4 local workers trip with 429s on /auth/me, as main does.
Checklist
- My code follows the project's style guidelines
- I have run
pre-commit run --all-filesand all checks pass - I have added tests that prove my fix/feature works
- I have updated documentation if needed
- My changes don't introduce new warnings
Summary by cubic
Fixes a flaky E2E test where a click could land on the saved-scripts list while it was still sliding open. All Svelte transitions now honor prefers-reduced-motion and run at 0ms duration when reduced motion is requested, and Playwright runs with reducedMotion: 'reduce' so no animation is in progress when tests click.