fix(app): switch to native clipboard library#82
Conversation
Replaces `tea.SetClipboard` with `golang.design/x/clipboard` . Fixes copying failures on macOS (especially inside tmux environments). Works across macOS, Linux, and Windows.
|
Thanks for this — switching to Blocking: unguarded Minor: false success toast. if !a.clipboardAvailable {
return nil
}
_ = clipboard.Write(clipboard.FmtText, []byte(url))
return statusbar.PermalinkCopiedMsg{}Cosmetic: |
Replaces `tea.SetClipboard` with `golang.design/x/clipboard` inside the `MouseReleaseMsg` handler.
- Added `a.clipboardAvailable` guard to prevent panics - Added `CopyFailedMsg` error notification
|
should be good now @gammons |
|
Thanks for the updates — the One blocker though: CI will be red. Root cause: tests build the App without calling Suggest mirroring the read seam: add a Minor: |
- clipboardWrite field - initialize clipboardWrite with a default writer. - copyPermalinkOfSelected method use clipboardWrite instead of a direct call. - SetClipboardWriter method allow tests to inject a fake writer
- Removed redundant reflection checks for clipboard messages. - Enhanced clipboard integration in tests by using the `clipboard` package directly. - Added checks to ensure that clipboard data is correctly written during drag actions and message copy operations. - Ensured that plain clicks do not erroneously write to the clipboard or emit copied messages.
|
thanks @gcgbarbosa ! |
Replaces
tea.SetClipboardwithgolang.design/x/clipboard. Fixes copying failures on macOS (especially inside tmux environments). Works across macOS, Linux, and Windows.Fixes #80