Repository navigation
Add right-click capture to the ResearchOS Chrome extension - #22
Open
ThePyProgrammer wants to merge 4 commits into
Open
ThePyProgrammer wants to merge 4 commits into
ThePyProgrammer wants to merge 4 commits into
Conversation
…ions Register Save to ResearchOS on install/update and open the existing capture UI with the explicit target and remembered library. Isolate window targets in session storage, clean them up on close, and preserve save confirmation. Cover metadata fallbacks, invalid selections, deleted libraries, unavailable backends, and concurrent capture inputs. Refs #17.
Check menu registration and browser/session handoff for page, link, and selection captures, including explicit save confirmation and cleanup. Document right-click usage, temporary targets, and the contextMenus permission; move right-click capture out of the future roadmap. Native menu dispatch remains outside the headless browser test. Refs #17.
Capture the actual link-intent window in the Chromium flow with final theme colors. Add both screenshots to the extension guide so the right-click workflow can be reviewed alongside the original popup. Refs #17.
Keep session handoff fixtures aligned with the production page, link, and selection button labels. Assert each label and refresh the right-click screenshots with the correct link action.
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
Add Save to ResearchOS to Chrome's right-click menu for pages, links, and selected DOIs/arXiv identifiers/URLs. Previously, saving a linked paper required opening it or copying its identifier into the popup. Users can now open the existing capture UI directly with the clicked target and remembered destination library, review it, and explicitly save to Inbox.
Closes #17. Follows the Chrome extension introduced in #16.
Screenshots
Actual capture windows rendered in Chromium using a local demo backend and a right-click link intent. The browser test exercises the session/window handoff; Chrome's native menu itself is not automated. The screenshots contain test data only.
Changes
contextMenuspermission.What is supported now
This feature uses HTTP/HTTPS page contexts and the existing import pipeline. It does not add automatic capture, offline storage, local PDF upload, or persistent page-state badges. A backend must be available before an import can be submitted.
Potential future additions
These remain separate enhancement proposals rather than features included in this PR:
The extension README documents current capabilities and the broader roadmap.
Setup and database change
frontend, runnpm run build:extension.chrome://extensionsand accept the added context-menu permission if Chrome requests it. For a fresh install, loadfrontend/extension/dist.No backend changes, API changes, new npm dependencies, or additional database migration are introduced. Migration 038 belongs to the already merged base extension work in #16.
Type of change
Testing
TZ=UTC, including 61 extension tests. The pre-existing dashboard chart test assumes UTC.The browser test uses a disposable mock API and a disposable manifest with only its loopback host pre-granted. It does not contact a live ResearchOS database.
Review notes