-
Notifications
You must be signed in to change notification settings - Fork 12.6k
regression(ABAC): Wrong default date range in ABAC Logs page #37749
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
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughThe DateRangePicker component gains a configurable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ 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)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/abac #37749 +/- ##
=============================================
+ Coverage 54.50% 54.56% +0.06%
=============================================
Files 2633 2633
Lines 50105 50105
Branches 11224 11224
=============================================
+ Hits 27308 27339 +31
+ Misses 20607 20590 -17
+ Partials 2190 2176 -14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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: 0
🧹 Nitpick comments (1)
apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsx (1)
8-11: ConfigurabledefaultSelectedKeyand mount initialization look correctThe new
defaultSelectedKeyprop, its default to'alldates', the mount-timehandleOptionClick(defaultSelectedKey)call, and wiring through to theSelecttogether give a clean, backwards-compatible way to choose the initial range while preserving existing “all dates” behavior for callers that don’t pass it.If you ever need the picker to react to a changing
defaultSelectedKeyprop (beyond just initial mount), you could adddefaultSelectedKey(andhandleOptionClick) to theuseEffectdependency array, but as-is the “initialize once” behavior matches the “default*” naming.Also applies to: 27-27, 73-75, 79-79
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/meteor/client/views/admin/ABAC/ABACLogsTab/LogsPage.tsx(1 hunks)apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsx(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsxapps/meteor/client/views/admin/ABAC/ABACLogsTab/LogsPage.tsx
⏰ 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: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (1)
apps/meteor/client/views/admin/ABAC/ABACLogsTab/LogsPage.tsx (1)
122-128: UsingdefaultSelectedKey='today'here correctly fixes ABAC-90Passing
defaultSelectedKey='today'aligns the DateRangePicker’s initial selection with the locally initializedstartDate/endDate, so the logs panel now opens with a “today” range instead of “all dates” (epoch). This is scoped to this page and preserves the default'alldates'behavior elsewhere.
e36b13e to
608cff0
Compare
Proposed changes (including videos or screenshots)
The default value for the rangepicker component was hardcoded to be "all dates", fixed by allowing a custom default value (if no value is provided, default to all dates)
Issue(s)
ABAC-90
Steps to test or reproduce
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.