OpenCut-app / OpenCut-app/OpenCut

[BUG] Unsafe async clipboard handler in header.tsx has no error handling

Open
#722 1 comment 0 reactions 0 assignees View on GitHub

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 unavailable
  • res.text() can throw if response parsing fails
  • navigator.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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.