Skip to content

Conversation

@shubhamk0205
Copy link
Contributor

Closes #13878

Prevent bulk import operations from polluting the navigation history. When multiple entries are imported at once, automatic selection changes are now suppressed from being recorded in the navigation history. This ensures that only user-driven navigation actions are tracked, keeping the Back/Forward buttons functional and predictable.

Steps to test

  1. Open JabRef and create a new library
  2. Import multiple entries at once (e.g., via File → Import → BibTeX, or drag-and-drop multiple .bib files)
  3. After the import completes, verify that:
    • The Back/Forward navigation buttons remain disabled (or show the correct state based on actual user navigation)
    • Manually selecting different entries adds them to navigation history as expected
    • Using Back/Forward buttons only navigates through entries you actually visited, not entries from the bulk import

Expected behavior: Bulk imports should not enable Back/Forward navigation or add entries to navigation history. Only manual entry selections should affect navigation history.

Mandatory checks

  • 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 described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [/] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@github-actions github-actions bot removed the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@github-actions github-actions bot removed the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@github-actions github-actions bot removed the status: changes-required Pull requests that are not yet complete label Dec 8, 2025
@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Dec 8, 2025
Comment on lines +1054 to +1069
/**
* Marks the start of a bulk import operation.
* During bulk import, selection changes will not be added to navigation history.
*/
public void startBulkImport() {
bulkImportInProgress = true;
}

/**
* Marks the end of a bulk import operation.
* Normal navigation history tracking resumes after this call.
*/
public void endBulkImport() {
bulkImportInProgress = false;
}

Copy link
Member

Choose a reason for hiding this comment

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

This is hacky as hell

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

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove/prevent "Ghost" navigation history when using importers

3 participants