Skip to content

GenericFilter: on re-navigation only the entry configuration is restored; changes in other configurations persist #5488#5505

Open
fractal3000 wants to merge 1 commit into
bug/5425-generic-filter-broken-on-re-navigationfrom
bug/5488-generic-filter-restore-all-configurations
Open

GenericFilter: on re-navigation only the entry configuration is restored; changes in other configurations persist #5488#5505
fractal3000 wants to merge 1 commit into
bug/5425-generic-filter-broken-on-re-navigationfrom
bug/5488-generic-filter-restore-all-configurations

Conversation

@fractal3000

@fractal3000 fractal3000 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #5488

Depends on #5425 fix

Problem

On a clean same-view re-navigation the filter restored only the configuration that was current at initialization (the entry configuration). Changes made to any other configuration — a condition added or removed, via the URL or by user actions — were not restored and persisted for the session (until a full view reload).

Fix

GenericFilterUrlQueryParametersBinder now snapshots every configuration at saveInitialState (all registered configurations plus the empty one), and applyInitialState restores each of them, then makes the entry configuration current again. The per-configuration restore reuses the existing structure/default-value/state reconciliation; the restore of non-current configurations happens on their models, so switching to them later shows the restored state.

Behaviour change (relative to the re-navigation PR)

This extends #5425. The re-navigation PR intentionally restored only the entry configuration; #5488 broadens that to all configurations. The corresponding test in #5425 (which asserted the entry-only scope) is updated to the new expectation. Both PRs are unreleased, so no released behaviour changes; the shipped behaviour is the combined result.

Tests

Two tests in GenericFilterReNavigationTest — a condition added to a non-entry configuration is removed on re-navigation, and a condition removed from a non-entry configuration is restored — both while the entry configuration is restored as before. Verified they fail on the entry-only snapshot and pass with the per-configuration snapshot; the rest of the re-navigation suite stays green.

Backward compatibility

No public API change: saveInitialState/applyInitialState/restore* are protected on an @Internal binder; the internal field changed from a single InitialState to a List<InitialState> plus an entryConfiguration reference. The behavioural change is the bug fix itself; no application migration is required.

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