-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[WEB-5804] refactor: decouple filter value types from filter configurations #8441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ations Remove value type constraints from filter configurations to support operator-specific value types. Different operators can accept different value types for the same filter property, so value types should be determined at the operator level rather than the filter level. - Remove generic value type parameter from TFilterConfig - Update TOperatorConfigMap to accept union of all value types - Simplify filter config factory signatures across all filter types - Add forceUpdate parameter to updateConditionValue method
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
WalkthroughThis PR removes the generic type parameter V from rich-filter operator and filter config types across the codebase so types use TFilterValue directly. It also adds an optional forceUpdate parameter to FilterInstance.updateConditionValue to allow forcing reassessment even when values are equal. Changes
Sequence Diagram(s)(omitted — changes are type-level and a small update to a single-method behavior; conditions for sequence diagrams not met) Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx,mts,cts}📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx,json,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/shared-state/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (11)📓 Common learnings📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-11-25T10:18:05.172ZApplied to files:
📚 Learning: 2025-12-12T15:20:36.542ZApplied to files:
📚 Learning: 2025-10-09T20:42:31.843ZApplied to files:
📚 Learning: 2025-10-01T15:30:17.605ZApplied to files:
🧬 Code graph analysis (5)packages/utils/src/rich-filters/factories/configs/properties/shared.ts (3)
packages/shared-state/src/store/rich-filters/config.ts (4)
packages/utils/src/work-item-filters/configs/filters/shared.ts (3)
apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx (3)
packages/shared-state/src/store/rich-filters/config-manager.ts (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/types/src/rich-filters/config/filter-config.ts (1)
4-10: Update JSDoc comment to reflect removed generic parameter.The comment still documents the
@template V - Value type for the filterparameter, but line 11 shows thatVhas been removed from the type signature.🔎 Suggested fix
/** * Main filter configuration type for different properties. * This is the primary configuration type used throughout the application. * * @template P - Property key type (e.g., 'state_id', 'priority', 'assignee') - * @template V - Value type for the filter */
🧹 Nitpick comments (1)
packages/shared-state/src/store/rich-filters/filter.ts (1)
446-468: Well-implemented force update mechanism.The
forceUpdateparameter with defaultfalsepreserves backward compatibility while enabling explicit updates when needed. The condition!forceUpdate && isEqual(...)correctly short-circuits the equality check when forcing. The JSDoc is clear about the parameter's purpose.One minor observation: consider documenting a use case for
forceUpdatein the JSDoc (e.g., "useful when the same value needs to trigger re-notification to observers").
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
packages/shared-state/src/store/rich-filters/filter.tspackages/types/src/rich-filters/config/filter-config.tspackages/types/src/rich-filters/operator-configs/core.tspackages/types/src/rich-filters/operator-configs/index.tspackages/utils/src/rich-filters/factories/configs/shared.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/work-item-filters/configs/filters/priority.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/user.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,mts,cts}
📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)
**/*.{ts,tsx,mts,cts}: Useconsttype parameters for more precise literal inference in TypeScript 5.0+
Use thesatisfiesoperator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicitisreturn types in filter/check functions
UseNoInfer<T>utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing inswitch(true)blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacyexperimentalDecorators
Useusingdeclarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Usewith { type: "json" }for import attributes; avoid deprecatedassertsyntax (TypeScript 5.3/5.8+)
Useimport typeexplicitly when importing types to ensure they are erased during compilation, respectingverbatimModuleSyntaxflag
Use.ts,.mts,.ctsextensions inimport typestatements (TypeScript 5.2+)
Useimport type { Type } from "mod" with { "resolution-mode": "import" }for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize newSetmethods likeunion,intersection, etc., when available (TypeScript 5.5+)
UseObject.groupBy/Map.groupBystandard methods for grouping instead of external libraries (TypeScript 5.4+)
UsePromise.withResolvers()for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted,toSpliced,with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields viasuperin classes (TypeScript 5....
Files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/shared-state/src/store/rich-filters/filter.tspackages/utils/src/work-item-filters/configs/filters/priority.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Enable TypeScript strict mode and ensure all files are fully typed
Files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/shared-state/src/store/rich-filters/filter.tspackages/utils/src/work-item-filters/configs/filters/priority.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
**/*.{js,jsx,ts,tsx,json,css}
📄 CodeRabbit inference engine (AGENTS.md)
Use Prettier with Tailwind plugin for code formatting, run
pnpm fix:format
Files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/shared-state/src/store/rich-filters/filter.tspackages/utils/src/work-item-filters/configs/filters/priority.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,jsx,ts,tsx}: Use ESLint with shared config across packages, adhering to max warnings limits per package
Use camelCase for variable and function names, PascalCase for components and types
Use try-catch with proper error types and log errors appropriately
Files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/shared-state/src/store/rich-filters/filter.tspackages/utils/src/work-item-filters/configs/filters/priority.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
packages/shared-state/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Maintain MobX stores in
packages/shared-stateusing reactive patterns
Files:
packages/shared-state/src/store/rich-filters/filter.ts
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Leverage inferred type predicates to reduce the need for explicit `is` return types in filter/check functions
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Leverage inferred type predicates to reduce the need for explicit `is` return types in filter/check functions
Applied to files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/state.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use the `satisfies` operator to validate types without widening them
Applied to files:
packages/types/src/rich-filters/config/filter-config.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/rich-filters/factories/configs/shared.ts
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use `const` type parameters for more precise literal inference in TypeScript 5.0+
Applied to files:
packages/types/src/rich-filters/config/filter-config.tspackages/utils/src/work-item-filters/configs/filters/date.tspackages/utils/src/work-item-filters/configs/filters/cycle.tspackages/utils/src/work-item-filters/configs/filters/user.tspackages/utils/src/work-item-filters/configs/filters/label.tspackages/utils/src/work-item-filters/configs/filters/project.tspackages/types/src/rich-filters/operator-configs/index.tspackages/types/src/rich-filters/operator-configs/core.tspackages/utils/src/work-item-filters/configs/filters/module.tspackages/utils/src/rich-filters/factories/configs/shared.ts
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Rely on narrowing from direct boolean comparisons for type guards
Applied to files:
packages/types/src/rich-filters/operator-configs/index.ts
📚 Learning: 2025-11-25T10:18:05.172Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: .github/instructions/typescript.instructions.md:0-0
Timestamp: 2025-11-25T10:18:05.172Z
Learning: Applies to **/*.{ts,tsx,mts,cts} : Use constant indices to narrow object/array properties (TypeScript 5.5+)
Applied to files:
packages/types/src/rich-filters/operator-configs/index.ts
📚 Learning: 2025-12-12T15:20:36.542Z
Learnt from: CR
Repo: makeplane/plane PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T15:20:36.542Z
Learning: Applies to packages/shared-state/**/*.{ts,tsx} : Maintain MobX stores in `packages/shared-state` using reactive patterns
Applied to files:
packages/utils/src/work-item-filters/configs/filters/state.ts
🧬 Code graph analysis (13)
packages/types/src/rich-filters/config/filter-config.ts (2)
packages/types/src/rich-filters/expression.ts (1)
TFilterProperty(19-19)packages/types/src/rich-filters/operator-configs/index.ts (1)
TOperatorConfigMap(43-46)
packages/utils/src/work-item-filters/configs/filters/date.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/work-item-filters/configs/filters/cycle.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/work-item-filters/configs/filters/user.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/shared-state/src/store/rich-filters/filter.ts (2)
packages/types/src/rich-filters/expression.ts (1)
TFilterValue(24-24)packages/types/src/utils.ts (1)
SingleOrArray(9-9)
packages/utils/src/work-item-filters/configs/filters/priority.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/work-item-filters/configs/filters/label.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/work-item-filters/configs/filters/project.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/types/src/rich-filters/operator-configs/index.ts (3)
packages/types/src/rich-filters/operator-configs/core.ts (3)
TCoreExactOperatorConfigs(11-13)TCoreInOperatorConfigs(16-16)TCoreRangeOperatorConfigs(19-19)packages/types/src/rich-filters/operator-configs/extended.ts (4)
TExtendedExactOperatorConfigs(4-4)TExtendedInOperatorConfigs(7-7)TExtendedRangeOperatorConfigs(10-10)TExtendedOperatorSpecificConfigs(13-13)packages/types/src/rich-filters/operators/index.ts (3)
EQUALITY_OPERATOR(25-28)COLLECTION_OPERATOR(30-33)COMPARISON_OPERATOR(35-38)
packages/types/src/rich-filters/operator-configs/core.ts (3)
packages/types/src/rich-filters/field-types/core.ts (4)
TSingleSelectFilterFieldConfig(51-55)TDateFilterFieldConfig(28-31)TMultiSelectFilterFieldConfig(63-68)TDateRangeFilterFieldConfig(39-42)packages/types/src/rich-filters/expression.ts (1)
TFilterValue(24-24)packages/types/src/rich-filters/operators/core.ts (3)
CORE_EQUALITY_OPERATOR(11-13)CORE_COLLECTION_OPERATOR(18-20)CORE_COMPARISON_OPERATOR(25-27)
packages/utils/src/work-item-filters/configs/filters/state.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/work-item-filters/configs/filters/module.ts (1)
packages/utils/src/rich-filters/factories/configs/shared.ts (1)
createFilterConfig(22-22)
packages/utils/src/rich-filters/factories/configs/shared.ts (3)
packages/types/src/rich-filters/config/filter-config.ts (1)
TFilterConfig(11-20)packages/types/src/rich-filters/operator-configs/index.ts (1)
TOperatorSpecificConfigs(33-37)packages/types/src/rich-filters/operators/index.ts (1)
TSupportedOperators(56-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Cursor Bugbot
- GitHub Check: Build packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (16)
packages/utils/src/work-item-filters/configs/filters/cycle.ts (1)
48-48: LGTM! Mechanical type parameter simplification.The change from
createFilterConfig<P, string>tocreateFilterConfig<P>correctly aligns with the PR's objective to decouple filter value types from filter configurations. This allows operators to specify their own value types instead of being constrained to a single type per filter.packages/utils/src/work-item-filters/configs/filters/priority.ts (1)
52-52: LGTM! Consistent with the refactoring pattern.The removal of the second generic parameter aligns with the broader refactor to simplify filter configuration type parameters.
packages/utils/src/work-item-filters/configs/filters/module.ts (1)
48-48: LGTM! Type parameter simplification applied consistently.The change correctly removes the value type parameter, aligning with the refactor objectives.
packages/utils/src/work-item-filters/configs/filters/project.ts (1)
19-19: LGTM! Mechanical refactor applied consistently.packages/utils/src/work-item-filters/configs/filters/label.ts (1)
48-48: LGTM! Refactor applied consistently.packages/utils/src/work-item-filters/configs/filters/date.ts (1)
18-18: LGTM! All date filter configs updated consistently.All four date filter config builders (
getStartDateFilterConfig,getTargetDateFilterConfig,getCreatedAtFilterConfig,getUpdatedAtFilterConfig) have been updated to remove theDatetype parameter, maintaining consistency with the refactor across all filter types.Also applies to: 36-36, 54-54, 72-72
packages/types/src/rich-filters/config/filter-config.ts (2)
1-1: LGTM! Import updated to match new type signature.Correctly removes
TFilterValueimport as the type is no longer parameterized by value type.
11-17: LGTM! Core type refactor successfully decouples value types from filter config.The removal of the
Vgeneric parameter fromTFilterConfigand the change to use non-genericTOperatorConfigMapenables operators to have different value types instead of being constrained to a single type per filter. This is the foundational change that enables all the mechanical updates across filter config builders.packages/utils/src/work-item-filters/configs/filters/state.ts (1)
51-51: LGTM! Both state filter configs updated consistently.Both
getStateGroupFilterConfigandgetStateFilterConfighave been updated to remove their respective type parameters (TStateGroupsandstring), maintaining consistency with the broader refactor.Also applies to: 105-105
packages/utils/src/work-item-filters/configs/filters/user.ts (2)
21-34: LGTM!The removal of the second generic parameter from
createFilterConfig<P>aligns correctly with the updated signature inshared.ts. The filter configuration structure remains intact while simplifying the type parameterization.
49-62: Consistent refactoring across all user filter builders.The same pattern is correctly applied to
getMentionFilterConfig,getCreatedByFilterConfig, andgetSubscriberFilterConfig. All now usecreateFilterConfig<P>without the value type parameter, maintaining consistency with the PR's goal of decoupling value types from filter configurations.Also applies to: 77-90, 105-118
packages/shared-state/src/store/rich-filters/filter.ts (1)
113-117: Interface update looks good.The new optional
forceUpdate?: booleanparameter is correctly added to the interface, maintaining backward compatibility since it's optional.packages/types/src/rich-filters/operator-configs/core.ts (1)
10-26: Type simplification aligns with PR goals.Removing the generic
Vparameter from operator config types and usingTFilterValuedirectly is consistent with the PR's objective to make value types operator-specific. The underlying field types (TSingleSelectFilterFieldConfig<TFilterValue>, etc.) still provide the structure, while the config level no longer constrains to specific value subtypes.This trade-off of slightly less precise config-level typing for increased flexibility in handling diverse value types per operator is reasonable given the stated problem.
packages/types/src/rich-filters/operator-configs/index.ts (1)
33-46: Type mapping and Map definition look correct.The
TOperatorSpecificConfigsmapped type correctly associates each operator with its composed config type, and the intersection withTExtendedOperatorSpecificConfigsallows for extensibility. TheTOperatorConfigMaptype usingMap<keyof TOperatorSpecificConfigs, TOperatorSpecificConfigs[keyof TOperatorSpecificConfigs]>provides proper key-value typing for the operator config storage.packages/utils/src/rich-filters/factories/configs/shared.ts (2)
22-22: Simplified createFilterConfig signature.Removing the value type generic
VfromcreateFilterConfigaligns with the PR's goal of decoupling value types from filter configurations. The function remains a simple identity helper for type inference with just the property typeP.
64-74: Good approach for Map compatibility, but note the type widening trade-off.The return type
[TSupportedOperators, TOperatorSpecificConfigs[keyof TOperatorSpecificConfigs]]is necessary for theMapconstructor to accept entries with different config types. While the inputconfigFnreturns the specific typeT, the tuple return type is widened to the union of all possible configs.This is a reasonable trade-off: you lose the ability to infer the specific config type from the return value, but gain the flexibility to construct heterogeneous operator config maps. The type safety is preserved because
T extends TOperatorSpecificConfigs[keyof TOperatorSpecificConfigs]ensures only valid configs can be passed in.
…ions Eliminate the generic value type parameter from filter configurations to allow for operator-specific value types. This change enhances flexibility by enabling different operators to accept various value types for the same filter property. - Updated TFilterConfig and related interfaces to remove value type constraints - Adjusted filter configuration methods and types accordingly - Refactored date operator support to align with the new structure
Description
Problem
Filter configurations were constrained to a single value type (e.g.,
TFilterConfig<'priority', TIssuePriorities>), but different operators for the same filter can accept different value types.Solution
TFilterConfig<P, V>→TFilterConfig<P>forceUpdateparameter toupdateConditionValue()for explicit updatesImpact
Files Changed
filter-config.ts,operator-configs/*updateConditionValueinfilter.tsType of Change
Note
Refactor rich filter typing
TFilterConfig<P, V>toTFilterConfig<P>and removeTFilterValuegenerics across config, manager, and factories; move value typing to operator-specific configs (TOperatorSpecificConfigs,TOperatorConfigMap).FilterConfig,FilterConfigManager, and all work-item filter creators (state, priority, user, date, cycle, label, module, project) to new signatures.forceUpdate?: booleantoupdateConditionValue()inFilterInstanceto allow explicit updates even when values are equal.CalendarwithCalendarLayoutIconfor created/updated date filters.Written by Cursor Bugbot for commit ccce43b. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.