GenericFilter: URL condition parameters are parsed into UI components before it is known whether a component is needed - #5658
Draft
fractal3000 wants to merge 3 commits into
Draft
Conversation
The URL binder built a full PropertyFilter per URL condition - with a data loader assignment, a generated value widget and, for a reference attribute, a DataManager load of the value - before knowing whether the condition is permitted, matches an existing configuration row or refers to an existing attribute; the component was then discarded on most paths, and its side effects leaked. The URL is now parsed into a plain model first; permission checks and the matching run on the model, and a component is created - through the same converter route the programmatic API uses - only for the conditions that are actually added, with the value deserialized only at that point. An unknown attribute degrades to a skipped condition with a warning instead of a failed navigation. The operation-change listener of a group applies the filter only on a client-driven change, consistently with the value path, so a restore fires no data load of its own. The URL format does not change; the replaced protected methods are kept deprecated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The generic filter, property filter and data grid filter URL binders each hand-rolled the same slicing of a serialized parameter into structural tokens separated by an underscore plus the value remainder. The slicing now lives in FilterUrlQueryParametersSupport.splitParameter; the three binders differ only in how many structural tokens their format has and how the tokens are deserialized. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fractal3000
marked this pull request as draft
September 4, 2026 20:14
The compatibility of a URL condition's operation with its attribute used to be checked only inside PropertyFilter.setOperation while the component was being built or updated, where a failure escaped into the navigation. The check now runs in the model validation (getAvailableOperations on the resolved property path), so an incompatible operation degrades to a skipped condition with a warning. An operation outside a component's narrowed operations list is likewise not applied instead of failing the restore. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fractal3000
force-pushed
the
tech/5623-url-conditions-parsed-into-models
branch
from
September 4, 2026 20:21
6887400 to
221923f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #5623
GenericFilterUrlQueryParametersBinderused to build a fullPropertyFiltercomponent for every condition in the URL — with a data loader assignment, a generated value widget and, for a reference attribute, aDataManagerload of the value — before knowing whether the condition is permitted, matches an existing configuration row, or refers to an existing attribute. The component was then discarded on most paths, and its side effects leaked.Commits:
ParsedPropertyCondition: property, operation, raw value string); permission checks and the matching against the current configuration run on the model; a component is created — through the samePropertyFilterConverterroute the programmatic API uses — only for the conditions that are actually added, and the value is deserialized (which may load a referenced entity) only at that point. A malformed or unresolvable condition degrades to a skipped condition with a warning. The URL format does not change; the replaced protected methods are kept as deprecated delegates to the new flow.FilterUrlQueryParametersSupport.splitParameter.PropertyFilter.setOperationwhile the component was being built, where a failure escaped into the navigation; it now runs in the model validation, and an operation outside a component's narrowed operations list is not applied instead of failing the restore.Resolved by this change:
conditionModificationDelegated.AND[cond, AND[cond]]on every URL restore; observed on 3.0.1 and master, not filed) — gone: the condition appears exactly once, verified on the demo project.DataManagerloads for a condition rejected by the permission check (not filed): values are now deserialized only for surviving conditions — a forbidden attribute costs a string comparison, not a query per LIST element.Tests:
GenericFilterUrlConditionModelTest(18 cases incl. a table of adversarial URL inputs; the unknown-attribute, single-occurrence and no-trace cases fail without the fix) andFilterUrlQueryParametersSupportTest(tokenizer). Full:flowui:testand:flowui-data:testpass. Thefilter-testdemo app on this build was swept with Playwright over all 50 scenario views; the only differences from the previous baseline are the fixes above and the known #5516-family gaps of master (its fix lives in therelease_3_0PR queue).Behavior notes:
release_3_0line by GenericFilter: restoring filter state from the URL fires a redundant data load when a condition operation differs #5659 (stacked on One condition is shown but another is applied in GenericFilter #5634) and will reachmasterwith its forward-port.warn.🤖 Generated with Claude Code