Skip to content

test(transitions): regression lock for the #269 motion guard - #281

Merged
ajianaz merged 1 commit into
developfrom
test/269-transition-guard
Aug 28, 2026
Merged

test(transitions): regression lock for the #269 motion guard#281
ajianaz merged 1 commit into
developfrom
test/269-transition-guard

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What

Locks the #269 fix with unit tests instead of leaving it verified-by-memory:

  • motionSuppressed() becomes an exported, live-evaluated check: desktop honors prefers-reduced-motion; a plain browser (incl. background panes) always suppresses — Svelte's out-transition completion never fires there, which used to stack stale views forever (the ghost "+ New" and the blocked locator clicks).
  • Every shared preset (fadeQuick, modalScale, overlayFade, overlayFlyUp, slideDown, expandSlide) routes through it per invocation.
  • 5 new tests: web-mode always-on, desktop + reduced-motion on, desktop + motion allowed off, and zero-duration collapse of all six presets.

Why

Closes #269 on merge — the root cause (stacked stale .view-container overlays, which also made locator clicks fail actionability) is guarded and now regression-locked. Remaining verification pass in a real browser is belt-and-braces; if ghosting ever reappears, these tests define the contract.

How

guarded() previously branched on module-load isWebMode; suppression is now a named predicate re-evaluated per invocation — same behavior, testable seams. isWebMode import dropped from transitions.ts (unused after refactor).

Testing

  • npx svelte-check — 0 errors
  • npm run test -- --run81/81 pass (5 new)
  • npm run build — succeeds
  • cargo fmt --check / clippy / cargo test — CI covers (no Rust changes)
  • Cora review — runs in CI
  • Manual smoke-test — app boots and animates normally on desktop builds (guard is a no-op there)

Closes #269

motionSuppressed() is now an exported, live-evaluated check (desktop:
honors prefers-reduced-motion; plain browser: always suppress, since
Svelte's out-transition completion never fires in background panes and
stale views stacked forever). Every shared preset routes through it.

5 unit tests cover all three branches plus the zero-duration collapse
of fadeQuick/modalScale/overlayFade/overlayFlyUp/slideDown/expandSlide.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit d66f2cf into develop Aug 28, 2026
16 checks passed
@ajianaz
ajianaz deleted the test/269-transition-guard branch August 28, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

investigate(ui): ghost duplicate "+ New" during view transition + Playwright locator clicks blocked

1 participant