Repository navigation
fix: report clipboard and toast outcomes accurately - #878
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
pasqualevitiello
marked this pull request as ready for review
October 14, 2026 19:48
pasqualevitiello
enabled auto-merge (squash)
October 14, 2026 19:48
sean-brydon
approved these changes
Oct 15, 2026
This branch was successfully deployed
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
Clipboard examples could show Copied before the write succeeded, the code example left Copy enabled when its textarea was empty, the report button could leave Generating report visible after success, and promise toasts emitted unhandled rejections. Reuse the existing clipboard hook (with registry dependencies), disable the code copy action until there is content, close the report progress toast in cleanup, and handle the promise helper's rejection.
Use the supported add/update toast lifecycle for the cancellable example: loading becomes success, an actual failure becomes error, and cancellation becomes neutral information feedback. Every outcome removes Cancel and restores the button to idle. Include regenerated registry assets. Covers F05, F06, F12, and D04.
Validation
Reviewer callouts
The existing clipboard hook logs denied writes and exposes no new user-facing error state. The promise helper forces rejected promises to error styling, so the cancellable example uses the supported add/update API to distinguish cancellation from failure. Browser verification used controlled fixture clipboard responses/task timers to avoid background-tab throttling; no full application build or E2E suite was run. Reverting this commit restores the previous examples.