Skip to content

Add initial documentation for context menu for linked file moval#15597

Open
koppor wants to merge 7 commits into
mainfrom
add-docs-for-directory-renaming
Open

Add initial documentation for context menu for linked file moval#15597
koppor wants to merge 7 commits into
mainfrom
add-docs-for-directory-renaming

Conversation

@koppor
Copy link
Copy Markdown
Member

@koppor koppor commented Apr 20, 2026

Related issues and pull requests

Refs #12287

PR Description

We have some disussions at the PR #15055

This should bring in some clarity.

Steps to test

Read and try to follow - or update

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

---
nav_order: 56
parent: Decision Records
status: accepted
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.

Should we add this field?

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.

Because we don't have it in the other ADRs I assume


JabRef supports up to four file directory types for linked files:

* **X1 — Main file directory**: set in global preferences; accessible to the current user only
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.

Not sure if X1, X2, are needed.

  • Should there be a dot at the end?

* Good, because adding or removing a directory configuration is immediately reflected in the menu.
* Bad, because users with all three directories configured see up to three items, which is more verbose than a single entry.

### Confirmation
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.

I think this section is optional

status: accepted
date: 2026-04-20
---
# Multi-file move uses a single chosen target directory for all selected files
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.

Suggested change
# Multi-file move uses a single chosen target directory for all selected files
# Multi-file move should use a single target directory for all selected files

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.

Isn't this behaviour obvious? It would be strange if I performed a move action to 1 directory and files would end up in different. Maybe I don't understand fully the context

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label May 3, 2026
@koppor
Copy link
Copy Markdown
Member Author

koppor commented May 12, 2026

Removed ADRs - included the alternatives in the requirements at 32b973f (this PR).

@koppor koppor marked this pull request as ready for review May 12, 2026 08:51
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add requirements documentation for linked file directory movement

📝 Documentation

Grey Divider

Walkthroughs

Description
• Add comprehensive requirements documentation for linked file movement feature
• Define four directory types (MD, LSD, USD, LD) and their scopes
• Specify context menu behavior for moving files between directories
• Document design decisions and rejected alternatives
Diagram
flowchart LR
  A["Linked File Move Feature"] --> B["Directory Types Defined"]
  A --> C["Context Menu Requirements"]
  A --> D["File Movement Logic"]
  A --> E["Design Alternatives"]
  B --> F["MD, LSD, USD, LD"]
  C --> G["Show All Configured Dirs"]
  C --> H["Disable Current Directory"]
  D --> I["Preserve Subdirectory Structure"]
  E --> J["Rejected Designs Documented"]
Loading

Grey Divider

File Changes

1. docs/requirements/linked-file-move-between-directories.md 📝 Documentation +96/-0

New requirements documentation for linked file directory movement

• New requirements document for issue #12287 defining linked file movement between directories
• Defines four directory types with IDs, names, and scopes (MD, LSD, USD, LD)
• Specifies seven functional requirements for context menu behavior and file movement logic
• Documents design rationale and two rejected alternative approaches
• Includes implementation status markers (TODO Needs: impl, utest) for each requirement

docs/requirements/linked-file-move-between-directories.md


Grey Divider

Qodo Logo

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

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

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Action required

1. Invalid Needs syntax 🐞 Bug ◔ Observability
Description
The requirements use TODO Needs: impl, utest instead of the documented OpenFastTrace metadata line
Needs: ..., so requirement tracing will likely not register the intended implementation/test
needs. This weakens/invalidates gradle traceRequirements coverage reporting for these new
requirements and introduces an undocumented convention used nowhere else in the repo.
Code

docs/requirements/linked-file-move-between-directories.md[32]

+TODO Needs: impl, utest
Evidence
The repo’s own requirements documentation and contributor guidance define Needs: ... as the
supported marker for requirement tracing; existing requirements files follow that exact syntax. The
new file is the only place that introduces the TODO Needs: variant, which is not documented and is
unlikely to be interpreted as OpenFastTrace metadata.

docs/requirements/index.md[30-35]
AGENTS.md[370-392]
docs/requirements/files.md[10-16]
docs/requirements/files.md[25-34]
docs/requirements/linked-file-move-between-directories.md[17-86]

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 requirements page uses `TODO Needs: ...` which does not match the documented OpenFastTrace syntax (`Needs: impl`, `Needs: impl, utest`). As a result, `traceRequirements` likely won’t treat these as declared needs, making requirement coverage output incomplete and creating an inconsistent requirements authoring style.

## Issue Context
- Repo guidance for requirements specifies using an exact `Needs: ...` line (and shows examples).
- CI runs `gradle traceRequirements`, so requirements markup should remain compatible with the tracing plugin.

## Fix
Choose one of these consistent approaches:
1) **If you want these needs to be traceable now:** replace every `TODO Needs: ...` with `Needs: ...` and add the corresponding implementation/test trace tags when available.
2) **If you do NOT want to declare needs until implementation exists (to avoid failing trace coverage):** replace `TODO Needs: impl, utest` with a plain `TODO: impl, utest` (or remove the line), so it doesn’t look like OpenFastTrace metadata.

## Fix Focus Areas
- docs/requirements/linked-file-move-between-directories.md[30-86]

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


Grey Divider

Qodo Logo

@koppor koppor requested a review from InAnYan May 12, 2026 09:13
Copy link
Copy Markdown
Member

@InAnYan InAnYan left a comment

Choose a reason for hiding this comment

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

The approach with requirements is quite interesting.

Only nitpicks:

  1. I would introduce feature and in the requirements wrote "Covers"
  2. To turn off "Needs:" one could also write:
<--! oft:on --->
<--! oft:off --->

(HTML comment, I forgot the exact syntax, but the contents of the comment is right)

  1. Also the requirements when "library is not saved" and "no directory set" - they are not equal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: changes-required Pull requests that are not yet complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants