[MEDIUM] Clear setTimeout timer on unmount in copyToClipboard #43
Labels
No labels
blocked:needs-human
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/subvault#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Location:
src/App.tsx:358-362Problem:
setTimeout(() => setCopiedKey(null), 2000)incopyToClipboardis not cleared on unmount. Timer fires after component unmounts, causing stale state update.Impact: Memory leak in long-lived sessions; React warning about state update on unmounted component.
Fix: Store timer ID in a
useRef; clear inuseEffectcleanup or wrap in a custom hook.Effort: ~10 mins