[codex] fix: guard trace ID clipboard copy#3505
Merged
juliusmarminge merged 2 commits intoJun 22, 2026
Merged
Conversation
Co-authored-by: Codex <codex@openai.com>
…trace-id [codex] fix: guard trace ID clipboard copy
Contributor
ApprovabilityVerdict: Approved Small UX improvement that adds toast notifications when copying trace IDs to clipboard, replacing a raw clipboard API call with the existing You can customize Macroscope's approvability policy. Learn more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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 IDaction, but failures now surface as an error toast and successful copies confirm the copied trace ID.Validation
PATH="$HOME/.vite-plus/bin:$PATH" vp checkPATH="$HOME/.vite-plus/bin:$PATH" vp run typecheckvp checkreports 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.writeTextdirectly.It now goes through
useCopyToClipboardwithtarget: "trace ID", matching pairing-link copy behavior: a success toast shows the copied ID, and unavailable or failed clipboard writes surface an error toast viastackedThreadToast.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
SavedBackendListRowwith success and error toastsReplaces the direct
navigator.clipboard.writeTextcall with auseCopyToClipboardhelper in ConnectionsSettings.tsx. On success, a 'Trace ID copied' toast displays the copied ID; on failure, an error toast is shown viastackedThreadToastinstead of silently failing.Macroscope summarized 44464e9.