Fix : Replace blocking fetcher dialogs with notifications#15099
Conversation
Review Summary by QodoReplace blocking fetcher dialogs with notifications
WalkthroughsDescription• Replace blocking dialogs with non-intrusive notifications in bibliographic update process • Improve user experience by eliminating workflow interruptions during fetch operations • Apply consistent notification pattern across both ID-based and entry-based fetchers Diagramflowchart LR
A["Fetch Operation"] --> B["Error Occurs"]
B --> C["ID-Based Fetcher"]
B --> D["Entry-Based Fetcher"]
C --> E["Show Notification"]
D --> E
E --> F["Non-blocking User Experience"]
File Changes1. jabgui/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java
|
Code Review by Qodo
✅ 1.
|
| dialogService.notify(Localization.lang("Server not available")); | ||
| } else { | ||
| dialogService.showInformationDialogAndWait(Localization.lang("Fetching information using %0", idBasedFetcher.getName()), Localization.lang("Error occurred %0", exception.getMessage())); | ||
| dialogService.notify(Localization.lang("Error occurred %0", exception.getMessage())); |
There was a problem hiding this comment.
1. notify() exposes exception.getmessage() 📘 Rule violation ⛨ Security
The new user-facing notification includes exception.getMessage(), which can leak internal/system details to end users. Detailed error information should be kept in logs while user messages remain generic.
Agent Prompt
## Issue description
A user-facing notification includes `exception.getMessage()`, which can leak internal/system details.
## Issue Context
This notification is shown to end users when fetching bibliographic information fails; detailed error information should be restricted to internal logs.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/mergeentries/FetchAndMergeEntry.java[105-105]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
✅ All tests passed ✅🏷️ Commit: 1003f5e Learn more about TestLens at testlens.app. |
|
Which AI system is this replacing |
Gemini it is |
|
Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of |
|
We are currently not willing to adapt our scripts to AIs - thus, please, update the checklist syntax manually ^^ |
Understood and fixed the syntax. Also the test that is failing, if I standardize both fetcher paths to use consistent notifications would that be sufficient? |
|
Fix the failing tests or we will close this PR |
I'm working on it |
* upstream/main: Add names to output (JabRef#15102) Try other token Be less strict on ourselves Very short self unassigment text Fix review check Fix trigger
* 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)
Closes #15097
PR Description
I replaced the blocking error and information dialogs in FetchAndMergeEntry with non intrusive notifications using the DialogService. This change ensures that when a bibliographic update fails like due to an invalid ISSN or server timeout, the user's workflow is not interrupted by a pop up that requires a manual click to dismiss.
Steps to test
Screenshots:
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)