Skip to content

Update zotero extension#26942

Merged
raycastbot merged 3 commits into
raycast:mainfrom
ridemountainpig:zotero
Apr 5, 2026
Merged

Update zotero extension#26942
raycastbot merged 3 commits into
raycast:mainfrom
ridemountainpig:zotero

Conversation

@ridemountainpig
Copy link
Copy Markdown
Contributor

Description

Add "Open PDF in System Viewer" action to open the attachment with the system's default viewer. Close #26817.

Screencast

zotero 2026-04-05 at 18 22 38

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: zotero Issues related to the zotero extension platform: macOS OP is contributor The OP of the PR is a contributor of the extension labels Apr 5, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

raycastbot commented Apr 5, 2026

Thank you for your contribution! 🎉

🔔 @sadanand-singh @lazarjov @joshuahhh @faridrashidi you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="zotero"
FORK_URL="https://github.com/ridemountainpig/extensions.git"
EXTENSION_NAME="zotero"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 5, 2026

Greptile Summary

This PR adds an "Open PDF in System Viewer" action to the Zotero extension, allowing users to open PDF attachments with the macOS system's default viewer instead of routing everything through Zotero. A new resolveAttachmentPath helper correctly handles both Zotero-stored attachments (resolving storage:<filename> paths to <zotero_dir>/storage/<key>/<filename>) and linked-file attachments. All three concerns raised in the previous review cycle have been addressed: resolveHome is now imported from zoteroApi.ts rather than duplicated, open() is wrapped in a try/catch with a user-facing HUD error, and attachmentFilePath is computed once per item and reused. The CHANGELOG entry is correctly placed at the top with a {PR_MERGE_DATE} placeholder.

  • New resolveAttachmentPath() function using the existing resolveHome utility from zoteroApi.ts
  • "Open PDF in System Viewer" action using Raycast's open() API with proper try/catch error handling and showHUD feedback
  • attachmentFilePath computed once outside JSX and reused in both the render condition and onAction callback
  • Changelog entry added with standard {PR_MERGE_DATE} placeholder at the top in descending version order
  • Minor: the new action is placed second in the action list rather than appended to the end, which is a style note that does not affect functionality

Confidence Score: 5/5

Safe to merge — all prior P1 concerns resolved; one minor P2 action-ordering note remains that does not affect functionality

All three previously-raised P1 concerns have been fully addressed: resolveHome is reused from zoteroApi.ts instead of duplicated, open() has error handling with showHUD, and attachmentFilePath is computed once per item and reused. The only remaining finding is a P2 style note about action panel ordering which does not impact correctness, user data, or the primary use case.

No files require special attention

Important Files Changed

Filename Overview
extensions/zotero/src/common/View.tsx Adds resolveAttachmentPath helper and 'Open PDF in System Viewer' action with proper error handling and single path computation per item
extensions/zotero/CHANGELOG.md Adds changelog entry for the new feature with correct {PR_MERGE_DATE} placeholder correctly placed at the top
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/zotero/src/common/View.tsx
Line: 263-278

Comment:
**New action inserted mid-list instead of appended to the end**

Per the extension guidelines, new action panel actions should be appended to the end of the list rather than inserted in the middle. The "Open PDF in System Viewer" action is currently placed as the second action (right after "Open PDF"), before "Open in Zotero" and all the other existing actions.

Consider moving it to just before the `ActionPanel.Section` block so the established action order isn't disrupted and users aren't surprised by keyboard-shortcut shifts on existing actions.

**Rule Used:** What: New action panel actions should be appended ... ([source](https://app.greptile.com/review/custom-context?memory=cde63d3f-214c-4294-9a2a-bb8323ef7d33))

How can I resolve this? If you propose a fix, please make it concise.

Greploops — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.
Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

Reviews (2): Last reviewed commit: "Update zotero extension" | Re-trigger Greptile

Comment thread extensions/zotero/src/common/View.tsx
Comment thread extensions/zotero/src/common/View.tsx Outdated
Comment thread extensions/zotero/src/common/View.tsx Outdated
@ridemountainpig
Copy link
Copy Markdown
Contributor Author

@greptile-apps please review again.

@pernielsentikaer pernielsentikaer self-assigned this Apr 5, 2026
Copy link
Copy Markdown
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 2601dda into raycast:main Apr 5, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

Published to the Raycast Store:
https://raycast.com/reckoning-dev/zotero

@raycastbot
Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@ridemountainpig ridemountainpig deleted the zotero branch April 8, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: zotero Issues related to the zotero extension OP is contributor The OP of the PR is a contributor of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Search Zotero] Open PDF in external PDF viewer

3 participants