Skip to content

Group file operations in the entry context menu - #16829

Merged
calixtus merged 5 commits into
mainfrom
fulltext-context-menu
Sep 6, 2026
Merged

Group file operations in the entry context menu#16829
calixtus merged 5 commits into
mainfrom
fulltext-context-menu

Conversation

@koppor

@koppor koppor commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

🤖 The entry context menu offered no way to fetch a fulltext PDF, while four file-related commands occupied top-level space. "Get fulltext" is now reachable directly from the context menu, and "Attach file", "Attach file from URL", "Open folder(s)" and "Open file" moved into a "More file operations..." submenu.

Analogies: like honey the change is a thin sweet layer over what was already there, like chocolate it is best in a neatly wrapped bar instead of loose pieces, and like the moon it only rearranges what light already exists rather than making any of its own.

jabref-contrib-policy:4.2:reviewed​:ok

Steps to test

  1. Open any library and right-click an entry.
  2. "Get fulltext" (Alt+F7) sits between "Read status" and "More file operations...".
  3. Hover "More file operations..." — it holds the four file commands.

Context menu with Get fulltext and the More file operations submenu

Related issues and pull requests

Closes NA

AI usage

Claude Code (model claude-opus-5), AIL5.

AI CHECKLIST.md walkthrough

1. Code self-review

Nullability and control flow

  • [/] No == null / != null checks — JSpecify annotations (@NullMarked, @Nullable, @NonNull) used instead.
  • [/] No Objects.requireNonNull(...) — nullability expressed via JSpecify annotations.
  • [/] New classes annotated with @NullMarked (org.jspecify.annotations.NullMarked).
  • [/] Optional consumed with ifPresent / ifPresentOrElse / map / orElseThrow — never orElse(unusedValue) nor an isPresent() + get() block.
  • [/] StringUtil.isBlank(...) used instead of s == null || s.isBlank().

Not applicable: the change only moves existing menu-item construction into a submenu factory method.

Exceptions

  • [/] No catch (Exception e) — only specific exceptions are caught.
  • [/] No throw new RuntimeException(...) / IllegalStateException(...) — these tear down the whole application.
  • [/] Logged exceptions are passed as the last logger argument (LOGGER.info("...", e)), not concatenated into the message string.

Not applicable: no exception handling touched.

