Skip to content

fix(clipboard): show copy text from image in action panel for image files - #1102

Merged
Xoshbin merged 1 commit into
mainfrom
fix/clipboard-ocr-action-panel
Nov 21, 2026
Merged

Xoshbin merged 1 commit into
mainfrom
fix/clipboard-ocr-action-panel

Conversation

@Xoshbin

@Xoshbin Xoshbin commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • Before (issue / current behavior):
  • After (fix / new behavior):

Affected areas

  • Launcher UI / UX (visuals, interactions, keyboard shortcuts, settings)
  • SDK / Extensions (asyar-sdk, extension runtime, IPC contracts, manifest)
  • 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.

@github-actions github-actions Bot added the bug Something isn't working label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • 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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3fa52b8 and c1f1421.

Files selected for processing: 4

  • asyar-launcher/src/built-in-features/clipboard-history/DefaultView.svelte
  • asyar-launcher/src/built-in-features/clipboard-history/index.test.ts
  • asyar-launcher/src/built-in-features/clipboard-history/index.ts
  • asyar-launcher/src/built-in-features/clipboard-history/state.svelte.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@Xoshbin
Xoshbin merged commit 1699db7 into main Nov 21, 2026
14 checks passed
@Xoshbin
Xoshbin deleted the fix/clipboard-ocr-action-panel branch November 21, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant