Skip to content

fix: transitions honor prefers-reduced-motion, and Playwright runs with it, so no click lands on a list still sliding open - #419

Merged
HardMax71 merged 1 commit into
mainfrom
fix/e2e-saved-script-delete-flake
Oct 19, 2026
Merged

HardMax71 merged 1 commit into
mainfrom
fix/e2e-saved-script-delete-flake

Conversation

@HardMax71

@HardMax71 HardMax71 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

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-files and 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.

Written for commit 9bb7e2d. Summary will update on new commits.

View guided diff Turn on auto-fix

…th it, so no click lands on a list still sliding open
@HardMax71
HardMax71 enabled auto-merge (squash) October 19, 2026 22:13
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b4e042a2-b119-4ef1-8d64-80852c3773de
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the area: frontend Svelte UI and the generated API client label Oct 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
frontend/src/components/Header.svelte 0.00% 0 Missing and 2 partials ⚠️
frontend/src/routes/(auth)/editor/+page.svelte 60.00% 0 Missing and 2 partials ⚠️
frontend/src/routes/login/+page.svelte 33.33% 0 Missing and 2 partials ⚠️
frontend/src/routes/register/+page.svelte 33.33% 0 Missing and 2 partials ⚠️
frontend/src/components/editor/SavedScripts.svelte 0.00% 0 Missing and 1 partial ⚠️
...ntend/src/routes/(auth)/notifications/+page.svelte 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Flag Coverage Δ
frontend-unit 92.26% <33.33%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
frontend/src/components/editor/SavedScripts.svelte 85.00% <0.00%> (-2.50%) ⬇️
...ntend/src/routes/(auth)/notifications/+page.svelte 90.80% <0.00%> (ø)
frontend/src/components/Header.svelte 96.62% <0.00%> (-2.25%) ⬇️
frontend/src/routes/(auth)/editor/+page.svelte 94.54% <60.00%> (-3.54%) ⬇️
frontend/src/routes/login/+page.svelte 95.23% <33.33%> (-4.77%) ⬇️
frontend/src/routes/register/+page.svelte 94.00% <33.33%> (-3.96%) ⬇️
Components Coverage Δ
Backend 92.46% <ø> (ø)
Frontend 92.26% <33.33%> (-0.35%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HardMax71
HardMax71 merged commit 7225e88 into main Oct 19, 2026
21 checks passed
@HardMax71
HardMax71 deleted the fix/e2e-saved-script-delete-flake branch October 19, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Svelte UI and the generated API client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants