Skip to content

fix(site): show success toasts after copying chat ID and branch - #31402

Merged
jakehwll merged 1 commit into
mainfrom
superblink/des-22232-show-success-toasts-after-copy-id-and-copy-branch
Oct 28, 2026
Merged

jakehwll merged 1 commit into
mainfrom
superblink/des-22232-show-success-toasts-after-copy-id-and-copy-branch

Conversation

@coder

@coder coder Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

The Agents chat menu's Copy ID and Copy branch actions copied silently. They now show a success toast, but only when the copy actually succeeds. A failed copy still shows just the existing error toast.

  • Copy ID: "Chat ID copied to clipboard."
  • Copy branch: "Branch name copied to clipboard."

Changes

  • useClipboard: copyToClipboard now resolves true on success and false on failure (after onError runs). No existing callers depended on the old void return.
  • ChatActionsMenuItems: both copy items await the result and call toast.success on success. Covers the dropdown and right-click menus.
  • Tests: useClipboard asserts the return value; the ChatsSidebar and ProjectChatsList copy tests assert the success message; a new ChatsSidebar test asserts a failed copy shows only the error toast.

Verification

  • pnpm exec vitest run --project=unit on the three touched test files (126 passed)
  • pnpm run lint:types, pnpm run check, pnpm run lint:oxlint: clean

Fixes DES-22232

Copy ID and Copy branch in the Agents chat menu now show a success toast
when the copy succeeds. useClipboard's copyToClipboard resolves a boolean
so callers can tell success from failure; failures keep the existing
error toast and never show the success toast.
@coder
coder Bot requested a review from a team as a code owner October 28, 2026 06:01
@linear-code

linear-code Bot commented Oct 28, 2026

Copy link
Copy Markdown

DES-22232

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Oct 28, 2026
@jakehwll
jakehwll enabled auto-merge (squash) October 28, 2026 06:08
@jakehwll
jakehwll merged commit cd55565 into main Oct 28, 2026
47 checks passed
@jakehwll
jakehwll deleted the superblink/des-22232-show-success-toasts-after-copy-id-and-copy-branch branch October 28, 2026 06:09
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants