Skip to content

Fix reset for FilePreferences and InternalPreferences#15827

Merged
calixtus merged 18 commits into
mainfrom
filePreferences-import
May 29, 2026
Merged

Fix reset for FilePreferences and InternalPreferences#15827
calixtus merged 18 commits into
mainfrom
filePreferences-import

Conversation

@calixtus

@calixtus calixtus commented May 25, 2026

Copy link
Copy Markdown
Member

Related issues and pull requests

Follow-up to #15522

PR Description

  • Fix import and resetting of FilePreferences

  • Fix import and resetting of InternalPreferences

  • Simplified handling of UserHostInfo in Preferences

  • Simplified handling of Paths in Preferences (possible minor regression, if no path is save, standard path "/" is assumed)

  • Reworked and reordered test artifact, to streamline test subject (b561af9)

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

Steps to test

Run Jabref
Open preferences
Reset
See Linked file preferences tab reset

AI usage

Assisted by Claude Code (model claude-sonnet-4-6, fixed, enhanced and partially reverted by Human Intelligence (me)

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • I manually tested my changes in running JabRef (always required)
  • [.] I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • [.] I added 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

@calixtus calixtus added dev: code-quality Issues related to code or architecture decisions component: preferences labels May 25, 2026
Comment thread jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java Outdated
@calixtus calixtus marked this pull request as ready for review May 25, 2026 20:13
@calixtus calixtus added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 25, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Refactor FilePreferences and InternalPreferences to use typed objects

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Convert FilePreferences to use Path objects instead of Strings
• Refactor InternalPreferences to use UserHostInfo objects directly
• Extract getUserHostInfo method to OS class for centralized user/host retrieval
• Fix preferences reset and import functionality for FilePreferences and InternalPreferences
• Simplify preferences initialization with default factory methods and setAll patterns
Diagram
flowchart LR
  A["FilePreferences<br/>String mainFileDirectory"] -->|Convert to Path| B["FilePreferences<br/>Path mainFileDirectory"]
  C["InternalPreferences<br/>String userAndHost"] -->|Convert to UserHostInfo| D["InternalPreferences<br/>UserHostInfo userHostInfo"]
  E["OS class"] -->|Extract method| F["getUserHostInfo<br/>returns UserHostInfo"]
  B -->|Bind to| D
  F -->|Provides| D
  G["Preferences Reset/Import"] -->|Use setAll| H["Consistent state restoration"]

Loading

File Changes

1. jablib/src/main/java/org/jabref/logic/FilePreferences.java ✨ Enhancement +88/-19

Convert mainFileDirectory from String to Path type

jablib/src/main/java/org/jabref/logic/FilePreferences.java


2. jablib/src/main/java/org/jabref/logic/InternalPreferences.java ✨ Enhancement +31/-20

Convert userAndHost from String to UserHostInfo type

jablib/src/main/java/org/jabref/logic/InternalPreferences.java


3. jablib/src/main/java/org/jabref/logic/os/OS.java ✨ Enhancement +10/-1

Extract getUserHostInfo method for centralized retrieval

jablib/src/main/java/org/jabref/logic/os/OS.java


View more (15)
4. jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java 🐞 Bug fix +58/-85

Update preferences initialization and reset logic

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


5. jablib/src/main/java/org/jabref/logic/layout/LayoutFormatterPreferences.java ✨ Enhancement +7/-6

Update mainFileDirectory property to use Path type

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


6. jablib/src/main/java/org/jabref/logic/layout/format/FileLink.java ✨ Enhancement +3/-3

Update mainFileDirectory parameter to Path type

jablib/src/main/java/org/jabref/logic/layout/format/FileLink.java


7. jablib/src/main/java/org/jabref/logic/layout/format/WrapFileLinks.java ✨ Enhancement +3/-3

Update mainFileDirectory field to Path type

jablib/src/main/java/org/jabref/logic/layout/format/WrapFileLinks.java


8. jablib/src/main/java/org/jabref/model/database/BibDatabaseContext.java 🐞 Bug fix +1/-1

Remove Optional wrapper from getMainFileDirectory call

jablib/src/main/java/org/jabref/model/database/BibDatabaseContext.java


9. jabgui/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTabViewModel.java 🐞 Bug fix +2/-2

Update to handle Path type for mainFileDirectory

jabgui/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTabViewModel.java


10. jabgui/src/main/java/org/jabref/gui/welcome/quicksettings/viewmodel/MainFileDirectoryDialogViewModel.java ✨ Enhancement +3/-13

Simplify path handling with Path type conversion

jabgui/src/main/java/org/jabref/gui/welcome/quicksettings/viewmodel/MainFileDirectoryDialogViewModel.java


11. jabgui/src/main/java/org/jabref/gui/fieldeditors/contextmenu/MoveFileSubmenuFactory.java 🐞 Bug fix +1/-3

Remove Optional wrapper from getMainFileDirectory

jabgui/src/main/java/org/jabref/gui/fieldeditors/contextmenu/MoveFileSubmenuFactory.java


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

Update to use getUserHostInfo method

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


13. jabgui/src/test/java/org/jabref/migrations/GuiPreferencesMigrationsTest.java 🧪 Tests +1/-1

Update test to use getUserHostInfo method

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


14. jablib/src/test/java/org/jabref/logic/externalfiles/FileTestConfiguration.java 🧪 Tests +2/-3

Update mock to return Path instead of Optional

jablib/src/test/java/org/jabref/logic/externalfiles/FileTestConfiguration.java


15. jablib/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java 🧪 Tests +1/-2

Simplify getUserHostInfo call in test

jablib/src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java


16. jablib/src/test/java/org/jabref/logic/importer/fileformat/pdf/PdfMergeMetadataImporterTest.java 🧪 Tests +1/-1

Update mock to return Path instead of Optional

jablib/src/test/java/org/jabref/logic/importer/fileformat/pdf/PdfMergeMetadataImporterTest.java


17. jablib/src/test/java/org/jabref/logic/layout/format/FileLinkTest.java 🧪 Tests +2/-1

Update test to use Path type for mainFileDirectory

jablib/src/test/java/org/jabref/logic/layout/format/FileLinkTest.java


18. jablib/src/test/java/org/jabref/logic/layout/format/WrapFileLinksTest.java 🧪 Tests +4/-4

Update test to use Path type for mainFileDirectory

jablib/src/test/java/org/jabref/logic/layout/format/WrapFileLinksTest.java


Grey Divider

Qodo Logo

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

qodo-free-for-open-source-projects Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

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

Grey Divider


Action required

1. withMainFileDirectory sets wrong property ✓ Resolved 📘 Rule violation ≡ Correctness
Description
FilePreferences.withMainFileDirectory incorrectly assigns the provided path to workingDirectory
(and even uses a misleading parameter name), so callers attempting to reset/import the main file
directory do not actually update it and may instead overwrite the working directory setting. This
breaks expected preference reset behavior (including the GUI reset path) and makes the API naming
inconsistent and misleading.
Code

jablib/src/main/java/org/jabref/logic/FilePreferences.java[R384-387]

Evidence
The cited code adds a builder method named withMainFileDirectory(Path lastUsedDirectory) but it
writes to the workingDirectory field, which contradicts the method name and the compliance
expectation of naming-consistent, focused code. Preference reset logic in
JabRefCliPreferences.clear() relies on this method
(FilePreferences.getDefault().withMainFileDirectory(getDefaultPath())) to reset the main file
directory; in GUI mode getDefaultPath() is overridden to use the default file chooser directory,
so the incorrect field assignment means the reset will not apply the intended main file directory
and will instead mutate the working directory, directly breaking the expected GUI reset behavior.

AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned: AGENTS.md: Follow JabRef code style, naming conventions, and keep code small, focused, and SRP-aligned
AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing: AGENTS.md: Variable and identifier names must be correctly spelled and intention-revealing
jablib/src/main/java/org/jabref/logic/FilePreferences.java[384-387]
jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[991-996]
jablib/src/main/java/org/jabref/logic/FilePreferences.java[374-392]
jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[969-997]
jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[1224-1228]

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

## Issue description
`FilePreferences.withMainFileDirectory(...)` currently updates `workingDirectory` instead of `mainFileDirectory`, and its parameter name (`lastUsedDirectory`) is misleading. As a result, callers (notably preference reset via `JabRefCliPreferences.clear()` used by the GUI reset path) silently fail to reset the main file directory and may unintentionally overwrite the working directory.
## Issue Context
- The method is intended (by name and usage) to set the *main file directory*, but it assigns the provided `Path` to the wrong field.
- `JabRefCliPreferences.clear()` uses `FilePreferences.getDefault().withMainFileDirectory(getDefaultPath())` to reset the main file directory.
- In GUI mode, `getDefaultPath()` is overridden to the default file chooser directory, so this bug directly breaks the expected GUI preferences reset behavior.
- The compliance checklist expectation of small, focused, naming-consistent code is violated because the method name/purpose and implementation disagree.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/FilePreferences.java[384-387]
- jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java[991-996]
- jabgui/src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java[1224-1228]

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


2. Tests mock old return ✓ Resolved 🐞 Bug ☼ Reliability
Description
FilePreferences.getMainFileDirectory() now returns Path, but some tests still mock it as
Optional<Path>, which will fail compilation and block the build.
Code

jablib/src/main/java/org/jabref/logic/FilePreferences.java[R146-147]

Evidence
The production method signature is now Path, but the cited tests still return Optional, which is
a direct compile-time type mismatch.

jablib/src/main/java/org/jabref/logic/FilePreferences.java[142-148]
jabgui/src/test/java/org/jabref/gui/desktop/os/BibDatbaseContextTest.java[27-36]
jabgui/src/test/java/org/jabref/gui/fieldeditors/contextmenu/ContextMenuFactoryTest.java[58-65]

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 API change from `Optional<Path> getMainFileDirectory()` to `Path getMainFileDirectory()` was not propagated to all tests; remaining mocks returning `Optional.of(...)` no longer match the method signature.
### Issue Context
Two test files still return `Optional<Path>` from `getMainFileDirectory()`, which should now return `Path`.
### Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/FilePreferences.java[142-152]
- jabgui/src/test/java/org/jabref/gui/desktop/os/BibDatbaseContextTest.java[27-36]
- jabgui/src/test/java/org/jabref/gui/fieldeditors/contextmenu/ContextMenuFactoryTest.java[58-65]
### Suggested fix
- Replace `thenReturn(Optional.of(path))` with `thenReturn(path)`.
- Remove now-unused `Optional` imports/usage in those tests.

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



Remediation recommended

3. Public boolean builder withMoveToTrash 📘 Rule violation ⚙ Maintainability
Description
FilePreferences.withMoveToTrash(boolean) introduces a public API whose behavior is controlled by a
boolean flag, which the checklist discourages. This reduces API clarity and increases the chance of
call-site misuse.
Code

jablib/src/main/java/org/jabref/logic/FilePreferences.java[R379-382]

Evidence
PR Compliance ID 13 forbids introducing public APIs whose behavior is toggled via boolean
parameters. The added withMoveToTrash(boolean moveToTrash) is exactly such a method.

AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public methods: AGENTS.md: Avoid boolean parameters in public meth...

Comment thread jablib/src/main/java/org/jabref/logic/FilePreferences.java
Comment thread jablib/src/main/java/org/jabref/logic/FilePreferences.java Outdated
@calixtus calixtus removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 25, 2026
@calixtus calixtus added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 26, 2026
@calixtus calixtus enabled auto-merge May 26, 2026 23:19
@github-actions github-actions Bot removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 28, 2026
@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label May 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Your pull request conflicts with the target branch.

Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.

@calixtus calixtus added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes-required Pull requests that are not yet complete labels May 28, 2026
}

public FilePreferences withUserHostInfo(ReadOnlyObjectProperty<UserHostInfo> newUserHostInfo) {
this.userAndHost.bind(newUserHostInfo);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could result in a already bind exception

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I dont think so:

grafik

@calixtus calixtus added this pull request to the merge queue May 29, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label May 29, 2026
Merged via the queue into main with commit 5f2c71e May 29, 2026
76 checks passed
@calixtus calixtus deleted the filePreferences-import branch May 29, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants