OpenCut-app / OpenCut-app/OpenCut
[BUG] Unsafe async clipboard handler in header.tsx has no error handling
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 89.8k
- Forks
- 8.9k
- PR merge metrics
- No merged PRs in 30d
Description
Description
In apps/web/src/components/header.tsx (lines 68-72), the async onClick handler for copying the SVG logo has three unhandled promise rejections:
fetch()can fail if the network is unavailableres.text()can throw if response parsing failsnavigator.clipboard.writeText()can throw if clipboard access is denied
Current Behavior
Silent failure with no user feedback.
Expected Behavior
Wrap in try-catch and show toast error on failure.
Files
apps/web/src/components/header.tsx:68-72
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/web/src/components/header.tsx at lines 68-72 and trace the async copy handler. Add failure handling for fetch, response parsing, and clipboard access, with a toast error on failure; done means these failures no longer produce silent unhandled rejections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100