# 📄 Copy Post Component

**URL:** <https://meta.discourse.org/t/copy-post-component/218883>\
**Category:** Theme component\
**Tags:** official, copy-post\
**Created:** [February 20, 2022, 3:51pm UTC](https://meta.discourse.org/t/copy-post-component/218883 "2022-02-20T15:51:40Z")\
**Posts on this page:** 1\
**Showing post:** 33

<div class="post-metadata">

**Author:** ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Post date:** [September 16, 2026, 2:29pm UTC](https://meta.discourse.org/t/copy-post-component/218883/33 "2026-09-16T14:29:44Z")

</div>

Following up on this, I’ve opened a small PR which changes the success/check indication so it is only shown after the clipboard write has completed successfully, with a regression system spec:

> <https://github.com/discourse/discourse-copy-post/pull/39>
>
> This changes the Copy Post success indicator so the check icon is only shown aft…er the clipboard write has completed successfully.
> 
> Previously, the component set the check icon before awaiting \`clipboardCopy()\`, which meant it could show success while the clipboard operation was still pending.
> 
> The previous widget implementation showed copied/success feedback only after the clipboard promise resolved, and Discourse's core copy button follows the same pattern.
> 
> This PR:
> 
> \- moves \`this.icon = "check"\` to after \`await clipboardCopy(postContents)\`
> \- adds a system spec which holds the clipboard write pending and verifies that the success icon is not shown until the write resolves
> 
> Testing:
> 
> \- focused Copy Post spec: 6 examples, 0 failures
> \- full component suite: 26 examples, 0 failures
> \- \`pnpm lint\`: all lint, formatting, template, CSS and type checks passed
> \- manually tested on a July 2026 Discourse revision; normal clipboard feedback remained effectively instantaneous, and artificially delaying the clipboard promise did not block or lag other Discourse interactions

The GitHub Actions workflow is currently awaiting maintainer approval before the CI jobs can run.

---

_[View the full topic](https://meta.discourse.org/t/copy-post-component/218883)._
