Skip to content

Fix button placement at commit dialog - #16739

Closed
GRV-Satya-Ganesh wants to merge 5 commits into
JabRef:mainfrom
GRV-Satya-Ganesh:fix/16730-commit-dialog-button
Closed

GRV-Satya-Ganesh wants to merge 5 commits into
JabRef:mainfrom
GRV-Satya-Ganesh:fix/16730-commit-dialog-button

Conversation

@GRV-Satya-Ganesh

Copy link
Copy Markdown

Summary

The "Show diff" button in the Git commit dialog sat on its own row above the commit-message area, while Commit and Cancel live in the dialog's button bar. The button is now declared as a ButtonType in that same bar (left-aligned, on one line with the other buttons) and is wired in GitCommitDialogView via lookupButton, so clicking it opens the diff without closing the dialog.

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

Analogies: Like honey, this change keeps the button from drifting to the top of the jar. Like chocolate, all the pieces now sit in one neat row in the same box. Like the moon, it rises in line with everything else in the sky.

Steps to test

  1. Save a library as a .bib file inside a local git repository, make a change, and save again.
  2. Open File -> Git -> Commit...
  3. "Show diff" now appears in the bottom row, on the same line as Commit and Cancel.
  4. Click "Show diff": the diff view opens and the commit dialog stays open.
Before After
Screenshot 2026-08-28 233744 Screenshot 2026-08-29 002451

Related issues and pull requests

Closes #16730
Follow-up to #16569, which introduced the "Show diff" button.

AI usage

Arena.ai Agent Mode (agent assistant), AIL4 — fix approach and initial code sketch co-developed with AI; I applied the change, reviewed and understood every line, fixed the FXML/lookup wiring issues found during testing, and verified the dialog manually in running JabRef.

AI CHECKLIST.md walkthrough

1. Code self-review

Nullability and control flow

  • [/] not applicable — no null checks, no new classes; FXML layout plus a small wiring change
  • [/] not applicable
  • [/] not applicable
  • [/] not applicable
  • [/] not applicable

Exceptions

  • [/] not applicable — no exceptions caught or thrown
  • [/] not applicable

Style and idioms

  • [/] not applicable — no BibEntry, regex, or background-thread changes
  • [/] not applicable
  • [/] not applicable
  • [/] not applicable
  • No commented-out code, no trivial comments; the existing requirement-traceability comment was kept unchanged
  • [/] not applicable

User-facing text

  • "Show diff" reuses the existing localized %Show diff resource
  • [/] not applicable — existing string unchanged
  • [/] not applicable

Security

  • [/] not applicable — no user-controlled data rendered

Tests

  • [/] not applicable — UI placement only, no model/logic behavior changed
  • [/] not applicable
  • [/] not applicable

2. Verification commands

  • [/] :jablib:check — jablib untouched
  • :jabgui:checkstyleMain
  • [/] modernizer — no APIs introduced that it covers; CI also runs it
  • --no-configuration-cache :rewriteDryRun — reports no changes
  • [/] javadoc — no public API or documentation changes
  • [/] markdownlint — CHANGELOG entry follows the existing entries' format

