Skip to content

Fix reset and import for PreviewPreferences#15306

Merged
Siedlerchr merged 21 commits into
mainfrom
migrate-previewprefs
Mar 15, 2026
Merged

Fix reset and import for PreviewPreferences#15306
Siedlerchr merged 21 commits into
mainfrom
migrate-previewprefs

Conversation

@calixtus

@calixtus calixtus commented Mar 9, 2026

Copy link
Copy Markdown
Member

Related issues and pull requests

Closes #14400
Follow-up #14959

PR Description

  • Enables reset and import
  • Some cleanups and architectural fixes (single source of truth, code placement in packages)
  • Moved BstPreviewLayout, TextBasedPreviewLayout and CitationStylePreviewLayout to preview Layout for correct JBang compilation
  • Cleanups and IDE suggestions along the way

ToDo:

  • Add default styles after reset

Steps to test

Preferences > Reset / Import

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
Copy Markdown
Contributor

Review Summary by Qodo

Enable reset and import for PreviewPreferences with refactored layout handling

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Enable reset and import functionality for PreviewPreferences
• Refactor PreviewPreferences to use string-based custom layout storage
• Consolidate preview layout creation logic into PreviewLayout.of() factory method
• Fix preference constant naming and method typos (getGroupsPreferencesfromBackingStore)
• Add PreviewPreferences to clear() method for proper reset support
Diagram
flowchart LR
  A["PreviewPreferences"] -->|refactored to use String| B["customPreviewLayout"]
  C["PreviewLayout.of()"] -->|factory method| D["TextBasedPreviewLayout"]
  C -->|factory method| E["CitationStylePreviewLayout"]
  C -->|factory method| F["BstPreviewLayout"]
  G["JabRefGuiPreferences.clear()"] -->|now includes| H["PreviewPreferences.setAll()"]
  I["PreviewTabViewModel"] -->|uses GuiPreferences| J["getPreviewPreferences()"]
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java Formatting +15/-3

Format method signatures for readability

jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java


2. jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java ✨ Enhancement +150/-188

Refactor preview preferences and enable reset/import

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java


3. jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java ✨ Enhancement +3/-1

Update PreviewTabViewModel initialization with dependencies

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java


View more (8)
4. jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java ✨ Enhancement +32/-12

Refactor to use GuiPreferences and factory methods

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java


5. jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java ✨ Enhancement +10/-1

Update to use refactored preview layout handling

jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java


6. jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java ✨ Enhancement +42/-20

Refactor to store custom layout as string with setAll method

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java


7. jabgui/src/main/java/org/jabref/migrations/PreferencesMigrations.java 🐞 Bug fix +2/-1

Add default value to preview style migration

jabgui/src/main/java/org/jabref/migrations/PreferencesMigrations.java


8. jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java ✨ Enhancement +10/-0

Add getDefault() factory method for testing

jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java


9. jablib/src/main/java/org/jabref/logic/layout/TextBasedPreviewLayout.java ✨ Enhancement +34/-1

Add DEFAULT constant and of() factory method

jablib/src/main/java/org/jabref/logic/layout/TextBasedPreviewLayout.java


10. jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java 🐞 Bug fix +1/-1

Fix typo in log message

jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java


11. jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java ✨ Enhancement +36/-1

Add of() factory method for unified layout creation

jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java


Grey Divider

Qodo Logo

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

This comment was marked as outdated.

@calixtus calixtus added dev: code-quality Issues related to code or architecture decisions component: preferences component: entry-preview labels Mar 9, 2026
@calixtus calixtus marked this pull request as draft March 9, 2026 19:05
Comment thread jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java Outdated
@testlens-app

This comment has been minimized.

Comment thread jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java
Comment thread jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@calixtus calixtus marked this pull request as ready for review March 15, 2026 13:05
@testlens-app

This comment has been minimized.

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

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Refactor PreviewPreferences for reset/import and reorganize preview layout classes

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Refactor PreviewPreferences to enable reset and import functionality
• Move preview layout classes to logic.preview package for correct JBang compilation
• Restructure PreviewPreferences to use String instead of TextBasedPreviewLayout object
• Add PreviewLayout.of() factory method for creating layouts from configuration
• Fix null checks, migrations, and immutable list handling in preferences
• Clean up code formatting and replace unused lambda parameters with underscores
Diagram
flowchart LR
  A["PreviewPreferences<br/>Refactored"] -->|uses| B["PreviewLayout.of<br/>Factory Method"]
  B -->|creates| C["TextBasedPreviewLayout<br/>moved to logic.preview"]
  B -->|creates| D["CitationStylePreviewLayout<br/>moved to logic.preview"]
  B -->|creates| E["BstPreviewLayout<br/>moved to logic.preview"]
  A -->|enables| F["Reset Preferences"]
  A -->|enables| G["Import Preferences"]
  H["JabRefGuiPreferences"] -->|manages| A
  I["PreviewTab"] -->|configures| A
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java ✨ Enhancement +162/-197

Refactor preview preferences handling and storage

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java


2. jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java ✨ Enhancement +63/-21

Change customPreviewLayout from object to String property

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java


3. jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java ✨ Enhancement +36/-4

Add factory method for creating preview layouts

jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java


View more (20)
4. jablib/src/main/java/org/jabref/logic/preview/TextBasedPreviewLayout.java ✨ Enhancement +108/-0

Move from logic.layout to logic.preview package

jablib/src/main/java/org/jabref/logic/preview/TextBasedPreviewLayout.java


5. jablib/src/main/java/org/jabref/logic/preview/CitationStylePreviewLayout.java ✨ Enhancement +4/-2

Move from logic.citationstyle to logic.preview package

jablib/src/main/java/org/jabref/logic/preview/CitationStylePreviewLayout.java


6. jablib/src/main/java/org/jabref/logic/preview/BstPreviewLayout.java ✨ Enhancement +2/-2

Move from logic.bst to logic.preview package

jablib/src/main/java/org/jabref/logic/preview/BstPreviewLayout.java


7. jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java ✨ Enhancement +11/-10

Update to use refactored PreviewPreferences and new package locations

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java


8. jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java ✨ Enhancement +39/-19

Refactor to work with String-based custom preview layout

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java


9. jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java ✨ Enhancement +13/-4

Update imports and handle TextBasedPreviewLayout creation

jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java


10. jabgui/src/main/java/org/jabref/gui/maintable/MainTable.java Formatting +1/-2

Replace unused lambda parameter with underscore

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


11. jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java ✨ Enhancement +2/-5

Remove unused KeyBindingRepository parameter from create method

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


12. jabgui/src/main/java/org/jabref/gui/openoffice/CSLStyleSelectViewModel.java ✨ Enhancement +1/-1

Update import for CitationStylePreviewLayout to new package

jabgui/src/main/java/org/jabref/gui/openoffice/CSLStyleSelectViewModel.java


13. jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogView.java ✨ Enhancement +8/-8

Update imports and replace unused lambda parameters

jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogView.java


14. jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java ✨ Enhancement +1/-1

Update import for CitationStylePreviewLayout to new package

jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java


15. jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java Formatting +15/-3

Reformat method signatures for code style consistency

jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java


16. jabgui/src/test/java/org/jabref/migrations/GuiPreferencesMigrationsTest.java 🧪 Tests +3/-2

Update test mocks for preview style migration with default value

jabgui/src/test/java/org/jabref/migrations/GuiPreferencesMigrationsTest.java


17. jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java ✨ Enhancement +10/-0

Add getDefault factory method for preferences

jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java


18. jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java 🐞 Bug fix +4/-2

Fix mutable list handling and typo in log message

jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java


19. jablib/src/test/java/org/jabref/logic/bst/BstPreviewLayoutTest.java 🧪 Tests +1/-4

Update imports and remove unused mock objects

jablib/src/test/java/org/jabref/logic/bst/BstPreviewLayoutTest.java


20. jablib/src/test/java/org/jabref/logic/citationstyle/CitationStyleCacheTest.java 🧪 Tests +1/-7

Update imports and clean up test setup

jablib/src/test/java/org/jabref/logic/citationstyle/CitationStyleCacheTest.java


21. jabgui/src/main/java/org/jabref/gui/migrations/PreferencesMigrations.java ✨ Enhancement +0/-0

Update preview style migration with default value handling

jabgui/src/main/java/org/jabref/gui/migrations/PreferencesMigrations.java


22. jabgui/src/main/java/org/jabref/migrations/PreferencesMigrations.java Additional files +5/-4

...

jabgui/src/main/java/org/jabref/migrations/PreferencesMigrations.java


23. jablib/src/main/java/org/jabref/logic/layout/TextBasedPreviewLayout.java Additional files +0/-73

...

jablib/src/main/java/org/jabref/logic/layout/TextBasedPreviewLayout.java


Grey Divider

Qodo Logo

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

qodo-free-for-open-source-projects Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (9) 📘 Rule violations (5) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Wrong row context actions 🐞 Bug ✓ Correctness ⭐ New
Description
MainTable now creates the context menu without using the row item, while the row factory does not
select the right-clicked row before showing the menu; actions therefore operate on the
previously-selected entries rather than the entry that was right-clicked.
Code

jabgui/src/main/java/org/jabref/gui/maintable/MainTable.java[R154-157]

+                .withContextMenu(_ -> RightClickMenu.create(
                        libraryTab,
                        dialogService,
                        stateManager,
Evidence
MainTable ignores the row item when creating the context menu, and ViewModelTableRowFactory shows
the menu without updating table selection. RightClickMenu actions are wired against
StateManager/LibraryTab selection (e.g., ChangeEntryTypeMenu uses libraryTab.getSelectedEntries), so
a right-click on an unselected row can execute on the wrong entries.

jabgui/src/main/java/org/jabref/gui/maintable/MainTable.java[148-165]
jabgui/src/main/java/org/jabref/gui/util/ViewModelTableRowFactory.java[145-153]
jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[51-60]
jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[100-107]

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

### Issue description
Right-click context menu actions can operate on the wrong entries because the menu is built without using the clicked row item and selection is not updated on context-menu request.

### Issue Context
`ViewModelTableRowFactory` shows the context menu for `row.getItem()` but does not ensure that row is selected. `RightClickMenu` actions operate on `StateManager` / `libraryTab.getSelectedEntries()`.

### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/util/ViewModelTableRowFactory.java[145-170]
- jabgui/src/main/java/org/jabref/gui/maintable/MainTable.java[148-165]
- jabgui/src/main/java/org/jabref/gui/maintable/RightClickMenu.java[51-115]

### Suggested implementation direction
Option A (recommended): in `ViewModelTableRowFactory`&#x27;s `setOnContextMenuRequested`, if the row is not selected, call `tableView.getSelectionModel().clearAndSelect(row.getIndex())` (or `select(row.getIndex())` if multi-selection should be preserved) before showing the menu.

Option B: reintroduce the row-item parameter to `RightClickMenu.create(...)` and ensure actions target that entry/entries explicitly, independent of global selection.

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


2. Legacy preview cycle lost 🐞 Bug ✓ Correctness ⭐ New
Description
Loading/importing preferences drops legacy text-based preview cycle entries (e.g., "Customized
preview style") because the new preview-cycle parser only recognizes the internal name "PREVIEW";
this removes the custom preview layout from the cycle and can leave users unable to cycle back to
it.
Code

jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[R33-58]

+    @Nullable
+    static PreviewLayout of(String layout,
+                            String customPreviewLayout,
+                            List<Path> bstLayoutPaths,
+                            LayoutFormatterPreferences preferences,
+                            JournalAbbreviationRepository abbreviationRepository,
+                            BibEntryTypesManager entryTypesManager) {
+        if (CSLStyleUtils.isCitationStyleFile(layout)) {
+            return CSLStyleUtils.createCitationStyleFromFile(layout)
+                                .map(file -> (PreviewLayout) new CitationStylePreviewLayout(file, entryTypesManager))
+                                .orElse(null);
+        }
+        if (BstPreviewLayout.isBstStyleFile(layout)) {
+            return bstLayoutPaths.stream()
+                                 .filter(path -> path.endsWith(layout))
+                                 .map(BstPreviewLayout::new)
+                                 .findFirst()
+                                 .orElse(null);
+        } else if (TextBasedPreviewLayout.NAME.equals(layout)) {
+            return TextBasedPreviewLayout.of(
+                    customPreviewLayout,
+                    preferences,
+                    abbreviationRepository);
+        }
+
+        return null;
Evidence
An exported preferences sample still contains cyclePreview entries serialized as the display name
"Customized preview style". The new parsing logic (PreviewLayout.of) only treats a layout string
as text-based when it exactly equals TextBasedPreviewLayout.NAME ("PREVIEW"); otherwise it returns
null, and JabRefGuiPreferences.getPreviewLayouts filters null out. In the sample, "Customized
preview style" is therefore discarded, and only ieee.csl remains in the cycle.

jabkit/src/test/resources/jabref.xml[35-40]
jablib/src/main/java/org/jabref/logic/preview/TextBasedPreviewLayout.java[20-23]
jablib/src/main/java/org/jabref/logic/preview/TextBasedPreviewLayout.java[95-98]
jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[33-59]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[856-871]

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

### Issue description
Legacy exported preferences can contain `cyclePreview` values like `Customized preview style` for the text-based preview layout. The new loader only recognizes `TextBasedPreviewLayout.NAME` (&quot;PREVIEW&quot;), so it drops the legacy entry during parsing.

### Issue Context
- Legacy example exists in repo test resources: `jabkit/src/test/resources/jabref.xml`.
- `PreviewLayout.of` returns `null` for unknown strings.
- `JabRefGuiPreferences.getPreviewLayouts` filters out `null`, so legacy entries vanish from the cycle.

### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[33-59]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[856-871]
- jabkit/src/test/resources/jabref.xml[35-40]

### Suggested implementation direction
Implement one of:
1) **Normalize legacy values before parsing** in `JabRefGuiPreferences.getPreviewLayouts(...)`:
  - If an entry is neither a `.csl` nor `.bst` and is not `TextBasedPreviewLayout.NAME`, treat it as the text-based preview layout (map to `TextBasedPreviewLayout.NAME`).
  - This preserves text-based layouts stored under older display-name strings (including localized ones).

2) **Extend `PreviewLayout.of(...)`** to accept additional historic identifiers for the text-based preview layout:
  - accept `layout.equalsIgnoreCase(&quot;preview&quot;)`
  - accept `layout.equalsIgnoreCase(&quot;customized preview style&quot;)`
  - (Optionally) accept other previously stored variants if known.

Add/adjust a test that loads `cyclePreview=&quot;Customized preview style;ieee.csl&quot;` and verifies the resulting layout cycle contains a `TextBasedPreviewLayout` plus the CSL style.

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


3. Preview cycle addAll crash 🐞 Bug ⛯ Reliability
Description
JabRefGuiPreferences#getPreviewLayouts mutates the List returned by getStringList(PREVIEW_CYCLE);
when the stored value is blank, getStringList returns an immutable List.of(), so cycle.addAll(...)
throws UnsupportedOperationException and preview preferences fail to load.
Code

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[R853-857]

+    private List<PreviewLayout> getPreviewLayouts(List<String> cycle, String customPreviewLayout) {
       // For backwards compatibility always add at least the default preview to the cycle
       if (cycle.isEmpty()) {
-            cycle.add("Preview");
+            cycle.addAll(List.of(TextBasedPreviewLayout.NAME, CSLStyleLoader.DEFAULT_STYLE));
       }
Evidence
Reset sets PreviewPreferences to defaults (empty layout cycle). The preview layout cycle listener
persists that empty cycle to PREVIEW_CYCLE (blank string). Later, getStringList reads a blank value
and convertStringToList returns List.of() (immutable). getPreviewLayouts then calls addAll on that
list, which will throw UnsupportedOperationException.

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[284-306]
jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[46-70]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[803-818]
jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[856-862]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[853-869]

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

## Issue description
`JabRefGuiPreferences#getPreviewLayouts` calls `cycle.addAll(...)` when the cycle is empty. When the stored preference is blank, `getStringList(...)` returns an immutable `List.of()`; mutating it throws `UnsupportedOperationException` and prevents preview preferences from loading.
### Issue Context
Reset currently writes an empty cycle to the backing store, making it likely that PREVIEW_CYCLE becomes blank and triggers this path.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[822-869]
- jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[856-862]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[284-306]

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


View more (4)
4. Custom preview not reset 🐞 Bug ✓ Correctness
Description
PreviewPreferences#setAll does not copy customPreviewLayout, so reset/import via setAll keeps the
old custom preview style in memory and may leave backing store/UI inconsistent.
Code

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[R63-70]

+    public void setAll(PreviewPreferences previewPreferences) {
+        this.layoutCycle.setAll(previewPreferences.layoutCycle);
+        this.layoutCyclePosition.setValue(previewPreferences.layoutCyclePosition.getValue());
+        this.showPreviewAsExtraTab.setValue(previewPreferences.showPreviewAsExtraTab.getValue());
+        this.showPreviewEntryTableTooltip.setValue(previewPreferences.showPreviewEntryTableTooltip.getValue());
+        this.bstPreviewLayoutPaths.setAll(previewPreferences.bstPreviewLayoutPaths);
+        this.shouldDownloadCovers.setValue(previewPreferences.shouldDownloadCovers.getValue());
   }
Evidence
PreviewPreferences contains a customPreviewLayout property but setAll updates other fields and never
assigns it, so any caller using setAll (e.g., clear/reset) will not update the custom layout string.

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[20-70]

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

## Issue description
`PreviewPreferences#setAll` does not copy `customPreviewLayout`, so reset/import workflows using `setAll` do not actually reset/import the custom preview style.
### Issue Context
`customPreviewLayout` is now a `StringProperty` and must be explicitly copied when performing a bulk update.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[63-70]

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


5. Immutable BST paths list 🐞 Bug ⛯ Reliability
Description
PreviewPreferences wraps bstPreviewLayoutPaths with FXCollections.observableList; when constructed
from PreviewPreferences.getDefault() (List.of()), later mutations like setBstPreviewLayoutPaths can
throw UnsupportedOperationException on fresh profiles where PREVIEW_BST_LAYOUT_PATHS is absent.
Code

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[R30-55]

   public PreviewPreferences(List<PreviewLayout> layoutCycle,
                             int layoutCyclePosition,
-                              TextBasedPreviewLayout customPreviewLayout,
-                              String defaultCustomPreviewLayout,
+                              String customPreviewLayout,
                             boolean showPreviewAsExtraTab,
                             boolean showPreviewEntryTableTooltip,
                             List<Path> bstPreviewLayoutPaths,
                             boolean shouldDownloadCovers) {
       this.layoutCycle = FXCollections.observableArrayList(layoutCycle);
       this.layoutCyclePosition = new SimpleIntegerProperty(layoutCyclePosition);
-        this.customPreviewLayout = new SimpleObjectProperty<>(customPreviewLayout);
-        this.defaultCustomPreviewLayout = new SimpleStringProperty(defaultCustomPreviewLayout);
+        this.customPreviewLayout = new SimpleStringProperty(customPreviewLayout);
       this.showPreviewAsExtraTab = new SimpleBooleanProperty(showPreviewAsExtraTab);
       this.showPreviewEntryTableTooltip = new SimpleBooleanProperty(showPreviewEntryTableTooltip);
       this.bstPreviewLayoutPaths = FXCollections.observableList(bstPreviewLayoutPaths);
-        this.shouldDownloadCovers.set(shouldDownloadCovers);
+        this.shouldDownloadCovers = new SimpleBooleanProperty(shouldDownloadCovers);
+    }
+
+    private PreviewPreferences() {
+        this(
+                List.of(),  // Layout cycle - list of predefined layouts, see getDefault(LayoutFormatterPreferences, JournalAbbreviationRepository)
+                0,          // Layout cycle position
+                TextBasedPreviewLayout.DEFAULT,
+                false,      // Show preview as an extra tab
+                false,      // Show the preview entry table tooltip
+                List.of(),  // BST-Paths
+                false       // Download cover images disabled per default - similar to Mr. DLib; see [org.jabref.logic.preferences.JabRefCliPreferences.ACCEPT_RECOMMENDATIONS].
+        );
Evidence
The default PreviewPreferences instance uses List.of() for BST paths and the constructor wraps it
using FXCollections.observableList, which delegates mutations to the backing list. On fresh
profiles, JabRefGuiPreferences uses defaults.getBstPreviewLayoutPaths() when the preference key is
absent, propagating the immutable backing list into the actual PreviewPreferences instance; later
setBstPreviewLayoutPaths(...).setAll(...) mutates it and can fail.

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[30-56]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[829-836]
jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[146-152]

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

## Issue description
`bstPreviewLayoutPaths` is currently an observable view over the passed-in list. When that passed-in list is immutable (e.g., `List.of()` from defaults), later mutations (`setAll`, `setBstPreviewLayoutPaths`) can throw `UnsupportedOperationException`.
### Issue Context
Fresh profiles without `PREVIEW_BST_LAYOUT_PATHS` use `defaults.getBstPreviewLayoutPaths()`, which originates from `PreviewPreferences.getDefault()` and currently uses `List.of()`.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[30-56]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[829-836]
- jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[146-152]

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


6. Custom style overwritten 🐞 Bug ✓ Correctness
Description
PreviewTabViewModel#setValues injects a TextBasedPreviewLayout built from
TextBasedPreviewLayout.DEFAULT when PREVIEW isn’t in the chosen cycle; storeSettings then persists
this default text into PreviewPreferences.customPreviewLayout, overwriting any existing user custom
style just by opening/saving preferences.
Code

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java[R131-137]

       availableListProperty.clear();
       if (chosenListProperty.stream().noneMatch(TextBasedPreviewLayout.class::isInstance)) {
-            availableListProperty.getValue().add(previewPreferences.getCustomPreviewLayout());
+            availableListProperty.getValue().add(TextBasedPreviewLayout.of(
+                    TextBasedPreviewLayout.DEFAULT,
+                    preferences.getLayoutFormatterPreferences(),
+                    abbreviationRepository));
       }
Evidence
When chosen layouts contain no TextBasedPreviewLayout, the view model adds a DEFAULT
TextBasedPreviewLayout into the available list. findLayoutByName checks available layouts first, so
storeSettings will find that DEFAULT layout and write its text to preferences.customPreviewLayout,
overwriting the user’s stored custom layout text.

jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java[123-137]
jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java[193-220]

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 preferences UI can overwrite the user’s saved custom preview style with the built-in default just by opening and saving the Preview preferences tab when the PREVIEW layout is not currently selected.
### Issue Context
`findLayoutByName` searches available layouts first, so the injected DEFAULT layout becomes the source of truth during `storeSettings`.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java[123-137]
- jabgui/src/main/java/org/jabref/gui/preferences/preview/PreviewTabViewModel.java[193-220]

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


7. Import keeps stale preview 🐞 Bug ✓ Correctness
Description
JabRefGuiPreferences#importPreferences does not refresh PreviewPreferences, so if PreviewPreferences
was already instantiated earlier in the UI, importing preferences will not update the in-memory
preview settings.
Code

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[R312-318]

       // in case of incomplete or corrupt xml fall back to current preferences
       getDonationPreferences().setAll(getDonationPreferencesFromBackingStore(getDonationPreferences()));
       getEntryEditorPreferences().setAll(getEntryEditorPreferencesFromBackingStore(getEntryEditorPreferences()));
-        getGroupsPreferences().setAll(getGroupsPreferencesfromBackingStore(getGroupsPreferences()));
+        getGroupsPreferences().setAll(getGroupsPreferencesFromBackingStore(getGroupsPreferences()));
       getCopyToPreferences().setAll(getCopyToPreferencesFromBackingStore(getCopyToPreferences()));
       getGuiPreferences().setAll(getCoreGuiPreferencesFromBackingStore(getGuiPreferences()));
       getSpecialFieldsPreferences().setAll(getSpecialFieldsPreferencesFromBackingStore(getSpecialFieldsPreferences()));
Evidence
getPreviewPreferences returns a cached instance once created; importPreferences refreshes many
preference objects via setAll(backingStoreRead) but omits preview. Since preview is used in the UI
(e.g., PreviewWithSourceTab), it is likely instantiated before import, leaving it stale after
import.

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[804-810]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[308-330]
jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java[39-46]

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

## Issue description
After importing preferences, the in-memory `PreviewPreferences` instance can remain stale because `importPreferences` does not refresh it, unlike most other preference groups.
### Issue Context
`getPreviewPreferences()` caches the instance after first use, and preview preferences are used throughout the UI before import.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[308-330]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[803-847]

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



Remediation recommended

8. Trivial comment Temporary dummy 📘 Rule violation ✧ Quality ⭐ New
Description
A new comment describes the code as a temporary dummy rather than explaining the
rationale/constraints. This adds noise and does not capture a durable 'why'.
Code

jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java[R30-36]

+    /// Temporary dummy for PreviewPreferences
+    public static LayoutFormatterPreferences getDefault() {
+        return new LayoutFormatterPreferences(
+                new NameFormatterPreferences(List.of(), List.of()),
+                new DOIPreferences(false, ""),
+                new SimpleStringProperty(""));
+    }
Evidence
PR Compliance ID 6 requires comments to explain intent/rationale; the added comment is
process-oriented and does not explain why this default is safe/needed or when it can be removed.

AGENTS.md
jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java[30-36]

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

## Issue description
A newly added comment is trivial/process-oriented and does not explain the rationale (&#x27;why&#x27;).

## Issue Context
Comments should capture intent and constraints so future maintainers understand why a fallback/default exists.

## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java[30-36]

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


9. clear() preview reset untested 📘 Rule violation ⛯ Reliability ⭐ New
Description
Preference reset/import behavior is extended to include preview preferences, but no corresponding
test changes are shown for these behavioral updates. This risks regressions where reset/import
silently fails or restores incorrect preview state.
Code

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[R305-308]

+        getPreviewPreferences().setAll(PreviewPreferences.getDefaultWithStyles(
+                getLayoutFormatterPreferences(),
+                Injector.instantiateModelOrService(JournalAbbreviationRepository.class),
+                Injector.instantiateModelOrService(BibEntryTypesManager.class)));
Evidence
PR Compliance ID 23 requires updating/adding tests for behavior changes; the PR changes clear()
and importPreferences(...) to set preview preferences, but the diff does not show tests being
added/updated to cover these new behaviors.

AGENTS.md
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[305-308]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[333-333]

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 PR changes preference reset/import behavior to include preview preferences, but the diff does not show tests covering these behavior changes.

## Issue Context
Reset/import are user-facing workflows and regressions can be subtle (e.g., preview cycle empty, wrong selected layout, missing defaults).

## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[305-308]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[333-333]

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


10. getPreviewWithSourceTab signature reformat 📘 Rule violation ⛯ Reliability
Description
The PR reformats method signatures into multi-line parameter lists without functional changes,
making the diff larger and less reviewable. This violates the requirement to avoid cosmetic-only
formatting changes unrelated to behavior changes.
Code

jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java[R31-35]

+    public TabPane getPreviewWithSourceTab(BibEntry entry,
+                                           BibDatabaseContext bibDatabaseContext,
+                                           GuiPreferences preferences,
+                                           BibEntryTypesManager entryTypesManager,
+                                           PreviewViewer previewViewer) {
Evidence
PR Compliance ID 3 forbids cosmetic-only reformatting; the changed lines only wrap parameters across
multiple lines while keeping the same method behavior.

AGENTS.md
jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java[31-35]

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

## Issue description
Method signatures were reformatted (parameter wrapping) without functional changes, increasing diff noise and reducing reviewability.
## Issue Context
Compliance requires avoiding cosmetic-only reformatting unrelated to functional modifications.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/collab/entrychange/PreviewWithSourceTab.java[31-35]

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


View more (4)
11. Collectors.toList() used in new code 📘 Rule violation ⛯ Reliability
Description
New code uses Collectors.toList() where the modern Stream.toList() is available under the modern
Java toolchain expectation. This introduces an outdated pattern inconsistent with the checklist’s
modern Java guidance.
Code

jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[R831-833]

+            bstPaths = getStringList(PREVIEW_BST_LAYOUT_PATHS).stream()
+                                                              .map(Path::of)
+                                                              .collect(Collectors.toList());
Evidence
PR Compliance ID 1 expects modern Java best-practice APIs; the added stream terminal operation uses
collect(Collectors.toList()) instead of toList() in newly introduced code.

AGENTS.md
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[831-833]

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

## Issue description
New code uses `collect(Collectors.toList())` instead of the modern `Stream.toList()`.
## Issue Context
The project targets a modern Java toolchain; newly introduced code should prefer modern standard library APIs.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[831-833]

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


12. Logic changes lack tests 📘 Rule violation ✓ Correctness
Description
The PR changes core org.jabref.logic behavior/API surface (e.g., new PreviewLayout.of(...)
factory) without adding/updating tests in the PR diff. This increases regression risk for preview
layout selection and parsing logic.
Code

jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[R36-62]

+    @Nullable
+    static PreviewLayout of(String layout,
+                            String customPreviewLayout,
+                            List<Path> bstLayoutPaths,
+                            LayoutFormatterPreferences preferences,
+                            JournalAbbreviationRepository abbreviationRepository,
+                            BibEntryTypesManager entryTypesManager) {
+        if (CSLStyleUtils.isCitationStyleFile(layout)) {
+            return CSLStyleUtils.createCitationStyleFromFile(layout)
+                                .map(file -> (PreviewLayout) new CitationStylePreviewLayout(file, entryTypesManager))
+                                .orElse(null);
+        }
+        if (BstPreviewLayout.isBstStyleFile(layout)) {
+            return bstLayoutPaths.stream()
+                                 .filter(path -> path.endsWith(layout))
+                                 .map(BstPreviewLayout::new)
+                                 .findFirst()
+                                 .orElse(null);
+        } else if (TextBasedPreviewLayout.NAME.equals(layout)) {
+            return TextBasedPreviewLayout.of(
+                    customPreviewLayout,
+                    preferences,
+                    abbreviationRepository);
+        }
+
+        return null;
+    }
Evidence
PR Compliance IDs 26 and 32 require updating/adding tests when behavior changes occur in
org.jabref.logic; the PR adds a new factory method and control-flow returning null, but no
corresponding test updates are shown in the PR changes provided.

AGENTS.md
AGENTS.md
jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[36-62]

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

## Issue description
Core logic was modified (new preview layout factory and related behavior), but no tests were added/updated in the provided PR changes.
## Issue Context
Changes in `org.jabref.logic` should be covered by deterministic unit tests to prevent regressions in preview layout resolution (citation style, BST, text-based layout).
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java[36-62]

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


13. Clipboard ignores custom style 🐞 Bug ✓ Correctness
Description
ClipboardContentGenerator falls back to TextBasedPreviewLayout.DEFAULT when there is no
TextBasedPreviewLayout in the layout cycle, ignoring the separately stored
PreviewPreferences.customPreviewLayout string, so copied citations can be formatted with the wrong
style.
Code

jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java[R135-142]

+        Optional<TextBasedPreviewLayout> layoutOpt = previewPreferences.getLayoutCycle().stream()
+                                                                       .filter(TextBasedPreviewLayout.class::isInstance)
+                                                                       .map(TextBasedPreviewLayout.class::cast)
+                                                                       .findFirst();
+        TextBasedPreviewLayout customPreviewLayout = layoutOpt.orElse(TextBasedPreviewLayout.of(
+                TextBasedPreviewLayout.DEFAULT,
+                layoutFormatterPreferences,
+                abbreviationRepository));
Evidence
The clipboard citation generator only looks for a TextBasedPreviewLayout instance inside layoutCycle
and otherwise uses DEFAULT; it does not consult PreviewPreferences.getCustomPreviewLayout(), so a
user-custom style stored outside the cycle is not applied.

jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java[134-143]

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

## Issue description
Clipboard citations use the default text-based layout when PREVIEW is not part of the current layout cycle, even if the user has a custom preview style saved.
### Issue Context
The custom preview style is now stored as a string in `PreviewPreferences` and should be used as the fallback formatting source.
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preview/ClipboardContentGenerator.java[134-143]

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


14. Dummy preview fallback deps 🐞 Bug ✓ Correctness
Description
PreviewPreferences#getSelectedPreviewLayout constructs a fallback TextBasedPreviewLayout using
LayoutFormatterPreferences.getDefault and a new JournalAbbreviationRepository demo instance, which
can render previews with incorrect formatting/abbreviations when the cycle is empty or the position
is invalid (e.g., after reset).
Code

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[R97-105]

       if (layoutCycle.isEmpty()
               || layoutCyclePosition.getValue() < 0
               || layoutCyclePosition.getValue() >= layoutCycle.size()) {
-            return getCustomPreviewLayout();
+            // Fallback layout
+            return new TextBasedPreviewLayout(
+                    TextBasedPreviewLayout.DEFAULT,
+                    LayoutFormatterPreferences.getDefault(),
+                    new JournalAbbreviationRepository());
       } else {
Evidence
The fallback uses dummy defaults and a demo abbreviation repository rather than the application’s
configured instances. JournalAbbreviationRepository’s default constructor is explicitly for
demonstration data, and LayoutFormatterPreferences.getDefault is labeled as a temporary dummy.

jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[96-105]
jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java[30-36]
jablib/src/main/java/org/jabref/logic/journals/JournalAbbreviationRepository.java[59-71]

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

## Issue description
`PreviewPreferences#getSelectedPreviewLayout` uses dummy dependencies for fallback rendering, which can produce incorrect previews.
### Issue Context
This path is exercised when the cycle is empty/invalid (e.g., after reset).
### Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/preview/PreviewPreferences.java[96-105]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[822-869]

ⓘ 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

@calixtus calixtus added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 15, 2026
Comment thread jabgui/src/main/java/org/jabref/gui/maintable/MainTable.java
Comment thread jablib/src/main/java/org/jabref/logic/preview/PreviewLayout.java
@testlens-app

This comment has been minimized.

@testlens-app

testlens-app Bot commented Mar 15, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 2423905
▶️ Tests: 10160 executed
⚪️ Checks: 57/57 completed


Learn more about TestLens at testlens.app.

@Siedlerchr Siedlerchr enabled auto-merge March 15, 2026 14:43
@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 15, 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 15, 2026
Merged via the queue into main with commit dcb5a2f Mar 15, 2026
58 checks passed
@Siedlerchr Siedlerchr deleted the migrate-previewprefs branch March 15, 2026 15:11
Syimyk43 pushed a commit to Syimyk43/jabref that referenced this pull request Mar 15, 2026
* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Mar 15, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes #13125

* Update CHANGELOG for #13125

* Fix case-insensitive DOI comparison in duplicate detection (#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes #15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes #15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes #15029

* Update CHANGELOG for issue #15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (#15027) (#15255)

* Select better value in MultiMergeEntries dialog component (#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (#15309)

* Closes #14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging #14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes JabRef#13125

* Update CHANGELOG for JabRef#13125

* Fix case-insensitive DOI comparison in duplicate detection (JabRef#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (JabRef#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (JabRef#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (JabRef#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (JabRef#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (JabRef#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (JabRef#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (JabRef#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (JabRef#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes JabRef#15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (JabRef#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (JabRef#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (JabRef#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (JabRef#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes JabRef#15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes JabRef#15029

* Update CHANGELOG for issue JabRef#15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (JabRef#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (JabRef#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (JabRef#15027) (JabRef#15255)

* Select better value in MultiMergeEntries dialog component (JabRef#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (JabRef#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (JabRef#15309)

* Closes JabRef#14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging JabRef#14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
* Close entry editor when last library is closed

When no library tab is active, the entry editor remained visible.
Added close() call in the activeTabProperty listener's else branch
to handle the zero-libraries-open case.

Fixes JabRef#13125

* Update CHANGELOG for JabRef#13125

* Fix case-insensitive DOI comparison in duplicate detection (JabRef#12967)

* Chore(deps): Bump org.gradlex:java-module-dependencies in /build-logic (JabRef#15328)

Bumps [org.gradlex:java-module-dependencies](https://github.com/gradlex-org/java-module-dependencies) from 1.12 to 1.12.1.
- [Release notes](https://github.com/gradlex-org/java-module-dependencies/releases)
- [Changelog](https://github.com/gradlex-org/java-module-dependencies/blob/main/CHANGELOG.md)
- [Commits](gradlex-org/java-module-dependencies@v1.12...v1.12.1)

---
updated-dependencies:
- dependency-name: org.gradlex:java-module-dependencies
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.openrewrite.rewrite from 7.26.0 to 7.28.1 (JabRef#15326)

Bumps org.openrewrite.rewrite from 7.26.0 to 7.28.1.

---
updated-dependencies:
- dependency-name: org.openrewrite.rewrite
  dependency-version: 7.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.mockito:mockito-core in /versions (JabRef#15330)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.22.0 to 5.23.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.22.0...v5.23.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.cyclonedx.bom from 3.2.0 to 3.2.1 (JabRef#15327)

Bumps org.cyclonedx.bom from 3.2.0 to 3.2.1.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump com.squareup.okio:okio-jvm in /versions (JabRef#15329)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.16.4 to 3.17.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.16.4...parent-3.17.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* New translations jabref_en.properties (Italian) (JabRef#15334)

* RIS export SP/EP fields when pages contain Unicode en-dash or em-dash (JabRef#15315)

* Extend the split regex to match en-dash and em-dash

* Added tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Remove object redundancy, miscellaneous refactoring (JabRef#15332)

* Remove object redundancy, miscellaneous refactoring

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use abbreviationRepository parameter

Signed-off-by: subhramit <subhramit.bb@live.in>

* Use less injections for journal abbreviations repository

Signed-off-by: subhramit <subhramit.bb@live.in>

* Indent

Signed-off-by: subhramit <subhramit.bb@live.in>

* Revert to codepoint

---------

Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* Add drag-and-drop support for Citation Relations tab (JabRef#15181)

* Add drag-and-drop support for Citation Relations tab

- Implement drag detection in CitationRelationsTab to allow dragging entries
- Add drag support to ViewModelListCellFactory
- Fix NullPointerException in FrameDndHandler when dropping onto tabs without IDs
- Fixes JabRef#15135

* Fix: correctly set drop completion status for entries

* Fix: Add Unreleased section and moved changelog entries

* Fix CHANGELOG formatting and upstream linter errors; removed empty groups

* Fix code consistency for cr

* Add explicit type

* Consistency in CHANGELOG.md

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Update dependency org.eclipse.jgit:org.eclipse.jgit.pgm to v7.6.0.202603022253-r (JabRef#15335)

* Chore(deps): Bump org.cyclonedx.bom from 3.2.1 to 3.2.2 (JabRef#15337)

Bumps org.cyclonedx.bom from 3.2.1 to 3.2.2.

---
updated-dependencies:
- dependency-name: org.cyclonedx.bom
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Chore(deps): Bump org.eclipse.jgit:org.eclipse.jgit in /versions (JabRef#15338)

Bumps [org.eclipse.jgit:org.eclipse.jgit](https://github.com/eclipse-jgit/jgit) from 7.5.0.202512021534-r to 7.6.0.202603022253-r.
- [Commits](eclipse-jgit/jgit@v7.5.0.202512021534-r...v7.6.0.202603022253-r)

---
updated-dependencies:
- dependency-name: org.eclipse.jgit:org.eclipse.jgit
  dependency-version: 7.6.0.202603022253-r
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 'All' citation fetcher that aggregates results from all providers (JabRef#15292)

* Add 'All' citation fetcher that aggregates and deduplicates results from all providers

- Implements CitationFetcher as AllCitationFetcher aggregating CrossRef,
  OpenAlex, OpenCitations, and SemanticScholar
- Deduplicates results using DuplicateCheck with BibDatabaseMode.BIBTEX
- Returns maximum citation count across all providers
- Tolerates individual provider failures gracefully
- Adds ALL entry to CitationFetcherType enum and factory method
- Covers behaviour with unit tests (failure tolerance, deduplication, max count)

Closes JabRef#15029

* Add 'All' citation fetcher that aggregates results from all providers

- Add ALL as first entry in CitationFetcherType enum
- Implement AllCitationFetcher aggregating CrossRef, OpenAlex,
  OpenCitations, and SemanticScholar
- Union results using DatabaseMerger with keyword separator from
  ImportFormatPreferences, as specified in the task
- Return maximum citation count across all providers
- Tolerate individual provider failures gracefully
- Fix race condition in SearchCitationsRelationsService by marking
  citationFetcher and citationCountFetcher fields as volatile
- Set ALL as the default citation fetcher in preferences
- Add unit tests covering failure tolerance, deduplication, and
  max citation count

Closes JabRef#15029

* Update CHANGELOG for issue JabRef#15029

* Address bot review: fix AllCitationFetcher and improve tests

- Build provider list from CitationFetcherType enum (excluding ALL)
  to avoid duplicate list that can drift when new providers are added
- Track anySuccess in fetch() and getCitationCount(); throw
  FetcherException when all providers fail instead of silently
  returning empty results
- Emit WARN log when some providers fail but others succeed
- Rename test variables to intent-revealing names
- Fix citation count assertion to use assertEquals(Optional.of(20))
- Add tests for all-providers-fail and partial-failure scenarios

* Trigger CI

* Reformat AllCitationFetcher

* Fix checkstyle: remove blank line at start of constructor block

* Reverted back to semantic scholar ui preference

* Revert default citation fetcher to SEMANTIC_SCHOLAR in EntryEditorPreferences

* Re-trigger CI

* Adapt tests to use real constructor with mocks, remove test constructor

* fix unchecked excpetion

---------

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Avoid error logs when search queries are incomplete (JabRef#15333)

* Avoid error logs when search queries are incomplete

Log the parsing error at debug level instead of error level. This prevents having
unnecessary output when user is still entering input like "title =".

* Update changelog for fixing incomplete search logging issue

* Update changelog entry for incomplete search logging issue

* Refine changelog entry for incomplete search logging issue

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom from 3.24.0 to 3.25.0 (JabRef#15217)

* Chore(deps): Bump org.openrewrite.recipe:rewrite-recipe-bom

Bumps [org.openrewrite.recipe:rewrite-recipe-bom](https://github.com/openrewrite/rewrite-recipe-bom) from 3.24.0 to 3.25.0.
- [Release notes](https://github.com/openrewrite/rewrite-recipe-bom/releases)
- [Commits](openrewrite/rewrite-recipe-bom@v3.24.0...v3.25.0)

---
updated-dependencies:
- dependency-name: org.openrewrite.recipe:rewrite-recipe-bom
  dependency-version: 3.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* udpate plugin

* update rewrite

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>

* Select better value in MultiMergeEntries dialog component (JabRef#15027) (JabRef#15255)

* Select better value in MultiMergeEntries dialog component (JabRef#15027)

* Use PlausibilityComparatorFactory in MultiMergeEntriesViewModel
to select the more plausible value when merging fields from
multiple sources, instead of always keeping the first-seen value.

* Add DateFieldPlausibilityComparator to prefer more specific dates.

* Add unit tests for DateFieldPlausibilityComparator

* implement review comments

* Fix trailing whitespace in MultiMergeEntriesViewModelTest

* Trigger CI

* CI: re-trigger

* CI: re-trigger

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Fix reset and import for PreviewPreferences (JabRef#15306)

* Cleanups

* Refactor PreviewPreferences for resetting and import

* Some null checks and migrations

* Fix wrong notnull

* Fix import

* Avoid addAll crash on immutable List

* Add forgotten customPreviewLayout

* Fix artifact from code iteration

* Refactor for consistency

* Fix artifact from code iteration

* Enhance dummy fallback layout

* Try to fix jbang

* Apply IDE suggestions

* Fix weird checkstyle behaviour

* Add default styles

* Fix migration tests

* Add tests

* Small cleanups

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>

* Fix javadoc markdown artifacts (JabRef#15309)

* Closes JabRef#14897
This incorporates all the pending old Javadoc to  Markdown changes required after merging JabRef#14891.The following files are changed:
1.AutoCompletionTextInputBinding.java
2.JabRefCliPreferences.java
3.SearchBasedParserFetcher.java
4.StartNewStudyAction.java
                                             1.

* 1.

* Rsolved mix up of endregion and endRegion.Final one is endregion.
1.File changed-JabRefCliPreferences.java

* Rsolved format issue related to line space.Files changed.
1.JabRefCliPreferences.java
2.SearchBasedParserFetcher.java

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Added // endregion to maintain sync with region:AI
  And // region Push to application preferences and //region to Git
2.Changed region: to region
3.Changed region: Cleanup to previous ToDo: Cleanup
4.changed endRegion to end region
5.Adjusted  dangling // endregion by merging Imported Preference tag(new one) with Other Preferences(old one)

* Files changed.
1.JabRefCliPreferences.java.
The following changes are done:-
1.Apply IntelliJ formatting

* Update CHANGELOG for JabRef#12967

* Apply case-insensitive comparison only to DOI identifiers

* Apply IntelliJ code formatting to DuplicateCheck and DuplicateCheckTest

* Add tests for case-insensitive DOI duplicate detection

* Fix case-insensitive DOI comparison in duplicate detection

* fix formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Faneesh Juneja <willowstration@gmail.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Co-authored-by: Paul <thecoder777.github@gmail.com>
Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Nishant Dasgupta <nishant.24bcs10451@sst.scaler.com>
Co-authored-by: Mike Zhang <97817030+mikezhanghaozhe@users.noreply.github.com>
Co-authored-by: JunWang222 <70090336+JunWang222@users.noreply.github.com>
Co-authored-by: AbhijitBhowmick <94289124+AbhijitBhowmick@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: entry-preview component: preferences dev: code-quality Issues related to code or architecture decisions 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.

Implement resetting for one preference in JabRefGuiPreferences

2 participants