Skip to content

[codex] fix: guard trace ID clipboard copy#3505

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
StiensWout:staging/safe-copy-connection-trace-id
Jun 22, 2026
Merged

[codex] fix: guard trace ID clipboard copy#3505
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
StiensWout:staging/safe-copy-connection-trace-id

Conversation

@StiensWout

@StiensWout StiensWout commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route the saved backend row trace ID copy action through the existing guarded clipboard hook.
  • Show success feedback when the trace ID is copied.
  • Show the hook-provided clipboard error message when the Clipboard API is unavailable or write fails.

Root cause

The saved backend row called navigator.clipboard.writeText(errorTraceId) directly, so unsupported clipboard contexts or rejected writes could fail without the existing user-visible error handling.

Impact

Users keep the same Copy trace ID action, but failures now surface as an error toast and successful copies confirm the copied trace ID.

Validation

  • PATH="$HOME/.vite-plus/bin:$PATH" vp check
  • PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck

vp check reports the repository existing unrelated warnings and no errors.


Note

Low Risk
Single UI handler change in Connections settings with no auth, data, or API impact.

Overview
Copy trace ID on saved remote backend rows (when a connection error includes a trace ID) no longer calls navigator.clipboard.writeText directly.

It now goes through useCopyToClipboard with target: "trace ID", matching pairing-link copy behavior: a success toast shows the copied ID, and unavailable or failed clipboard writes surface an error toast via stackedThreadToast.

Reviewed by Cursor Bugbot for commit 44464e9. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Guard trace ID clipboard copy in SavedBackendListRow with success and error toasts

Replaces the direct navigator.clipboard.writeText call with a useCopyToClipboard helper in ConnectionsSettings.tsx. On success, a 'Trace ID copied' toast displays the copied ID; on failure, an error toast is shown via stackedThreadToast instead of silently failing.

Macroscope summarized 44464e9.

StiensWout and others added 2 commits June 22, 2026 12:12
Co-authored-by: Codex <codex@openai.com>
…trace-id

[codex] fix: guard trace ID clipboard copy
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 22, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Small UX improvement that adds toast notifications when copying trace IDs to clipboard, replacing a raw clipboard API call with the existing useCopyToClipboard hook pattern. Self-contained change with no significant runtime behavior impact.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit ea52bb1 into pingdotgg:main Jun 22, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants