Skip to content

[GUI] copyDelivery doesn't handle clipboard API failures #63

@Vantalens

Description

@Vantalens

File: packages/gui/src/App.tsx:226

Severity: Low

Description:
navigator.clipboard.writeText() requires secure context and user permission; failure (HTTP, permission denied, or unsupported browser) throws unhandled promise rejection.

Code:

async function copyDelivery() {
  await navigator.clipboard.writeText(delivery || '');
}

Failure Scenario:

  • User clicks 'Copy Delivery' button
  • Browser blocks clipboard access (permission denied or HTTP context)
  • Unhandled promise rejection logs to console
  • No user feedback that copy failed

Suggested Fix:
Wrap in try/catch, show toast/notification on success/failure, fallback to textarea selection method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingguiGUI/frontend related issuesjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions