Repository navigation
✨ attribute OCR and plugin pastes to CrossPaste and show its logo as their source icon - #5240
Merged
Merged
Conversation
guiyanakuang
force-pushed
the
feat/crosspaste-source-icon
branch
from
October 21, 2026 05:04
a5b4dae to
0111a21
Compare
…cial-casing it in the UI
…ain OCR paste failures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pastes that CrossPaste produces itself — OCR "Extract text" and process plugin output (e.g. the bundled Translate plugin) — now carry
source = "CrossPaste", and their source icon is CrossPaste's own Mac-style app icon, rendered through exactly the same pipeline as every captured app icon.Changes
ExtractTextMenuContributor) and pluginreplaceClipboardoutput: our own pasteboard writes are never captured by the pasteboard listener (self-write detection), so the result previously reached the clipboard without a history entry. They now follow the same path ascrosspaste copyin the CLI:createLocalPasteData(source = AppName)first, thentryWritePasteboard(id = …, localOnly = true)so the listener ignores the write and sync goes through the normal local release.newPasteoutput: source changes from the plugin's manifest id toAppName.crosspaste_mac.png, the same one Conveyor packages for macOS, transparent padding included) is written toicons/<local appInstanceId>/CrossPaste.png. The existing Coil fetcher, the side-title alpha-trim + crop transformation, the title background color extraction and the icon push to peers all pick it up with no UI special case, so it is cropped and tinted exactly like other app icons. It is rewritten on every launch so it follows logo changes across upgrades.Testing
ProcessPluginRunnerTestandExtractTextMenuContributorTestto assert the paste is recorded withAppNameas source and the clipboard write uses the new paste id.AppSourceIconCropTransformationside by side; both come out framed identically../gradlew app:desktopTestpasses.