You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(clipboard): show copy text from image in action panel for image files - #1102
Rust Backend / Platform (Tauri commands, search, storage, OS integration)
Docs / Tooling / Other (docs, CI, build scripts, locales)
Manual smoke test & Validation
I manually smoke-tested this in the running app (pnpm dev) and visually verified the fix/feature works.
AI usage
AI tools helped produce this change.
I ran the asyar-contribution skill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.
Boundaries
Zero-hardcoded-strings i18n policy respected (if UI strings were added/changed).
Third-party extension compatibility preserved (no breaking changes to published extension contracts without deprecation/boundary adapter).
Hot paths remain fast and unblocked (window reveal, keystroke search, and 120 FPS UI responsiveness).
pnpm check:ci (or the relevant inner-loop checks) passes locally.
Summary by CodeRabbit
New Features
The “Copy text from image” action is now available for clipboard entries containing a single image file, including entries whose preview does not show the full filename.
Bug Fixes
Clipboard selections now stay in sync when a selected item is cleared or its full details are loaded.
No actionable comments were generated in the recent review.
Walkthrough
The clipboard view now shares its selected full item. The “Copy text from image” action now recognizes qualifying single-image file selections, with tests for image, PDF, and multiple-image selections.
Changes
Clipboard image action visibility
Layer / File(s)
Summary
Share the selected full item asyar-launcher/src/built-in-features/clipboard-history/state.svelte.ts, asyar-launcher/src/built-in-features/clipboard-history/DefaultView.svelte
The view state stores the selected full item. The selection effect updates it when a full item is fetched and clears it when no item is selected.
Detect image files for the action asyar-launcher/src/built-in-features/clipboard-history/index.ts, asyar-launcher/src/built-in-features/clipboard-history/index.test.ts
The action uses an image predicate that recognizes image-typed items and qualifying single-image file items. Tests cover image files identified by content or preview, truncated previews resolved with the full item, PDFs, and multiple image files.
Xoshbin/asyar#1054: Adds the copy-text-from-image action and OCR path that this change updates to recognize single-image file items.
Merge Risk: Minimal · up to c1f14
The change makes the "Copy text from image" action appear for single image file selections, with tests for image, PDF, and multiple-image cases. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: the "Copy text from image" action now appears in the action panel for image files. The changeset matches this. The index.ts change adds an isImageItem predicate so fil…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the "Copy text from image" action now appears in the action panel for image files. The changeset matches this. The index.ts change adds an isImageItem predicate so file items with exactly one image path show the action. The test file adds Files-selection visibility cases for single image files, a PDF, and multiple images. The state and DefaultView changes keep the full item in sync for that check. The title is specific and accurate, and it follows the conventional commit style.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
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
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.
What changed
Affected areas
asyar-sdk, extension runtime, IPC contracts, manifest)Manual smoke test & Validation
pnpm dev) and visually verified the fix/feature works.AI usage
asyar-contributionskill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.Boundaries
pnpm check:ci(or the relevant inner-loop checks) passes locally.Summary by CodeRabbit