3. Documentation

  • CHANGELOG.md entry added, linking the issue
  • Related issue searched and linked confidently (Fix button placement at commit dialog #16730)
  • [/] no requirement entry — minor UI fix
  • [/] no developer-doc update — no behavior or architecture change

4. Pull request

  • PR body built from the template, every section filled
  • All checklist items kept and marked
  • All HTML comments removed
  • [/] PR created via the GitHub web editor instead of gh pr create --body-file
  • [/] No TODO placeholder used — the issue link is present

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

@github-actions

Copy link
Copy Markdown
Contributor

Hey @GRV-Satya-Ganesh! 👋

Thank you for contributing to JabRef!

We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request.

After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide.

Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures.

@github-actions github-actions Bot added component: git first contrib good first issue An issue intended for project-newcomers. Varies in difficulty. labels Aug 28, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Move Show Diff into Git commit dialog button bar

🐞 Bug fix 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Moves Show Diff alongside Commit and Cancel in the dialog button bar.
• Preserves diff preview behavior without closing the commit dialog.
• Documents the corrected button placement in the changelog.
Diagram

sequenceDiagram
    actor User
    participant Bar as Button Bar
    participant View as Commit View
    participant Task as Diff Task
    participant Diff as Diff Dialog
    User->>Bar: Click Show Diff
    Bar->>View: Dispatch action
    View->>View: Consume event
    View->>Task: Request diff
    Task-->>View: Return databases
    View->>Diff: Open preview
Loading
High-Level Assessment

The chosen approach is appropriate: declaring Show Diff as a ButtonType provides native button-bar placement and left alignment, while intercepting its action prevents JavaFX from closing the dialog. Retaining a standalone content button would preserve the placement defect, and handling it through normal dialog result conversion would risk triggering commit or close behavior.

Files changed (3) +10 / -7

Bug fix (2) +9 / -7
GitCommitDialogView.javaHandle Show Diff as a non-closing dialog action +8/-1

Handle Show Diff as a non-closing dialog action

• Injects the Show Diff ButtonType, resolves its rendered button, and consumes its action before launching the existing diff workflow. This allows the preview to open without closing or submitting the commit dialog.

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java

GitCommitDialog.fxmlMove Show Diff into the dialog button bar +1/-6

Move Show Diff into the dialog button bar

• Removes the standalone Show Diff button and its dedicated layout row. Declares it as a left-aligned ButtonType alongside Commit and Cancel.

jabgui/src/main/resources/org/jabref/gui/git/GitCommitDialog.fxml

Documentation (1) +1 / -0
CHANGELOG.mdDocument corrected Show Diff button placement +1/-0

Document corrected Show Diff button placement

• Adds a user-facing fixed-item entry for issue #16730 describing the corrected Git commit dialog layout.

CHANGELOG.md

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

qodo-free-for-open-source-projects Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

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

Grey Divider


Action required

1. showDiff duplicates action helper 📘 Rule violation ⚙ Maintainability
Description
The new event-filter wiring duplicates the existing ControlHelper.setAction utility, which already
looks up a dialog button, invokes its action, and consumes the event. This creates avoidable
duplicate GUI logic instead of reusing the repository convention.
Code

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[R51-54]

+        Button showDiff = (Button) this.getDialogPane().lookupButton(showDiffButton);
+        showDiff.addEventFilter(ActionEvent.ACTION, event -> {
+            event.consume();
+            showDiff();
Evidence
PR Compliance ID 5 requires common behavior to be reused without duplication. The changed
constructor manually implements the same lookup-and-consume behavior already centralized in
ControlHelper.setAction at lines 72-77.

AGENTS.md: Keep Classes and Methods Focused and Free of Duplication: AGENTS.md: Keep Classes and Methods Focused and Free of Duplication
jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-55]
jabgui/src/main/java/org/jabref/gui/util/ControlHelper.java[72-77]

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

## Issue description
Replace the manually implemented button lookup and event filter with the existing `ControlHelper.setAction` utility.
## Issue Context
`ControlHelper.setAction` already performs the `ButtonType` lookup, action registration, and event consumption used here. Add its import and delegate `showDiffButton` to `showDiff()` through that helper.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-55]

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


2. Changelog entry breaks required format ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new Fixed entry does not begin with We fixed and adds two blank lines before the next heading.
This violates the required Unreleased changelog format and may fail Markdown formatting checks.
Code

CHANGELOG.md[R68-70]

+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
+
+
Evidence
Rule 30 requires Fixed entries to begin with We fixed and forbids extra blank lines. The added
entry starts with The, and lines 69-70 create consecutive blank lines before ### Changed.

AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog
CHANGELOG.md[68-70]

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

## Issue description
The new Fixed changelog entry must begin with `We fixed` and must not leave an extra blank line before the next heading.
## Issue Context
PR Compliance ID 30 requires the matching changelog prefix and explicitly prohibits extra blank lines.
## Fix Focus Areas
- CHANGELOG.md[68-70]

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


3. Blank line has trailing whitespace ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The newly inserted blank line contains spaces instead of being empty. This is inconsistent with
JabRef formatting conventions and creates unnecessary whitespace churn.
Code

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51]

+        
Evidence
Rule 4 requires changed code to follow JabRef formatting conventions. The added blank line at line
51 consists of trailing spaces, unlike the surrounding empty separator lines.

AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions
jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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

## Issue description
Remove the spaces from the newly added blank line.
## Issue Context
PR Compliance ID 4 requires changed Java code to follow JabRef formatting conventions.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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



Informational

4. Duplicate Fixed section ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new release-note entry creates a second Fixed section for the current release even though one
already exists below Changed. This fragments fixes for the same release across two identically
named sections.
Code

CHANGELOG.md[R66-68]

+### Fixed
+
+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
Evidence
The added heading and entry appear at lines 66-68, while the same release already has a ### Fixed
heading and its list beginning at lines 103-106.

CHANGELOG.md[66-68]
CHANGELOG.md[103-106]

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 current release now contains two `### Fixed` sections, splitting fixed changes across duplicate headings.
## Issue Context
An existing `### Fixed` section begins later in the same release block after `### Changed`; the new Git commit dialog entry should be placed there instead of creating another section.
## Fix Focus Areas
- CHANGELOG.md[66-68]
- CHANGELOG.md[103-106]

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


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 04fa1f1 ⚖️ Balanced

Results up to commit 04fa1f1


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


Action required
1. showDiff duplicates action helper 📘 Rule violation ⚙ Maintainability ⭐ New
Description
The new event-filter wiring duplicates the existing ControlHelper.setAction utility, which already
looks up a dialog button, invokes its action, and consumes the event. This creates avoidable
duplicate GUI logic instead of reusing the repository convention.
Code

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[R51-54]

+        Button showDiff = (Button) this.getDialogPane().lookupButton(showDiffButton);
+        showDiff.addEventFilter(ActionEvent.ACTION, event -> {
+            event.consume();
+            showDiff();
Evidence
PR Compliance ID 5 requires common behavior to be reused without duplication. The changed
constructor manually implements the same lookup-and-consume behavior already centralized in
ControlHelper.setAction at lines 72-77.

AGENTS.md: Keep Classes and Methods Focused and Free of Duplication
jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-55]
jabgui/src/main/java/org/jabref/gui/util/ControlHelper.java[72-77]

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

## Issue description
Replace the manually implemented button lookup and event filter with the existing `ControlHelper.setAction` utility.

## Issue Context
`ControlHelper.setAction` already performs the `ButtonType` lookup, action registration, and event consumption used here. Add its import and delegate `showDiffButton` to `showDiff()` through that helper.

## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-55]

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


2. Changelog entry breaks required format ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new Fixed entry does not begin with We fixed and adds two blank lines before the next heading.
This violates the required Unreleased changelog format and may fail Markdown formatting checks.
Code

CHANGELOG.md[R68-70]

+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
+
+
Evidence
Rule 30 requires Fixed entries to begin with We fixed and forbids extra blank lines. The added
entry starts with The, and lines 69-70 create consecutive blank lines before ### Changed.

AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog
CHANGELOG.md[68-70]

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

## Issue description
The new Fixed changelog entry must begin with `We fixed` and must not leave an extra blank line before the next heading.
## Issue Context
PR Compliance ID 30 requires the matching changelog prefix and explicitly prohibits extra blank lines.
## Fix Focus Areas
- CHANGELOG.md[68-70]

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


3. Blank line has trailing whitespace ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The newly inserted blank line contains spaces instead of being empty. This is inconsistent with
JabRef formatting conventions and creates unnecessary whitespace churn.
Code

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51]

+        
Evidence
Rule 4 requires changed code to follow JabRef formatting conventions. The added blank line at line
51 consists of trailing spaces, unlike the surrounding empty separator lines.

AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions
jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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

## Issue description
Remove the spaces from the newly added blank line.
## Issue Context
PR Compliance ID 4 requires changed Java code to follow JabRef formatting conventions.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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



Informational
4. Duplicate Fixed section ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new release-note entry creates a second Fixed section for the current release even though one
already exists below Changed. This fragments fixes for the same release across two identically
named sections.
Code

CHANGELOG.md[R66-68]

+### Fixed
+
+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
Evidence
The added heading and entry appear at lines 66-68, while the same release already has a ### Fixed
heading and its list beginning at lines 103-106.

CHANGELOG.md[66-68]
CHANGELOG.md[103-106]

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 current release now contains two `### Fixed` sections, splitting fixed changes across duplicate headings.
## Issue Context
An existing `### Fixed` section begins later in the same release block after `### Changed`; the new Git commit dialog entry should be placed there instead of creating another section.
## Fix Focus Areas
- CHANGELOG.md[66-68]
- CHANGELOG.md[103-106]

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


Results up to commit N/A


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required
1. Changelog entry breaks required format ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new Fixed entry does not begin with We fixed and adds two blank lines before the next heading.
This violates the required Unreleased changelog format and may fail Markdown formatting checks.
Code

CHANGELOG.md[R68-70]

+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
+
+
Evidence
Rule 30 requires Fixed entries to begin with We fixed and forbids extra blank lines. The added
entry starts with The, and lines 69-70 create consecutive blank lines before ### Changed.

AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog: AGENTS.md: Document User-Visible Changes in the Unreleased Changelog
CHANGELOG.md[68-70]

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

## Issue description
The new Fixed changelog entry must begin with `We fixed` and must not leave an extra blank line before the next heading.
## Issue Context
PR Compliance ID 30 requires the matching changelog prefix and explicitly prohibits extra blank lines.
## Fix Focus Areas
- CHANGELOG.md[68-70]

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


2. Blank line has trailing whitespace ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The newly inserted blank line contains spaces instead of being empty. This is inconsistent with
JabRef formatting conventions and creates unnecessary whitespace churn.
Code

jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51]

+        
Evidence
Rule 4 requires changed code to follow JabRef formatting conventions. The added blank line at line
51 consists of trailing spaces, unlike the surrounding empty separator lines.

AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions: AGENTS.md: Follow JabRef Java Formatting and Naming Conventions
jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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

## Issue description
Remove the spaces from the newly added blank line.
## Issue Context
PR Compliance ID 4 requires changed Java code to follow JabRef formatting conventions.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-51]

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



Informational
3. Duplicate Fixed section ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new release-note entry creates a second Fixed section for the current release even though one
already exists below Changed. This fragments fixes for the same release across two identically
named sections.
Code

CHANGELOG.md[R66-68]

+### Fixed
+
+- The "Show diff" button in the Git commit dialog now appears in the same row as the other buttons. [#16730](https://github.com/JabRef/jabref/issues/16730)
Evidence
The added heading and entry appear at lines 66-68, while the same release already has a ### Fixed
heading and its list beginning at lines 103-106.

CHANGELOG.md[66-68]
CHANGELOG.md[103-106]

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 current release now contains two `### Fixed` sections, splitting fixed changes across duplicate headings.
## Issue Context
An existing `### Fixed` section begins later in the same release block after `### Changed`; the new Git commit dialog entry should be placed there instead of creating another section.
## Fix Focus Areas
- CHANGELOG.md[66-68]
- CHANGELOG.md[103-106]

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


Grey Divider

Qodo Logo

Comment thread CHANGELOG.md Outdated
Comment thread jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java Outdated
Comment thread CHANGELOG.md Outdated
@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Aug 28, 2026
@github-actions github-actions Bot 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 Aug 28, 2026
Comment on lines +51 to +55
Button showDiff = (Button) this.getDialogPane().lookupButton(showDiffButton);
showDiff.addEventFilter(ActionEvent.ACTION, event -> {
event.consume();
showDiff();
});

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.

ControlHelper.setAction?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good point — switching to ControlHelper.setAction and dropping the manual lookup. I'm away from my dev machine for a couple of days; will push the change as soon as I'm back.

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 what " a couple of days" means. If it is more than a week, we should free this issue for another contributor; as you and we as team will loose context meanwhile.

Comment on lines +51 to +55
Button showDiff = (Button) this.getDialogPane().lookupButton(showDiffButton);
showDiff.addEventFilter(ActionEvent.ACTION, event -> {
event.consume();
showDiff();
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why add this piece since the purpose is only to move the button position

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The wiring is a necessary because of the move : "Show diff" was previously a plain in the FXML content with onAction="#showDiff". Placing it in the same row as Commit and Cancel requires declaring it as a in — the button bar only renders ButtonTypes, and those can't declare onAction in FXML, so the handler has to be attached in code. The event filter and consume() preserve the previous behavior of keeping the dialog open.

That said, @calixtus's suggestion is the cleaner way to do exactly this — switching to ControlHelper.setAction.

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.

Please don't use an LLM to communicate. This is rude and not allowed in this repo. If I just wanted to talk to an LLM I would ignore you in the middle. Use your own words and your own brain. own your code.

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.

Also fully ai generated text have to be marked with a 🤖

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.

@pluto-han JavaFX is not using Button in button bars, but merely ButtonType. A controversial design decision about trying to unify an API for a ui representation of dialogs buttons order across all major desktops. See https://docs.oracle.com/en/java/java-components/javafx/26/docs/javafx.controls/javafx/scene/control/ButtonBar.html

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@calixtus Sorry, I drafted those replies with an AI. I wasn't trying to be rude — this is my first contribution and I'm still learning both JavaFX and the norms around here. That's on me, it won't happen again. My comments from here on are my own words, and I'll mark with 🤖 if any AI-generated content appears, as you said.

I did set up the build locally, reproduce the dialog, make the changes and test them in the running app. My English is still improving, so I used AI for wording — but I understand that's no excuse here, and I'll write plainly myself.

Thanks for the patience with a first-timer.

@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Your pull request conflicts with the target branch.

Please merge upstream/main 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.

Comment thread CHANGELOG.md

### Fixed

- We fixed the "Show diff" button placement in the Git commit dialog. [#16730](https://github.com/JabRef/jabref/issues/16730)

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.

No need to add a CHANGELOG.md entry, the feature was introduced during this release.

@InAnYan

InAnYan commented Aug 31, 2026

Copy link
Copy Markdown
Member

For organizational purposes, I propose to mark this PR as draft untill merge conflicts and review comments are addressed

@InAnYan
InAnYan marked this pull request as draft August 31, 2026 15:54
@GRV-Satya-Ganesh
GRV-Satya-Ganesh marked this pull request as ready for review September 4, 2026 10:58
@GRV-Satya-Ganesh
GRV-Satya-Ganesh marked this pull request as draft September 4, 2026 10:59
@GRV-Satya-Ganesh
GRV-Satya-Ganesh marked this pull request as ready for review September 4, 2026 11:00
Comment on lines +51 to +54
Button showDiff = (Button) this.getDialogPane().lookupButton(showDiffButton);
showDiff.addEventFilter(ActionEvent.ACTION, event -> {
event.consume();
showDiff();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Action required

1. showdiff duplicates action helper 📘 Rule violation ⚙ Maintainability

The new event-filter wiring duplicates the existing ControlHelper.setAction utility, which already
looks up a dialog button, invokes its action, and consumes the event. This creates avoidable
duplicate GUI logic instead of reusing the repository convention.
Agent Prompt
## Issue description
Replace the manually implemented button lookup and event filter with the existing `ControlHelper.setAction` utility.

## Issue Context
`ControlHelper.setAction` already performs the `ButtonType` lookup, action registration, and event consumption used here. Add its import and delegate `showDiffButton` to `showDiff()` through that helper.

## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/git/GitCommitDialogView.java[51-55]

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

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

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 04fa1f1

@GRV-Satya-Ganesh
GRV-Satya-Ganesh marked this pull request as draft September 4, 2026 11:00
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Do not mark a PR as ready-for-review if changes are required.
Address the changes first.

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

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 04fa1f1

@GRV-Satya-Ganesh

Copy link
Copy Markdown
Author

For organizational purposes, I propose to mark this PR as draft untill merge conflicts and review comments are addressed

Done, marked the PR as draft. Actually I had some sudden equipment trouble and I expect it to be resolved within a week . As soon as I'm back I will resolve the merge conflict and do the suggested changes. If needs to be resolved quickly, feel free to assign to another contributor. Sorry for the inconvenience

@InAnYan

InAnYan commented Sep 4, 2026

Copy link
Copy Markdown
Member

No worries, thank you for informing us

@github-actions

Copy link
Copy Markdown
Contributor

The requested changes were not addressed for 3 days. Please follow-up in the next 7 days or your PR will be automatically closed. You can check the contributing guidelines for hints on the pull request process.

@github-actions github-actions Bot added the status: stale Issues marked by a bot as "stale". All issues need to be investigated manually. label Sep 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR is being closed due to continued inactivity.

@github-actions github-actions Bot closed this Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull requests was closed without merging. You have been unassigned from the respective issue #16730. In case you closed the PR for yourself, you can re-open it. Please also check After submission of a pull request in CONTRIBUTING.md.

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

Labels

component: git component: ui first contrib good first issue An issue intended for project-newcomers. Varies in difficulty. status: changes-required Pull requests that are not yet complete status: stale Issues marked by a bot as "stale". All issues need to be investigated manually.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix button placement at commit dialog

5 participants