Show switch to show/hide expired resources in ResourceList - #2386
Conversation
📝 WalkthroughWalkthroughResourceList now conditionally offers an “include expired services” switch, passes its state to ChangesExpired resource visibility
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/features/amUI/common/ResourceList/useFilteredResources.ts (1)
51-59: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd missing functions to the dependency array.
Both
isExpiredResourceandgetOwnerOrgCodeare used inside theuseMemocallback but are missing from the dependency array.🐛 Proposed fix to add missing dependencies
}, [ resources, normalizedSearch, serviceOwnerFilter, includeExpiredResources, getDescription, getOwnerName, getResourceName, + getOwnerOrgCode, + isExpiredResource, ]);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/features/amUI/common/ResourceList/useFilteredResources.ts` around lines 51 - 59, Update the useMemo dependency array in useFilteredResources to include both isExpiredResource and getOwnerOrgCode, matching the functions used by its callback while preserving the existing dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/features/amUI/common/ResourceList/useFilteredResources.ts`:
- Around line 51-59: Update the useMemo dependency array in useFilteredResources
to include both isExpiredResource and getOwnerOrgCode, matching the functions
used by its callback while preserving the existing dependencies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5d804a9d-15f7-4059-a069-b2c1eddf5a6b
📒 Files selected for processing (3)
src/features/amUI/common/ResourceList/ResourceList.module.csssrc/features/amUI/common/ResourceList/ResourceList.tsxsrc/features/amUI/common/ResourceList/useFilteredResources.ts
Description
enableSearchis on, show expired resources filter switchMigratedAppresource to the access package "Jordbruk" in AT22Related Issue(s)
Verification
Documentation
Summary by CodeRabbit
New Features
Bug Fixes