Skip to content

[Repo Assist] refactor: consolidate CopyTextToClipboard into ClipboardHelper - #417

Closed
github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/improve-consolidate-clipboard-helper-364-111cbcb1ec242481
Closed

github-actions[bot] wants to merge 1 commit into
masterfrom
repo-assist/improve-consolidate-clipboard-helper-364-111cbcb1ec242481

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist.

Summary

Removes duplicate CopyTextToClipboard wrapper methods and points all callers directly to ClipboardHelper.CopyText, addressing #364.

ClipboardHelper.CopyText was already the canonical clipboard helper (introduced in PR #336). Two thin wrappers that did nothing but delegate to it remained:

  • App.CopyTextToClipboard(string) — public static, called from 4 sites in App.xaml.cs and 1 site in Onboarding/Pages/ConnectionPage.cs
  • QuickSendDialog.CopyTextToClipboard(string) — private static, called from 2 sites in QuickSendDialog.cs

Changes

  • Deleted App.CopyTextToClipboard and QuickSendDialog.CopyTextToClipboard
  • Updated all 7 call sites to call ClipboardHelper.CopyText directly

No behaviour change — the helpers were byte-identical delegates.

Test Status

  • dotnet test OpenClaw.Shared.Tests — 1613 passed, 28 skipped, 7 pre-existing failures (no regressions)
  • dotnet test OpenClaw.Tray.Tests — 936 passed, 47 skipped, 7 pre-existing failures (no regressions)
  • build.ps1 — requires Windows; not run in CI environment

Closes #364

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

Remove duplicate CopyTextToClipboard wrappers from App.xaml.cs and
QuickSendDialog.cs (both were thin delegates to ClipboardHelper.CopyText).
Update all 7 call sites to use ClipboardHelper.CopyText directly.

Closes #364

Co-authored-by: Copilot <[email protected]>
@shanselman

Copy link
Copy Markdown
Collaborator

Closing this automation implementation as stale/superseded after the post-refactor triage. The underlying signal is preserved in #364 and the tracker update in #372: clipboard duplication is much smaller in the current tree and should be fixed fresh if still desired.

@shanselman shanselman closed this May 18, 2026
@clawsweeper clawsweeper Bot mentioned this pull request Jun 13, 2026
26 tasks
@shanselman
shanselman deleted the repo-assist/improve-consolidate-clipboard-helper-364-111cbcb1ec242481 branch September 7, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deep-review][duplication] D1: CopyTextToClipboard duplicated across 17 sites

1 participant