Skip to content

Add requirement for multi-column sorting of the main table - #773

Open
koppor wants to merge 2 commits into
mainfrom
main-table-multi-sort-req
Open

koppor wants to merge 2 commits into
mainfrom
main-table-multi-sort-req

Conversation

@koppor

@koppor koppor commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

The main table already sorts by several columns (Shift+click a header), but no requirement documented it. This adds req~maintable.sort.multi-column~1 beside the other main-table requirements in docs/requirements/ux.md and traces it to the code that restores the saved sort order.

Steps to test

  1. Run ./gradlew traceRequirements; the new requirement is covered.
  2. In JabRef, click the "Year" header, then Shift+click "Author"; entries of the same year are sorted by author.
  3. Restart JabRef; both sort levels are still active.

Related issues and pull requests

Related: JabRef#7015, JabRef#397

AI usage

Claude Code (model claude-opus-5), AIL3.

AI CHECKLIST.md walkthrough

Only a Markdown requirement and one trace comment changed; every code, test and user-facing-text item is not applicable.

1. Code self-review: all items [/]

2. Verification commands

  • [/] ./gradlew :jablib:check
  • [/] ./gradlew checkstyleMain checkstyleTest checkstyleJmh
  • [/] ./gradlew modernizer
  • [/] ./gradlew --no-configuration-cache :rewriteDryRun
  • [/] ./gradlew javadoc
  • npx markdownlint-cli2 "docs/**/*.md" "*.md"
  • npm ci && npm run textlint: left to CI
  • [/] intellij-format

3. Documentation

  • [/] CHANGELOG.md entry
  • Searched jabref/issues and jabref-koppor/issues; no match to close
  • Requirement added to docs/requirements/<area>.md
  • [/] Developer documentation

4. Pull request

  • PR body built from the template, every section filled
  • All checklist items kept and marked
  • [/] Screenshot for visible changes
  • HTML comments removed
  • Created with gh pr create --body-file
  • [/] CHANGELOG TODO placeholder

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 one sentence (max 20 words) to CHANGELOG.md describing the change from the user's point of view (if the 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

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@koppor koppor added this to the 1 - soon-upstream milestone Sep 22, 2026
@koppor
koppor marked this pull request as ready for review September 22, 2026 13:18
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Document main-table multi-column sorting requirement

📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Documents multi-column sorting, Shift-click interaction, and persistence across restarts.
• Traces the requirement to saved sort-order restoration.
Diagram

graph TD
  R["Sorting Requirement"] -->|traced by| A["Apply Sort Order"] -->|reads| P["Saved Preferences"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Trace both behavior entry points
  • ➕ Covers Shift-click interaction as well as restart restoration
  • ➕ Provides more complete implementation traceability for the requirement
  • ➖ Adds another trace annotation to maintain
  • ➖ Requires identifying the table-header sorting handler

Recommendation: Keep the cohesive user-facing requirement, but consider tracing the Shift-click sorting handler in addition to applySortOrder(). The current trace directly covers persistence, while an interaction trace would account for the requirement's sort-level creation behavior.

Files changed (2) +10 / -0

Documentation (2) +10 / -0
ux.mdAdd multi-column sorting UX requirement +9/-0

Add multi-column sorting UX requirement

• Adds a formal requirement describing primary and subsequent sort levels, the Shift-click interaction, and persistence across application restarts.

docs/requirements/ux.md

ColumnPreferencesApplier.javaTrace sort-order restoration to the new requirement +1/-0

Trace sort-order restoration to the new requirement

• Annotates 'applySortOrder()' as an implementation point for the main-table multi-column sorting requirement. No executable behavior changes.

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

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

qodo-free-for-open-source-projects Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (0)

Grey Divider


Informational

1. The sorting shortcut is hard to read ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The requirement writes the shortcut as Shift+click instead of formatting the modifier key and
separator consistently. Readers of the Markdown requirement encounter an unformatted keyboard
shortcut, making the interaction less clear than the repository convention requires.
Code

docs/requirements/ux.md[56]

+Shift+click on a column header adds it as the next sort level.
Evidence
The changed requirement uses the plain-text shortcut Shift+click, while the checklist requires
each key to use its own ` tag and multi-key shortcuts to use a spaced  + ` separator.

AGENTS.md: Format Markdown Keyboard Shortcuts Consistently: AGENTS.md: Format Markdown Keyboard Shortcuts Consistently: AGENTS.md: Format Markdown Keyboard Shortcuts Consistently: AGENTS.md: Format Markdown Keyboard Shortcuts Consistently
docs/requirements/ux.md[56-56]

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 new Markdown requirement writes the keyboard shortcut as `Shift+click`, which does not follow the repository's keyboard-shortcut formatting convention.
## Fix Focus Areas
- docs/requirements/ux.md[56-56]
## Recommended Fix
Format the modifier key with its own `<kbd>` tag and use the spaced plus separator, for example `<kbd>Shift</kbd> + click`. Do not wrap the mouse action as a keyboard key.

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


Grey Divider

Context sources
Review mode: 🚀 Fast: The change is a small, localized requirement-documentation addition with a single trace comment and no behavioral code change.

Grey Divider

Tip of the day
💡 Did you know, you can route each action level your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 33de17e 🚀 Fast

Results up to commit 4bf40df


🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 📜 Skill insights (0)


Informational
1. The sorting shortcut is hard to read 📘 Rule violation ⚙ Maintainability
Description
The requirement writes the shortcut as Shift+click instead of formatting the modifier key and
separator consistently. Readers of the Markdown requirement encounter an unformatted keyboard
shortcut, making the interaction less clear than the repository convention requires.
Code

docs/requirements/ux.md[56]

+Shift+click on a column header adds it as the next sort level.
Evidence
The changed requirement uses the plain-text shortcut Shift+click, while the checklist requires
each key to use its own <kbd> tag and multi-key shortcuts to use a spaced  +  separator.

AGENTS.md: Format Markdown Keyboard Shortcuts Consistently
docs/requirements/ux.md[56-56]

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 new Markdown requirement writes the keyboard shortcut as `Shift+click`, which does not follow the repository's keyboard-shortcut formatting convention.

## Fix Focus Areas
- docs/requirements/ux.md[56-56]

## Recommended Fix
Format the modifier key with its own `<kbd>` tag and use the spaced plus separator, for example `<kbd>Shift</kbd> + click`. Do not wrap the mouse action as a keyboard key.

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


Context sources
Review mode: 🚀 Fast: The change is a localized requirement documentation addition plus a single traceability comment, with no behavioral code changes.

Grey Divider

Qodo Logo

Comment thread docs/requirements/ux.md Outdated
@koppor
koppor marked this pull request as draft September 22, 2026 13:21
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@koppor
koppor marked this pull request as ready for review September 22, 2026 13:21
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 33de17e

koppor pushed a commit that referenced this pull request Sep 22, 2026
JabRef:main-table-multi-sort-req (#773)
JabRef:jabkit-get-fulltext (#770)
JabRef:13048-fulltext-search-case (JabRef#17002)

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant