Summary
Remove the document.querySelector retry loop after task creation. Use React-owned state and refs to scroll the created card into view.
Required changes
- Track the created task identifier.
- Scroll the matching task card into view with a ref-driven approach.
- If timers remain, cancel them when the component unmounts.
Affected areas
CreateTaskModal.tsx
- Task card component
Acceptance criteria
- The new task card scrolls into view after creation.
- No timer continues after the modal unmounts.
- The implementation does not poll the DOM for the task card.
Source
Summary
Remove the
document.querySelectorretry loop after task creation. Use React-owned state and refs to scroll the created card into view.Required changes
Affected areas
CreateTaskModal.tsxAcceptance criteria
Source