Skip to content

Remove/prevent "Ghost" navigation history when using importers #13878

@subhramit

Description

@subhramit

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Details

During JabCon 2025, we worked on adding some new features and possibly breaking changes. One of these included "Chronological navigation in libraries".
This was essentially an improved "per-tab" version of the same feature which existed in JabRef 4.x and was removed in 5.x

Steps to reproduce the behaviour

  1. Open JabRef
  2. Open an empty library
  3. The navigation (back/forward) buttons should be disabled
  4. Bulk-import multiple entries into the library (I imported ~30 entries - I searched for "black hole" via search pre-configured fetcher and imported the first page)
  5. See that the navigation buttons are available, and sometimes some sequence of pressing them can take you to certain entries

Possible hint to solution

When any new entry is added/imported, the maintable selects it via:

// Add the listener that binds selection to state manager (TODO: should be replaced by proper JavaFX binding as soon as table is implemented in JavaFX)
// content binding between StateManager#getselectedEntries and mainTable#getSelectedEntries does not work here as it does not trigger the ActionHelper#needsEntriesSelected checker for the menubar
mainTable.addSelectionListener(event -> {
List<BibEntry> entries = event.getList().stream().map(BibEntryTableViewModel::getEntry).toList();
stateManager.setSelectedEntries(entries);

to show which entry was last added.
In case of bulk imports, there is no defined order of import (and thus no defined order of selections), and these selections should not be counted in the navigation history.
The challenge will be to track when bulk imports happen and disable the history list updates in such cases.

Appendix

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions