Skip to content

Fix-15195| Remove restart warning dialogs from RelatedArticlesTab and localization#15200

Merged
Siedlerchr merged 6 commits intoJabRef:mainfrom
aidanmcc02:fix-for-issue-15195
Mar 1, 2026
Merged

Fix-15195| Remove restart warning dialogs from RelatedArticlesTab and localization#15200
Siedlerchr merged 6 commits intoJabRef:mainfrom
aidanmcc02:fix-for-issue-15195

Conversation

@aidanmcc02
Copy link
Contributor

@aidanmcc02 aidanmcc02 commented Feb 23, 2026

Closes https://github.com/JabRef/jabref/issues/15195](https://github.com/JabRef/jabref/issues/15195)
Closes #15195

PR Description

In RelatedArticlesTab.java – restart dialog removed on press of 'I agree'. So now the the related-articles pane is shown immediately with no restart prompt.
In JabRef_en.properties – Restart=Restart was removed as it was only used as the title of this dialog.
Also the key Restart\ required=Restart required was kept; it is still used in PreferencesDialogViewModel for the general preferences restart warning.

Steps to test

  1. Load a .bib file
  2. Press Related Articles
  3. A privacy Settings notification should appear
  4. Hit I agree and then the releated items should appear successfully
image

Verification proof:
image

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • 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 a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if 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

@qodo-free-for-open-source-projects
Copy link
Contributor

Review Summary by Qodo

Remove restart dialogs from RelatedArticlesTab and cleanup localization

🐞 Bug fix ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Removed restart warning dialogs from RelatedArticlesTab privacy settings
• Related articles pane now displays immediately after accepting privacy settings
• Cleaned up unused localization keys from properties file
• Updated CHANGELOG.md with user-visible changes
Diagram
flowchart LR
  A["User accepts privacy settings"] -->|Previously| B["Restart warning dialog shown"]
  A -->|Now| C["Related articles pane displayed immediately"]
  D["Localization cleanup"] -->|Removed| E["Unused 'Restart' key"]
  D -->|Kept| F["'Restart required' key for preferences"]
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java 🐞 Bug fix +0/-2

Remove restart dialogs from privacy settings acceptance

• Removed dialogService.showWarningDialogAndWait() call after accepting privacy settings
• Removed restart warning dialog after hiding recommendations tab
• Related articles pane now loads immediately without restart prompt

jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java


2. jablib/src/main/resources/l10n/JabRef_en.properties Localization +0/-3

Clean up unused localization properties

• Removed unused Restart=Restart localization key
• Removed unused Please restart JabRef for preferences to take effect. key
• Kept Restart required=Restart required key for general preferences restart warning

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


3. CHANGELOG.md 📝 Documentation +2/-0

Document restart dialog removal changes

• Added entry documenting removal of restart prompt for Mr. DLib privacy settings
• Added entry documenting removal of restart prompt when hiding Related articles tab
• Linked to issue #15195 for reference

CHANGELOG.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Contributor

qodo-free-for-open-source-projects bot commented Feb 23, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (2) 📎 Requirement gaps (1)

Grey Divider


Action required

1. Broken #15195 changelog link📘 Rule violation ✓ Correctness
Description
The new changelog entry uses invalid Markdown link syntax for the referenced issue. This makes the
issue reference non-clickable and reduces the quality of user-facing release notes.
Code

CHANGELOG.md[16]

+- We removed the restart prompt when accepting Mr. DLib privacy settings or hiding the Related articles tab in the entry editor. [#15195][https://github.com/JabRef/jabref/issues/15195]
Evidence
PR Compliance ID 40 requires user-facing text (including changelog entries) to be precise and
correct; the added line contains a malformed issue link.

CHANGELOG.md[16-16]
Best Practice: Learned patterns

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 uses incorrect Markdown link syntax: `[#15195][https://...]`.
## Issue Context
Changelog entries are user-facing text and should be correctly formatted and professional.
## Fix Focus Areas
- CHANGELOG.md[16-16]

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


2. Restart-warning key left in locales📎 Requirement gap ⛯ Reliability
Description
The Please restart JabRef for preferences to take effect. localization entry was removed from the
English base file but remains in other locale files, leaving unused/inconsistent localization
resources. This violates the requirement to remove localization strings that became unused due to
removing the Restart dialog.
Code

jablib/src/main/resources/l10n/JabRef_en.properties[2645]

-Please\ restart\ JabRef\ for\ preferences\ to\ take\ effect.=Please restart JabRef for preferences to take effect.
Evidence
PR Compliance ID 8 requires removing now-unused localization strings related to the removed dialog;
the restart-warning sentence is gone from English but still present in other locales (example
shown), indicating incomplete cleanup.

Remove now-unused localization strings related to the removed "Restart" dialog (if applicable)
jablib/src/main/resources/l10n/JabRef_en.properties[2640-2646]
jablib/src/main/resources/l10n/JabRef_de.properties[2606-2609]

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 English base localization removed the key `Please restart JabRef for preferences to take effect.`, but it remains in other locale files.
## Issue Context
After removing the Restart dialog usage, this key appears unused, so leaving it in non-English locales is inconsistent and violates localization cleanup requirements.
## Fix Focus Areas
- jablib/src/main/resources/l10n/JabRef_en.properties[2639-2646]
- jablib/src/main/resources/l10n/JabRef_de.properties[2606-2609]
- jablib/src/main/resources/l10n/JabRef_*.properties[1-99999]

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



Remediation recommended

3. No test coverage added 📘 Rule violation ⛯ Reliability
Description
The PR changes user-visible consent flow behavior (removing restart dialogs and changing
post-consent behavior) without adding/updating automated tests. This increases regression risk for
the MR. DLib consent/recommendations loading flow.
Code

jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[R233-241]

           mrDlibPreferences.setSendOs(cbOS.isSelected());
           mrDlibPreferences.setSendTimezone(cbTimezone.isSelected());

-            dialogService.showWarningDialogAndWait(Localization.lang("Restart"), Localization.lang("Please restart JabRef for preferences to take effect."));
           setContent(getRelatedArticlesPane(entry));
       });

       hideTab.setOnAction(event -> {
           preferences.getEntryEditorPreferences().setShouldShowRecommendationsTab(false);
-            dialogService.showWarningDialogAndWait(Localization.lang("Restart"), Localization.lang("Please restart JabRef for preferences to take effect."));
       });
Evidence
PR Compliance ID 31 expects behavior changes to be covered by corresponding tests; the modified
consent action now directly reloads content and no test changes are present in the change set.

AGENTS.md
jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[229-241]

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 consent flow behavior changed (restart dialog removed; content is reloaded immediately), but there is no automated test coverage added/updated to prevent regressions.
## Issue Context
Even if full UI testing is difficult, a focused test (e.g., mocking `dialogService` and verifying no restart-warning call; verifying `setContent(getRelatedArticlesPane(entry))` path) can cover the core behavioral contract.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[229-241]

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


4. Hide tab not applied now🐞 Bug ✓ Correctness
Description
Clicking "Hide 'Related articles' tab" only sets the preference flag but does not trigger a refresh
of visible tabs, so the current tab typically remains visible until some other event causes
adaptVisibleTabs() to run (and the restart dialog removal removes any feedback that the action
succeeded).
Code

jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[R239-241]

       hideTab.setOnAction(event -> {
           preferences.getEntryEditorPreferences().setShouldShowRecommendationsTab(false);
-            dialogService.showWarningDialogAndWait(Localization.lang("Restart"), Localization.lang("Please restart JabRef for preferences to take effect."));
       });
Evidence
The hide button handler only flips the preference. RelatedArticlesTab visibility is governed by that
preference, but the EntryEditor removes tabs only when adaptVisibleTabs() is invoked (e.g., when
the active entry changes or when the preview preference changes). There is no corresponding refresh
triggered by changing the recommendations-tab preference here, so the user sees no immediate effect.

jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[229-242]
jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[250-254]
jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java[190-203]
jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java[433-463]

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 “Hide 'Related articles' tab” button updates the preference, but the EntryEditor UI does not re-evaluate tab visibility immediately. As a result, the tab can remain visible until the user changes the selected entry or another refresh occurs.
## Issue Context
`RelatedArticlesTab.shouldShow(...)` is driven by `EntryEditorPreferences.shouldShowRecommendationsTab()`. Tabs are removed/added in `EntryEditor.adaptVisibleTabs()`, but this method is not triggered by toggling the recommendations-tab preference in this flow.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java[229-242]
- jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java[190-203]
- jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java[433-463]

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


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions
Copy link
Contributor

Hey @aidanmcc02! 👋

Thank you for contributing to JabRef!

We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request.

After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide.

Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures.

@github-actions github-actions bot added first contrib good first issue An issue intended for project-newcomers. Varies in difficulty. labels Feb 23, 2026
CHANGELOG.md Outdated

### Changed

- We removed the restart prompt when accepting Mr. DLib privacy settings or hiding the Related articles tab in the entry editor. [#15195][https://github.com/JabRef/jabref/issues/15195]

Choose a reason for hiding this comment

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

Action required

1. Broken #15195 changelog link 📘 Rule violation ✓ Correctness

The new changelog entry uses invalid Markdown link syntax for the referenced issue. This makes the
issue reference non-clickable and reduces the quality of user-facing release notes.
Agent Prompt
## Issue description
The CHANGELOG entry uses incorrect Markdown link syntax: `[#15195][https://...]`.

## Issue Context
Changelog entries are user-facing text and should be correctly formatted and professional.

## Fix Focus Areas
- CHANGELOG.md[16-16]

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

Setting\ all\ preferences\ to\ default\ values.=Setting all preferences to default values.
Could\ not\ import\ preferences=Could not import preferences
Could\ not\ export\ preferences=Could not export preferences
Please\ restart\ JabRef\ for\ preferences\ to\ take\ effect.=Please restart JabRef for preferences to take effect.

Choose a reason for hiding this comment

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

Action required

2. Restart-warning key left in locales 📎 Requirement gap ⛯ Reliability

The Please restart JabRef for preferences to take effect. localization entry was removed from the
English base file but remains in other locale files, leaving unused/inconsistent localization
resources. This violates the requirement to remove localization strings that became unused due to
removing the Restart dialog.
Agent Prompt
## Issue description
The English base localization removed the key `Please restart JabRef for preferences to take effect.`, but it remains in other locale files.

## Issue Context
After removing the Restart dialog usage, this key appears unused, so leaving it in non-English locales is inconsistent and violates localization cleanup requirements.

## Fix Focus Areas
- jablib/src/main/resources/l10n/JabRef_en.properties[2639-2646]
- jablib/src/main/resources/l10n/JabRef_de.properties[2606-2609]
- jablib/src/main/resources/l10n/JabRef_*.properties[1-99999]

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

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Feb 23, 2026
@testlens-app
Copy link

testlens-app bot commented Feb 23, 2026

✅ All tests passed ✅

🏷️ Commit: 6cb014c
▶️ Tests: 11194 executed
⚪️ Checks: 65/65 completed


Learn more about TestLens at testlens.app.

…for preference changes. Add listener for recommendations tab visibility in EntryEditor.
@github-actions github-actions bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Feb 23, 2026
@aidanmcc02
Copy link
Contributor Author

Ready for review!

Copy link
Member

@InAnYan InAnYan left a comment

Choose a reason for hiding this comment

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

Please only change English properties, so changes for other languages should be removed

@github-actions github-actions bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Feb 23, 2026
@aidanmcc02 aidanmcc02 requested a review from InAnYan February 23, 2026 20:45
@github-actions github-actions bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Feb 23, 2026
@aidanmcc02
Copy link
Contributor Author

Please only change English properties, so changes for other languages should be removed

Updated with comments

@subhramit
Copy link
Member

Please only change English properties, so changes for other languages should be removed

Updated with comments

Which comments?

@aidanmcc02
Copy link
Contributor Author

Please only change English properties, so changes for other languages should be removed

Updated with comments

Which comments?

I mean I updated my PR with the updates from the PR comment -

Please only change English properties, so changes for other languages should be removed

@aidanmcc02
Copy link
Contributor Author

This still needs a review if anyone has time :)

@subhramit subhramit added the status: awaiting-second-review For non-trivial changes label Feb 28, 2026
@Siedlerchr Siedlerchr enabled auto-merge March 1, 2026 14:40
@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 1, 2026
@github-actions github-actions bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Mar 1, 2026
Merged via the queue into JabRef:main with commit 623c6a4 Mar 1, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first contrib good first issue An issue intended for project-newcomers. Varies in difficulty. status: awaiting-second-review For non-trivial changes status: no-bot-comments 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.

Remove notification at MR. Dlib

4 participants