fix: RI Exchange active-RI column filters + immediate override-delete Undo toast - #1435
Conversation
…ble (closes #1414) Add per-column categorical and numeric filter controls to the Active Convertible RIs table in the RI Exchange view, matching the existing behavior of the Reshape Recommendations table (introduced in PRs #789 and #791). The regression left `renderRIsTable` with no filter buttons. - Add `ActiveRiColumnId`, `ActiveRiColumnFilter`, `ActiveRiColumnFilters` types and state slice to `state.ts` - Add `applyActiveRiColumnFilters` (exported), popover state machine, and all helper functions to `riexchange.ts`; wire filter buttons into `renderRIsTable` header cells for Instance Type, AZ, Count, Offering, and Utilization columns - Add DOM-level regression test file with 4 tests: button presence, popover detachment to body, categorical narrowing, numeric narrowing - Restore `getActiveRiColumnFilters` mock in existing describe blocks that call `jest.resetAllMocks()`, preventing cross-describe contamination
|
@coderabbitai review |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
) The Undo toast for deleting a Service Defaults override was awaited behind loadOverridesPanel + refreshRecommendationsAfterOverrideChange, the latter issuing a full page-worth of recommendation API calls. A slow refresh delayed the toast long enough that users reported seeing no Undo affordance at all. Show the toast immediately after the server confirms the delete, before the panel reload and recommendations refresh. Split the delete into its own try/catch that returns early on failure, so a refresh error can no longer be misreported as "Failed to delete override" when the delete actually succeeded. Add two regression tests: one asserting the Undo toast is visible while a recommendations refresh is still in flight (fails pre-fix, passes post-fix), and one asserting a failed delete shows an error toast with no Undo and does not trigger the refresh.
|
Addressed the scope BLOCK. Summary of what I verified on Plans filters (#1414 second half): verified already present and fully wired on Reset/Delete override toast (#1415): confirmed it WAS gated. On Verification: Final closes-links: @coderabbitai review |
|
✏️ Learnings added
✅ Action performedReview finished.
|
|
Merged on the substantive CI signal (all Lint/Unit/Integration/Security/Build/E2E/Validate-Terraform green; only the non-blocking tflint pre-commit flake red). |
Summary
Two independent QA regressions were investigated. What I found and changed:
RI Exchange active-RI column filters (refs #1414)
The Active Convertible RIs table (
#ri-exchange-instances-list) had no per-column filter buttons -- PRs #789/#791 wired filters only into the Reshape Recommendations table. This PR restores them:ActiveRiColumnIdstate slice tostate.tsapplyActiveRiColumnFilterstoriexchange.ts, wiring filter buttons into the Instance Type, AZ, Count, Offering, and Utilization column headersriexchange-active-ri-filters.test.ts) with 4 tests (button presence, popover detachment todocument.body, categorical narrowing, numeric narrowing)Override-delete Undo toast (closes #1415)
The Undo toast for deleting a Service Defaults override was awaited behind
loadOverridesPanel+refreshRecommendationsAfterOverrideChange(a full page-worth of recommendation API calls). A slow refresh delayed the toast enough that QA saw no Undo affordance. Fix:Scope notes on issue #1414 (why not
closes)Issue #1414 covers RI Exchange and Plans tables. I verified the current state of both on
main:main(plans.tsfilterBtnper column +applyPlansColumnFilters+openPlansColumnPopover, covered byplans-column-filters.test.ts). QA's Plans repro (sheet row 534) is most likely stale.This PR does not touch the Plans table, so it intentionally uses
refs #1414rather thancloses #1414to avoid auto-closing the Plans half before it is re-verified by QA. A QA-reverify follow-up will confirm/close the Plans half.Verification
cd frontend && npm test-- exit 0, 2609 passed, 1 skipped, 0 failedcd frontend && npm run build-- exit 0 (only the pre-existing entrypoint-size warning)#1415immediacy test confirmed to FAIL against pre-fixsettings.ts(toast undefined) and PASS aftercloses #1415
refs #1414