Skip to content

feat(web): make thread errors copyable - #7084

Closed
Zammi1 wants to merge 4 commits into
pingdotgg:mainfrom
Zammi1:agent/copy-thread-error-diagnostics
Closed

Zammi1 wants to merge 4 commits into
pingdotgg:mainfrom
Zammi1:agent/copy-thread-error-diagnostics

Conversation

@Zammi1

@Zammi1 Zammi1 commented Aug 15, 2026 •

Copy link
Copy Markdown

Problem

Persistent thread errors can contain long, multiline diagnostics, but the banner only exposed a visually clamped version. Users had no direct way to copy the complete diagnostic when reporting or debugging provider failures.

What changed

  • add a copy control to the persistent thread error banner
  • copy the complete diagnostic rather than the clamped presentation
  • show success only after the clipboard write succeeds and show anchored failure feedback when it does not
  • reset feedback when the thread or error changes and ignore stale or post-unmount clipboard completions
  • preserve the existing session-scoped dismissal behavior
  • document copy and dismissal behavior for web and desktop

Impact

Web and desktop users can copy provider-neutral thread diagnostics directly from the banner. No provider, contract, server, remote-mode, or mobile behavior changes.

Validation

  • vp test run apps/web/src/components/chat/ThreadErrorBanner.test.tsx apps/web/src/hooks/useCopyToClipboard.test.ts — 16 tests passed
  • tsgo --noEmit -p apps/web/tsconfig.json
  • targeted vp lint for the changed web files
  • git diff --check origin/main...HEAD

Evidence

Before

Persistent thread error with dismissal only.

Before: persistent thread error banner with dismissal only

After

Persistent thread error with copy and dismissal controls.

After: persistent thread error banner with copy and dismissal controls

Generated by GPT-5.6 Sol via the Codex harness in T3 Code.

Note

Add copy-to-clipboard button to thread error banners

  • Adds a ThreadErrorCopyButton to ThreadErrorBanner.tsx that copies the full diagnostic text to the clipboard, showing a check icon on success and an anchored toast on failure.
  • Fixes race conditions in useCopyToClipboard by tracking operation IDs to ignore stale async completions and prevent state updates after unmount.
  • Adds user-facing documentation for thread error banners in docs/user/thread-errors.md.

Macroscope summarized 5004dbf.


Note

Low Risk
UI-only clipboard and banner changes with no auth, API, or server impact; broader hook hardening is localized to copy feedback.

Overview
Thread error banners now include a copy control next to dismiss so users can grab the full multiline diagnostic (not just the line-clamped preview). Success shows brief copied feedback on the button; clipboard failures surface an anchored toast via showThreadErrorCopyFailure.

useCopyToClipboard is tightened with per-attempt operation IDs so stale writes, repeat failures, and unmount no longer flip isCopied or fire callbacks incorrectly. ChatView passes key={threadErrorBannerKey} on ThreadErrorBanner so copy UI resets when the thread or error text changes. Session-scoped dismissal behavior is unchanged.

User docs add thread-errors.md and link it from install next steps.

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

@github-actions github-actions Bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Aug 15, 2026
@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f68cb3f1-9372-44aa-a50a-b12f3e3c0f5d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:M 30-99 changed lines (additions + deletions). label Aug 15, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding: the new copy icon picks up the ghost button's muted icon color instead of the alert's error tone, so it renders gray next to the red dismiss icon in the same banner.

Posted via Macroscope — UI Consistency

@Zammi1
Zammi1 marked this pull request as ready for review August 15, 2026 13:02
@Zammi1
Zammi1 force-pushed the agent/copy-thread-error-diagnostics branch from 2180bdf to 64d53b2 Compare August 15, 2026 13:02
@Zammi1
Zammi1 marked this pull request as draft August 15, 2026 13:04
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 15, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 64d53b2

Self-contained UI feature adding copy functionality to thread error banners. Uses existing hooks, includes comprehensive tests, and has no runtime behavior changes beyond the new copy button.

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

@Zammi1
Zammi1 marked this pull request as ready for review August 15, 2026 13:33
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 15, 2026 13:33

Dismissing prior approval to re-evaluate 64d53b2

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

The before/after images show the copy control, but no recording demonstrates copying the complete diagnostic or the timed success and failure feedback. Please attach a short client recording of those interactions under the verification rule, then request reconsideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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