Skip to content
This repository was archived by the owner on Sep 15, 2026. It is now read-only.
This repository was archived by the owner on Sep 15, 2026. It is now read-only.

Stop the onboarding border-trace rAF loop once settled #46

Open

Description

@gabitoesmiapodo

Priority

Low — nice to have, can wait

User story / Problem statement

Currently, useBorderTrace runs a continuous requestAnimationFrame loop during onboarding (src/views/onboarding/useBorderTrace.tsx:112) that never stops re-scheduling, even once the trace is permanently held and the tint has settled. The hook is well engineered (guards redundant DOM writes, respects prefers-reduced-motion, cancels rAF on cleanup), but it keeps the main thread busy at idle. This is a minor problem because it burns frames after the animation has nothing left to do.

Expected outcome

The rAF loop stops re-scheduling once the trace is permanently held and the tint has settled, and resumes only if state changes again — preserving all current visual behavior and reduced-motion handling.

Acceptance criteria

  • The rAF loop stops re-scheduling once the trace is held and tint settled.
  • Existing guards (redundant DOM-write avoidance, prefers-reduced-motion, rAF cleanup on unmount) are preserved.
  • No visual regression in the onboarding border-trace animation.

Technical notes

  • Source: src/views/onboarding/useBorderTrace.tsx:112. Optional, low-impact finding.

Additional context

Part of epic #30. Optional optimization, not a committed epic acceptance criterion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions