Skip to content

Add Applied Filters Tracking to Filterable Engine#34

Merged
kettasoft merged 8 commits intomasterfrom
feat/save-applied-filters
Nov 14, 2025
Merged

Add Applied Filters Tracking to Filterable Engine#34
kettasoft merged 8 commits intomasterfrom
feat/save-applied-filters

Conversation

@kettasoft
Copy link
Owner

This pull request introduces a complete mechanism for recording all filters that were actually applied during the filtering lifecycle.
The feature ensures that only filters that passed validation, logic checks, and execution are stored, allowing consumers of the engine to reliably inspect the final filtering state.

Key Features Added:

Applied Filters Registry
A dedicated internal structure for collecting and exposing the filters that were successfully applied, including their field, operator, value, and any relevant context.

Integration With Engine Execution Flow
Filters are added to the registry only after passing through payload parsing, value sanitization, clause building, and successful execution via the commit pipeline.

Public Accessor
A clean API for retrieving the applied filters from outside the engine.
This enables features such as debugging, analytics, UI filter visualization, or caching keys based on final applied filters.

Non-intrusive Design
The tracking system does not change the behavior of any existing engines or filters.
It works automatically under the hood and integrates seamlessly with strict/permissive modes as well as skipping logic.

Unit Tests Included
Tests verify:
– applied filters are recorded correctly
– skipped or invalid filters are not added
– structure of stored filters remains consistent
– behavior works across typical engine execution scenarios

Why This Matters:
Tracking applied filters opens the door to more powerful features like user-facing filter summaries, debugging tools, API responses with filter metadata, and smarter caching strategies.

@kettasoft kettasoft merged commit 03813b0 into master Nov 14, 2025
1 check passed
@kettasoft kettasoft deleted the feat/save-applied-filters branch November 14, 2025 20:50
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