feat(frontend/riexchange): inline column filters via shared lib (refs #166) - #789
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 8 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
Rate Limit Exceeded
|
a3d6aa3 to
7ef4327
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…lters slice Mirrors the recommendations slice shape (extracted in #570) so the RI Exchange reshape-recommendations table can wire inline column filters via the shared applyColumnFilters helper. Slice is independent of the recommendations slice — column-id shape is reshape-specific (source/target instance types, normalized units, utilization %), and persistence stays out of scope on this iteration to match the existing pattern. Refs #166.
Wires per-column filter popovers to the RI Exchange reshape-recommendations table using the helpers extracted in merged #570 (parseNumericFilter + applyColumnFilters). Categorical columns (Source RI, Source/Target instance types, Reason) get a checkbox-list popover; numeric columns (Source/Target count, Utilization %, Normalized used/purchased) get a free-text expression popover that supports `>N`, `>=N`, `<N`, `<=N`, `N..M` ranges, exact match, and comma-separated OR. Numeric predicates compare against the display-rounded cell value so a user typing the displayed figure (e.g. 95.0 for utilization) matches the cell they see. Broken expressions are skipped (inline error in the popover) rather than collapsing the table. Filter state lives in the RI Exchange-specific slice on state.ts; no cross-tab coupling. No drive-by changes to the rest of the RI Exchange page (convertible-RI table, exchange modal, automation settings, history). Test-mocks for the riexchange + riexchange-permissions suites updated to expose the new state getters/setters so the existing happy-path assertions still pass. Refs #166.
Adds focused regression coverage for the RI Exchange filter wiring on top of the shared lib (issue #166 follow-up to merged #570): * empty filter record returns a defensive clone of the input * numeric expression filter narrows by predicate * categorical set filter narrows by membership * multiple filters AND together across kinds * broken numeric expressions are skipped rather than treated as match-none * numeric predicates compare against the display-rounded cell value (utilization toFixed(1) regression guard) * clearing a column drops its narrowing The popover / state-slice / button-rendering wiring is exercised by the existing riexchange test suite; this file pins the pure-function contract the lib + extractor + precision composition relies on. Refs #166.
7ef4327 to
8bc017d
Compare
|
Rebased on Verification post-rebase: @coderabbitai review |
|
🧠 Learnings used✅ Action performedReview finished.
|
Summary
Wires inline column filters to the RI Exchange reshape-recommendations
table using the helpers extracted in merged #570 (
parseNumericFilter+generic
applyColumnFilters). Each column header now carries a filterbutton that opens a popover; numeric columns get a free-text expression
input (supports
>N,>=N,<N,<=N,N..M, exact match,comma-separated OR), categorical columns get a checkbox list with an
"(All)" tri-state and a Clear footer.
Numeric predicates compare against the display-rounded cell value so
typing the figure the user sees (e.g.
95.0for utilization) matchesthe rendered cell.
Columns wired
Scope guard
settings, or exchange history.
follow-up PRs that own their own state slices.
min/maxHTML attributes on the modal are unrelatedinput bounds and are left alone.
Test plan
npm test -- riexchange— 65 suites pass, all 2149 tests greennpm test -- column-filters— shared-lib suite still greennpm test -- riexchange-column-filters— new 7-test regressionsuite covers expr, set, AND across kinds, invalid expr (skipped),
display-rounded comparison, and clear-column semantics
npx tsc --noEmitcleanRefs #166.