Feature provide insights citation fetcher#15093
Conversation
… CitationFetcher interface
…CitationFetcher class
…tionsFetcher class
…ScholarCitationFetcher class
… tab in CHANGELOG.md
Review Summary by QodoAdd API URL browser access for citation fetchers in Citations tab
WalkthroughsDescription• Added context menu to citation labels for opening API URLs in browser • Implemented API URI retrieval methods across all citation fetchers (OpenAlex, OpenCitations, Semantic Scholar, CrossRef) • Integrated native browser opening functionality with error handling • Added localization support for new API URL features Diagramflowchart LR
A["User right-clicks citation label"] --> B["Context menu displays"]
B --> C["Select 'Open API URL in browser'"]
C --> D["Fetch API URI from citation fetcher"]
D --> E["Open URI in native browser"]
File Changes1. jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
|
Code Review by Qodo
✅ 1.
|
| try { | ||
| NativeDesktop.openBrowser(apiUri, preferences.getExternalApplicationsPreferences()); | ||
| } catch (IOException e) { | ||
| dialogService.notify(Localization.lang("Unable to open link.")); | ||
| } |
There was a problem hiding this comment.
1. ioexception swallowed without log 📘 Rule violation ✧ Quality
When opening the API URL fails, the caught IOException is not logged, which prevents diagnosing failures in production. This violates the requirement to log exceptions (with the exception as the last logger argument) instead of silently handling them.
Agent Prompt
## Issue description
A newly added `catch (IOException e)` swallows the exception without logging it, making browser-opening failures hard to diagnose.
## Issue Context
The compliance checklist requires exceptions to be logged and passed as the last argument to the logger call.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java[645-649]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
koppor
left a comment
There was a problem hiding this comment.
Please try harder to follow
If possible, the new methods should be used by the CitationFetcher implementations
I think, one can use the method at each fetcher.
Especially at OpenCitatoinsFechter.
Please use this as chance to learn about code reading for yourself - and not just to generate some code. Please!!
...c/main/java/org/jabref/logic/importer/fetcher/citation/crossref/CrossRefCitationFetcher.java
Show resolved
Hide resolved
✅ All tests passed ✅🏷️ Commit: 125fb2d Learn more about TestLens at testlens.app. |
…hub.com:LoayTarek5/jabref into feature-provide-insights-citation-fetcher-15033
|
Do not request reviews if changes are required. |
… enabled when available
…hub.com:LoayTarek5/jabref into feature-provide-insights-citation-fetcher-15033
…hub.com:LoayTarek5/jabref into feature-provide-insights-citation-fetcher-15033
|
Your pull request conflicts with the target branch. Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. |
koppor
left a comment
There was a problem hiding this comment.
Thank you for working on this.
Some last steps missing, but I think, they can only be done with experience.
OK, they are somehow expected to be done at a "good third issue", but I want the feature early (and need to review other PRs). Thus, I did the last steps for myself.
--> We are still a project focussing on maintainable code; especially avoiding code duplication.
|
I used this PR as example to ask GitHub support. See https://github.com/orgs/community/discussions/187123#discussion-9475767 (you can vote up if you want) |
Thank you very much, to be honest, i learned so much while working on this issue and having fun. Also, sorry for some improper code quality, I will try to improve it. |
* upstream/main: Refine Automatic Field Editor filtering logic (fixes JabRef#15066) (JabRef#15094) Output URL to workflow Fix token Refine stats message Quick fix to reduce load on runners "Debug" output for assign-issue-action Streamline pr-comment.yml (and remove status: stale label) Feature provide insights citation fetcher (JabRef#15093) Automatic Grouping By Entry Type (JabRef#15081) Minor test fixes for arXiv (JabRef#15100) New Crowdin updates (JabRef#15101) recomment linked files handler (JabRef#15105) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15087) Streamline binaries (JabRef#15085)
Related issues and pull requests
Closes #15033
PR Description
Added an "Open API URL in browser" option in the Citations tab,
allowing users to view the raw API response from all citation fetchers except for CrossRef does not support fetching citations for a given entry
This is accessible via a context menu on the "References cited" and "References that cite" labels.
Steps to test
1- load a library with entries





2- Select an entry and go to the Citations tab
3- Select a citation fetcher(OpenAlex, OpenCitations, Semantic Scholar, and CrossRef)
3- Right-click on "References cited in {entry}" or "References that cite {entry}"
4- Click "Open API URL in browser"
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)