Skip to content

regression(ABAC): "All" dates filter defaulting to 1969#37983

Merged
tassoevan merged 1 commit intorelease-8.0.0from
reg-abac-1969
Dec 27, 2025
Merged

regression(ABAC): "All" dates filter defaulting to 1969#37983
tassoevan merged 1 commit intorelease-8.0.0from
reg-abac-1969

Conversation

@MartinSchoeler
Copy link
Member

@MartinSchoeler MartinSchoeler commented Dec 26, 2025

Proposed changes (including videos or screenshots)

Instead of defaulting to the 0 epoch time, set the dates as undefined, this way the endpoints will return data from all dates

Issue(s)

ABAC-112

Steps to test or reproduce

Further comments

I've checked the other implementations of this component and they are working fine with these changes

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed date range handling in the moderation tools to properly initialize empty date ranges, improving consistency in date picker behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2025

⚠️ No Changeset found

Latest commit: 8e51dd4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 26, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Walkthrough

The DateRangePicker component in the moderation admin panel was modified to address a user-facing issue where selecting "All" dates displayed 1969 as the start date. The change removes the todayDate constant and replaces the "alldates" range initialization (previously moment(0) and todayDate) with empty strings for both start and end dates.

Changes

Cohort / File(s) Summary
DateRangePicker default date handling
apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsx
Removed todayDate constant; modified "alldates" range to use empty strings instead of epoch-based moment(0) and todayDate, eliminating the 1969 display issue. Month/week range calculations remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • tassoevan

Poem

🐰 No more ancient dates so strange,
Empty strings for every range,
1969 takes its flight,
Logs now show what's truly right! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a regression where the 'All' dates filter was defaulting to 1969 (Unix epoch), which is the primary issue addressed in the PR.
Linked Issues check ✅ Passed The PR directly addresses ABAC-112 by removing the Unix epoch default and setting dates to empty strings/undefined, which resolves the 1969 display issue when 'All' is selected.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the 'All' dates filter issue; only the DateRangePicker component's date handling was modified with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch reg-abac-1969

📜 Recent review details

Configuration used: Organization 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 0bb2a33 and 8e51dd4.

📒 Files selected for processing (1)
  • apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsx
🧰 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.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). (10)
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
  • GitHub Check: 🔨 Test Federation Matrix
🔇 Additional comments (1)
apps/meteor/client/views/admin/moderation/helpers/DateRangePicker.tsx (1)

60-64: Implementation is correct—empty strings properly handled downstream.

Verification confirms the change works as intended. The downstream code in ModerationConsoleTable.tsx (and ModConsoleUsersTable.tsx) uses falsy checks (...(end && { latest: ... }) and ...(start && { oldest: ... })) to conditionally include date filters in the API query. Empty strings fail these checks and are correctly omitted from the query, achieving the desired "no date filter" behavior. The initial state also initializes with empty strings, maintaining consistency with the 'alldates' case. No date validation logic rejects empty strings, and the type signature is satisfied.

Note: The PR description mentions "undefined," but the implementation correctly uses empty strings, which is the proper choice given the type constraint.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.61%. Comparing base (0bb2a33) to head (8e51dd4).
⚠️ Report is 4 commits behind head on release-8.0.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.0.0   #37983      +/-   ##
=================================================
+ Coverage          70.60%   70.61%   +0.01%     
=================================================
  Files               3146     3146              
  Lines             108690   108689       -1     
  Branches           19523    19524       +1     
=================================================
+ Hits               76738    76751      +13     
+ Misses             29947    29936      -11     
+ Partials            2005     2002       -3     
Flag Coverage Δ
e2e 60.15% <ø> (+0.03%) ⬆️
e2e-api 47.49% <ø> (ø)
unit 71.74% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +11MiB
rocketchat 355MiB 345MiB +11MiB
omnichannel-transcript-service 132MiB 132MiB -113B
queue-worker-service 132MiB 132MiB -197B
ddp-streamer-service 126MiB 126MiB +424B
account-service 113MiB 113MiB +820B
authorization-service 111MiB 111MiB -1.2KiB
presence-service 111MiB 111MiB +815B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/26 18:46 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37983
  • Baseline: develop
  • Timestamp: 2025-12-26 18:46:04 UTC
  • Historical data points: 30

Updated: Fri, 26 Dec 2025 18:46:04 GMT

@MartinSchoeler MartinSchoeler marked this pull request as ready for review December 26, 2025 19:39
@MartinSchoeler MartinSchoeler requested a review from a team as a code owner December 26, 2025 19:39
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@tassoevan tassoevan merged commit 1f0c0d0 into release-8.0.0 Dec 27, 2025
110 of 115 checks passed
@tassoevan tassoevan deleted the reg-abac-1969 branch December 27, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants