Conversation
When write-back touches a single-entry sidecar, the sidecar and its equally named PDF are renamed to the base name the filename pattern (Linked files preferences) generates for the entry, keeping the pair in sync — e.g. a citation-key edit renames both files to "<key> - <title>". Multi-entry files keep their name, occupied targets and pattern failures leave the current name untouched, and the entry's file link and the catalog follow the rename so the watcher does not re-import. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # jablib/src/main/java/org/jabref/logic/directorylibrary/DirectoryLibrarySynchronizer.java
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
An X.md sharing its base name with another found or linked file, or any Markdown sidecar (Hayagriva frontmatter), is a notes companion of the entry, not an attachment - auto-link must not pick it up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Both tab context menu actions were gated on a saved .bib path; a directory library's root is just as revealable and terminal-openable. NativeDesktop.openConsole now accepts a directory (opened itself) as well as a file (opened at its parent, as before). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
26 tasks
Resync layer 6 of the stack (no conflicts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vr3E1Gg5DRU4LQDDVnhPys
…pair rename The PDF is renamed first and rolled back if the sidecar cannot follow, so the pair never ends up half renamed; a target name that another entry's PDF or sidecar occupies is skipped; citation keys are cleaned before they become file names; the location-on-disk accessor replaces the repeated fallback chains. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vr3E1Gg5DRU4LQDDVnhPys
Treating every Markdown file next to an equally named file as a notes companion changed automatic file linking for all libraries; the Hayagriva frontmatter is the unambiguous signal, so only sidecars are skipped now. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vr3E1Gg5DRU4LQDDVnhPys
Fixes the CI format check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Update OpenConsoleActionTest to verify getPathOnDisk (the action now resolves the database path through that helper). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcHNMt9fPWnpYaHheFvry
Upstream added a 0071 ADR after this stack claimed the number, so the MADR duplicate-ID check failed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Sep 7, 2026
31 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues and pull requests
Phase 5a of the "directory as library" plan (
PLAN.md), stacked on #740 (base branchdirectory-groups). No issue is closed by this PR.PR Description
🤖 In a directory library, a sidecar and its PDF are now renamed together as a pair, following the filename pattern from Preferences > Linked files. Editing an entry's citation key or title moves both files to the freshly generated name and updates the entry's link. Multi-entry files, occupied target names, and pattern failures leave the current names untouched, and files rename only when their entry is edited — never in bulk on open.
jabref-contrib-policy:4.2:reviewed:okAnalogies
Like honey and its wax cap, the paper and its metadata are sealed as one — lift one and the other comes along. Like two squares of chocolate still joined at the groove, the pair breaks off the bar together, never separately. And like the moon keeping the same face to the earth, sidecar and PDF stay tidally locked while both travel to their new name.
Steps to test
x.yml+x.pdf; set a filename pattern under Preferences > Linked files (e.g.[citationkey] - [fulltitle]).No visible UI change (the effect is on disk), hence no screenshot.
AI usage
Claude Code (model claude-fable-5).
AI CHECKLIST.md walkthrough
1. Code self-review
Optionalchains for the generator; nullable JDK returns handled locally; noObjects.requireNonNull.IOExceptioncaught; exceptions last in log calls; noRuntimeException/IllegalStateException.Functionseam; Markdown Javadoc; no commented-out code.@TempDir, deterministic.2. Verification commands
./gradlew :jablib:test(directory-library suite) and:jabgui:compileJava../gradlew :jablib:checkstyleMain :jablib:checkstyleTest :jabgui:checkstyleMain../gradlew traceRequirements(newreq~directory-library.pattern-rename~1covered)../gradlew --no-configuration-cache :rewriteDryRun— no changes.npx markdownlint-cli2on changed Markdown.3. Documentation
CHANGELOG.mdentry (TODO replaced with this PR's link after creation).req~directory-library.pattern-rename~1added with impl marker.4. Pull request
gh api(stacked cross-repo).Checklist
CHANGELOG.mddescribing the change from the user's point of view (if the change is visible to the user)🤖 Generated with Claude Code