Repository navigation
ux(recommendations): persist column filters across page reload (closes #163) - #819
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
More reviews will be available in 24 minutes and 44 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 (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
…163) Add loadColumnFilters / saveColumnFilters to recommendations.ts following the same schema-versioned pattern as loadColumnVisibility. Key: cudly.recs.columnFilters.v1. Save on every mutation (categorical commit, numeric commit, per-column Clear, Clear-filters badge). Restore on first render via columnFiltersSeeded flag. Unknown column ids and malformed filter shapes are silently dropped on load; JSON errors fall back to empty. 15 new tests added; 334 total pass.
|
Rebased on Verification post-rebase: @coderabbitai review |
|
🧠 Learnings used✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
loadColumnFilters/saveColumnFiltershelpers torecommendations.tsfollowing the same pattern as the existingloadColumnVisibility/saveColumnVisibilityfunctions (issue feat(frontend/recs): per-column show/hide for the recommendations table #318).cudly.recs.columnFilters.v1(schema-versioned JSON blob).renderRecommendationsListvia acolumnFiltersSeededflag.Validation strategy
schemaVersion: 1) enables forward-incompatible migrations to skip stale blobs cleanly.VALID_COLUMN_IDSset; unknown column ids (e.g. from a stale session after a column rename) are silently dropped.kind:'set'requires a string array,kind:'expr'requires a non-empty string. Anything else is dropped without an error toast.localStorageunavailability (private browsing, quota-exceeded) fall back to empty filters silently.Test plan
loadColumnFiltersreturns{}when key is absentloadColumnFiltersreturns{}on JSON parse errorloadColumnFiltersreturns{}whenschemaVersionis wrongloadColumnFiltersreturns{}whenfiltersis not an objectkind:'set') filter correctlykind:'expr') filter correctlysaveColumnFilterswrites correctschemaVersion:1JSON shapesaveColumnFilterswrites emptyfilters:{}when no filters active{}, no error thrown334 tests passing, TypeScript clean.
Closes #163
🤖 Generated with claude-flow