Skip to content

fix: open original file using plugin-opener instead of deprecated plugin-shell - #1507

Open
JIturiDashami wants to merge 1 commit into
AOSSIE-Org:mainfrom
JIturiDashami:fix-open-original-file
Open

fix: open original file using plugin-opener instead of deprecated plugin-shell#1507
JIturiDashami wants to merge 1 commit into
AOSSIE-Org:mainfrom
JIturiDashami:fix-open-original-file

Conversation

@JIturiDashami

@JIturiDashami JIturiDashami commented Aug 26, 2026

Copy link
Copy Markdown

…gin-shell (#1165)

Addressed Issues:

Fixes #1165

Screenshots/Recordings:

Screenshot 2026-08-26 125457 Screenshot 2026-08-26 125438

Additional Notes:

Before: Clicking "Open Original File" did nothing , button was silently disabled

After: Clicking "Open Original File" now opens the image in the default Windows Photos viewer.

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: Claude (Anthropic) — used to analyze the root cause and help write the fix and tests. I reviewed and tested everything myself, including end-to-end in the running app.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features
    • Added the ability to open an image’s original file directly from the Media Info panel.
    • Opening the file now uses the image’s saved location and supports Windows file access.
    • Added permission support for opening local file paths.

@github-actions github-actions Bot added bug Something isn't working frontend labels Aug 26, 2026
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 87251cce-ef98-49cf-ab8d-ef8df49ffda2

📥 Commits

Reviewing files that changed from the base of the PR and between 4302258 and 32134b1.

📒 Files selected for processing (3)
  • frontend/src-tauri/capabilities/migrated.json
  • frontend/src/components/Media/MediaInfoPanel.tsx
  • frontend/src/components/Media/__tests__/MediaInfoPanel.test.tsx

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The media panel now opens the current image path with Tauri’s opener plugin. The capability configuration grants scoped access to all paths. Tests mock openPath and verify the button action.

Changes

Open Original File

Layer / File(s) Summary
Configure opener path permissions
frontend/src-tauri/capabilities/migrated.json
The capability configuration adds opener:allow-open-path with the "**" path scope and expands related arrays.
Wire and test file opening
frontend/src/components/Media/MediaInfoPanel.tsx, frontend/src/components/Media/__tests__/MediaInfoPanel.test.tsx
The button calls openPath with the current image path and logs failures. Tests mock the plugin and verify the asynchronous call.

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

Merge Risk: ⚪ Minimal · up to 32134

The PR updates opening original files to use the supported plugin path and preserves access for user-selected image locations; no actionable merge-blocking risk remains after normal checks and review.

Suggested labels: TypeScript/JavaScript

Suggested reviewers: rohan-pandeyy

Poem

A rabbit taps the file-path door
The image hops to screens once more
The opener grants the way
Tests watch the click and say
“Open bright files without delay!”

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: replacing deprecated plugin-shell usage with plugin-opener for opening original files.
Linked Issues check ✅ Passed The changes satisfy issue #1165 by using openPath(currentImage.path), adding the scoped opener:allow-open-path permission, and adding a test for the button action.
Out of Scope Changes check ✅ Passed All functional changes support issue #1165. Formatting and comment changes are minor and unrelated to behavior.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@gitcordapp

gitcordapp Bot commented Aug 26, 2026

Copy link
Copy Markdown

Link your account with Gitcord

Thanks for opening this PR, @JIturiDashami!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link JIturiDashami
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link JIturiDashami)

Once linked, Gitcord can notify you about reviews, merges, and more.

Posted by Gitcord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: "Open Original File" button in Media Info Panel shows no action

2 participants