Style and idioms

  • [/] New BibEntry objects built with withers (withField, not setField).
  • Modern Java used: List.of() / Map.of() / Set.of(), Path.of(), SequencedCollection / SequencedSet, text blocks.
  • [/] Regexes use a precompiled Pattern.compile(...) constant, not String.matches(...).
  • [/] Background work uses org.jabref.logic.util.BackgroundTask, not new Thread().
  • No commented-out code, no trivial comments restating the code, no AI-disclosure comments in source.
  • [/] Markdown Javadoc (///) uses Markdown syntax, not JavaDoc inline tags: `code` instead of {@code}, [ClassName] instead of {@link}.

User-facing text

  • All user-facing text localized (Localization.lang in Java, % prefix in FXML).
  • Sentence case (not Title Case); no trailing !; labels do not end with :.
  • [/] Variance expressed with placeholders ("...: %0"), not string concatenation.

Security

  • [/] User-controlled data (request params, entry fields, file contents) is HTML-escaped before being written into any text/html response — including exception/error messages, not just the success body (XSS).

Tests

  • [/] Behavior changes in org.jabref.model / org.jabref.logic have added or updated tests.
  • [/] Tests assert object contents (assertEquals), use plain JUnit asserts (not AssertJ), have no @DisplayName, do not catch exceptions (let them propagate so JUnit reports setup/teardown failures directly), and use @TempDir instead of manual temp directories.
  • [/] Fetcher tests hit the live endpoints — the remote API is not mocked or stubbed (automated-review suggestions to mock it are rejected on purpose).

Not applicable: GUI-only menu composition, verified manually.

2. Verification commands

  • ./gradlew :jablib:check (or ./gradlew check for all modules).
  • ./gradlew checkstyleMain checkstyleTest checkstyleJmh.
  • ./gradlew modernizer.
  • ./gradlew --no-configuration-cache :rewriteDryRun reports no changes (run ./gradlew rewriteRun to fix).
  • ./gradlew javadoc.
  • [/] npx markdownlint-cli2 "docs/**/*.md" "*.md" (only if Markdown changed).
  • Only if formatting is still off after rewriteRun: docker run -v $(pwd):/github/workspace ghcr.io/leventebajczi/intellij-format:master "*.java" "" ".idea/codeStyles/Project.xml".

3. Documentation

  • CHANGELOG.md entry added if the change is visible to the user (end-user wording, no extra blank lines, sorted in next to existing entries about the same component/feature). Link the issue if one exists; link the PR only when no issue exists. Use TODO as the placeholder when neither is known yet — never a fake number. No entry for fixes to changes that were themselves introduced after the last release (feature only in ## [Unreleased]) — update the existing unreleased entry instead if needed.
  • Searched jabref/issues and jabref-koppor/issues for a related issue; linked only on a confident match, otherwise kept TODO (no closes/fixes for merely-similar issues).
  • [/] Requirement added to docs/requirements/<area>.md if the change is a new feature or significant bug fix (skip for refactors, minor fixes, and internal changes).
  • [/] Developer documentation under docs/ updated if behavior or architecture changed.

4. Pull request

  • PR body built from .github/PULL_REQUEST_TEMPLATE.md, every section filled.
  • All checklist items kept and marked [x], [ ], or [/].
  • All HTML comments removed from the PR body.
  • PR created with gh pr create --body-file <file> (not --body).
  • If CHANGELOG.md used a TODO placeholder (no issue confidently identified yet — an existing issue link always stays), it was replaced with the real PR-number link after PR creation, then committed and pushed. If an issue is identified or created later, the link is switched to the issue.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I added one sentence (max 20 words) to CHANGELOG.md describing the change from the user's point of view (if the change is visible to the user)
  • I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

🤖 Generated with Claude Code

https://claude.ai/code/session_019mkXzbUjnC9crn8w8d9neF

koppor and others added 2 commits September 3, 2026 03:47
The main table context menu had no way to fetch a fulltext PDF, while four
file-related entries took up top-level space. "Get fulltext" is now available
directly, and the file entries moved into a "More file operations..." submenu.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mkXzbUjnC9crn8w8d9neF
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mkXzbUjnC9crn8w8d9neF
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Group file operations in the entry context menu

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Adds Get fulltext to entry context menus with the existing Alt+F7 shortcut.
• Groups four attachment and opening commands under More file operations.
• Documents the user-facing menu reorganization in the changelog.
Diagram

graph TD
  L10N["Localized labels"] --> ACTIONS["Standard actions"] --> MENU["Entry context menu"] --> FULL["Get fulltext"] --> DOWNLOAD["Download action"]
  MENU --> MORE["File operations submenu"] --> ATTACH["Attach commands"]
  MORE --> OPEN["Open commands"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Reuse the existing fulltext action descriptor
  • ➕ Avoids adding another StandardActions constant for the same underlying operation.
  • ➕ Keeps fulltext command metadata centralized. Office
  • ➖ Would retain the longer existing label and different icon in the context menu.
  • ➖ Changing the shared descriptor could unintentionally alter the main menu presentation.

Recommendation: The PR's approach is preferable for this scoped UX change: it reuses DownloadFullTextAction behavior while giving the context menu purpose-specific text and icon metadata. Keeping submenu construction in RightClickMenu also matches the existing copy, send, and search submenu patterns without introducing unnecessary abstractions.

Files changed (4) +24 / -4

Enhancement (2) +22 / -4
StandardActions.javaDefine fulltext and file-operations menu actions +2/-0

Define fulltext and file-operations menu actions

• Adds context-specific action metadata for Get fulltext, including the Alt+F7 binding, and defines the localized More file operations submenu action.

jabgui/src/main/java/org/jabref/gui/actions/StandardActions.java

RightClickMenu.javaExpose fulltext retrieval and group file commands +20/-4

Expose fulltext retrieval and group file commands

• Adds DownloadFullTextAction directly to the entry context menu. Moves attach-file, attach-from-URL, open-folder, and open-file commands into a dedicated submenu factory method.

jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java

Documentation (1) +1 / -0
CHANGELOG.mdDocument the entry context-menu reorganization +1/-0

Document the entry context-menu reorganization

• Adds an Unreleased changelog entry describing direct fulltext access and the new file-operations submenu. The pull-request link remains represented by the supplied PR-number placeholder.

CHANGELOG.md

Other (1) +1 / -0
JabRef_en.propertiesLocalize the file-operations submenu label +1/-0

Localize the file-operations submenu label

• Adds the English localization entry for More file operations.

jablib/src/main/resources/l10n/JabRef_en.properties

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Changelog entry format invalid ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new changelog entry does not begin with an approved We changed prefix and exceeds the 20-word
limit. This violates the required concise, user-facing release-note format.
Code

CHANGELOG.md[72]

+- The entry context menu now offers "Get fulltext", and groups "Attach file", "Attach file from URL", "Open folder(s)" and "Open file" into a "More file operations..." submenu. [#PRNUM](https://github.com/JabRef/jabref/pull/PRNUM)
Evidence
Rule 41 requires Changed entries to begin with We changed and contain at most 20 words, while the
added entry begins with The entry context menu and substantially exceeds that limit.

AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements: AGENTS.md: Format Changelog Entries as Concise User-Facing Statements
CHANGELOG.md[72-72]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changelog entry exceeds 20 words and does not begin with the required `We changed` prefix.
## Issue Context
PR Compliance ID 41 requires one user-facing sentence of at most 20 words beginning with `We changed` under the Changed section.
## Fix Focus Areas
- CHANGELOG.md[72-72]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Changelog uses placeholder reference ✓ Resolved 📘 Rule violation ≡ Correctness
Description
The entry commits #PRNUM and a PRNUM URL rather than a valid issue/PR reference or TODO. This
leaves invalid release-note traceability.
Code

CHANGELOG.md[72]

+- The entry context menu now offers "Get fulltext", and groups "Attach file", "Attach file from URL", "Open folder(s)" and "Open file" into a "More file operations..." submenu. [#PRNUM](https://github.com/JabRef/jabref/pull/PRNUM)
Evidence
Rule 43 requires a valid issue or PR reference, or TODO when no valid reference is known; the
added #PRNUM link satisfies neither case.

AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries: AGENTS.md: Use Valid Issue or PR References in Changelog Entries
CHANGELOG.md[72-72]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changelog entry contains the unresolved placeholder `PRNUM`.
## Issue Context
Use the actual PR or matching issue reference when known; otherwise use `TODO` as required by PR Compliance ID 43.
## Fix Focus Areas
- CHANGELOG.md[72-72]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Context menu behavior untested 📘 Rule violation ☼ Reliability
Description
The PR adds fulltext retrieval and submenu composition to the entry context menu without adding or
updating automated tests. Regressions in command placement or submenu contents can therefore pass
unnoticed.
Code

jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[R92-93]

+                factory.createMenuItem(StandardActions.GET_FULLTEXT, new DownloadFullTextAction(dialogService, stateManager, preferences, (UiTaskExecutor) taskExecutor)),
+                createMoreFileOperationsSubMenu(factory, libraryTab, dialogService, stateManager, preferences, taskExecutor),
Evidence
Rule 33 requires behavioral changes to include suitable tests. Lines 92-93 introduce two observable
context-menu changes, while the PR contains no test additions or updates covering them.

AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes: AGENTS.md: Add or Update Tests for Behavior and Core-Layer Changes
jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[92-93]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly added context-menu behavior has no corresponding automated coverage.
## Issue Context
Add a focused JavaFX test that verifies the fulltext action is present and the four existing file operations appear under the new submenu.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[89-93]
- jabgui/src/test/java/org/jabref/gui/maintable/RightClickMenuTest.java[1-1]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java
@jabref-machine jabref-machine added the status: changes-required Pull requests that are not yet complete label Sep 3, 2026
@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels Sep 4, 2026
@koppor
koppor requested a review from Maran23 September 4, 2026 23:38

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@calixtus
calixtus enabled auto-merge September 6, 2026 13:06
@calixtus
calixtus added this pull request to the merge queue Sep 6, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Sep 6, 2026
Merged via the queue into main with commit ea8b3d9 Sep 6, 2026
73 checks passed
@calixtus
calixtus deleted the fulltext-context-menu branch September 6, 2026 13:31
Siedlerchr added a commit to Siedlerchr/jabref that referenced this pull request Sep 6, 2026
* upstream/main:
  Common CSS styles for spacing, padding, gaps and font-size (JabRef#16708)
  Group file operations in the entry context menu (JabRef#16829)
  add subset search (JabRef#16871)
  Speed up building (JabRef#16873)
  Enhance developer documentation (JabRef#16760)
  Fix BST entry preview formatting (JabRef#16853)
  Fix invalid regex handling in search (JabRef#16855)
  New Crowdin updates (JabRef#16867)

# Conflicts:
#	jabgui/src/main/java/org/jabref/gui/collab/metedatachange/MetadataChangeDetailsView.java
Siedlerchr added a commit that referenced this pull request Sep 6, 2026
* upstream/main:
  fix(bibtex): recover after unmatched braces (#16869)
  Common CSS styles for spacing, padding, gaps and font-size (#16708)
  Group file operations in the entry context menu (#16829)
  add subset search (#16871)
  Speed up building (#16873)
  Enhance developer documentation (#16760)
  Fix BST entry preview formatting (#16853)
Siedlerchr added a commit that referenced this pull request Sep 6, 2026
* main: (66 commits)
  Fix undo C - One undomanager / journal per library and some cleanups (#16857)
  Fix status label update for reviews on fork PRs (#16883)
  Rework shared SQL database synchronization (PostgreSQL, live updates) (#11879)
  Gracefully handle JGit errors (#16882)
  Require SHA-pinned GitHub Actions in AGENTS.md (#16875)
  fix(ai): keep group chat window after library edits (#16879)
  Add auto-commit, push & pull features for Git (#16651)
  Pin issue only when the PR author is the assignee (#16872)
  Select newly added entry (#16845)
  Add infer style button (#16870)
  Show group changes in Git diff (#16868)
  Label CI/CD and build-system pull requests automatically (#16877)
  AsyncEmbeddingModel.java: Switch NotNull annotation to NonNull from jspecify. (#16880)
  fix(bibtex): recover after unmatched braces (#16869)
  Common CSS styles for spacing, padding, gaps and font-size (#16708)
  Group file operations in the entry context menu (#16829)
  add subset search (#16871)
  Speed up building (#16873)
  Enhance developer documentation (#16760)
  Fix BST entry preview formatting (#16853)
  ...

# Conflicts:
#	docs/requirements/shared-database.md
#	jabgui/src/main/java/org/jabref/gui/autosaveandbackup/AutosaveManager.java
#	jabgui/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialogView.java
#	jabgui/src/main/java/org/jabref/gui/shared/SharedDatabaseLoginDialogViewModel.java
#	jabgui/src/main/java/org/jabref/gui/shared/SharedDatabaseUIManager.java
#	jabgui/src/main/resources/org/jabref/gui/shared/SharedDatabaseLoginDialog.fxml
#	jablib/src/main/java/org/jabref/logic/shared/DBMSConnectionProperties.java
#	jablib/src/main/java/org/jabref/logic/shared/DBMSConnectionPropertiesBuilder.java
#	jablib/src/main/java/org/jabref/logic/shared/prefs/SharedDatabasePreferences.java
koppor added a commit to JabRef/jabref-koppor that referenced this pull request Sep 7, 2026
…list

origin/common-style (JabRef#16708), origin/fulltext-context-menu
(JabRef#16829) and origin/fulltext-download-background-task
(JabRef#16831) no longer exist upstream; last night's run warned
about all three.

Upstream has landed each of them itself: the StyleClasses migration, the
GroupChangeDetailsView extraction and the background full text search
(req~fetchers.fulltext-background-search~1) all arrived via origin/main,
so experimental keeps the work without the branches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEfEAwaU63aKf2XzAKa7p8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: maintable status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants