Skip to content

fix(web): defuse date time bomb in push-relay admin settings test - #589

Merged
Quick104 merged 1 commit into
mainfrom
fix/push-relay-test-expiry
Aug 11, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/push-relay-test-expiry

Conversation

@Quick104

@Quick104 Quick104 commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

NotificationsAdminSettings.test.tsx > shows the Silo Push Relay channel status started failing on every PR's Web CI as of today (2026-08-10) — including on clean main. The fixture hardcodes notifications.push_relay_expires_at: "2026-08-10T00:00:00Z"; now that the calendar has passed it, the component correctly renders the "Expired; Silo will renew…" branch instead of "…renews automatically", and the assertion fails. A date time bomb, not a code regression.

Approach

Make the fixture expiration relative (Date.now() + 30d) so the not-yet-expired branch stays stable forever. No component changes; the expired branch's copy is unasserted either way.

Verification

npx vitest run src/pages/admin-settings/NotificationsAdminSettings.test.tsx — 2/2 pass (was 1 failing). Lint 0 errors, format clean.

Risks & follow-up

None — test-only. Unblocks Web CI for all open PRs (#308, #439, and anything else currently red on this assertion).

AI-use disclosure

Implemented by Claude Code with human oversight.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated notification settings test data to use a dynamically generated expiration date, ensuring renewal scenarios remain reliable over time.

The fixture hardcoded push_relay_expires_at as 2026-08-10, so once the
calendar reached that date the component rendered the "Expired" branch
and the "renews automatically" assertion failed on every branch's CI.
Use a relative +30d expiration so the not-yet-expired branch stays
stable.

Co-Authored-By: Claude Fable 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f72aae8-3b2d-400d-b412-fe658738f42b

📥 Commits

Reviewing files that changed from the base of the PR and between 881c968 and 4c7c8b2.

📒 Files selected for processing (1)
  • web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx

📝 Walkthrough

Walkthrough

The notification settings test fixture now calculates the push-relay expiration date 30 days after the current time instead of using a fixed timestamp.

Changes

Notifications test fixture

Layer / File(s) Summary
Dynamic expiration date
web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx
The push-relay expiration date is generated 30 days in the future.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ 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 clearly describes the fix to the date-based test failure in the push-relay admin settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/push-relay-test-expiry

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

@Quick104
Quick104 merged commit b25ddf8 into main Aug 11, 2026
4 checks passed
@Quick104
Quick104 deleted the fix/push-relay-test-expiry branch August 11, 2026 16:16
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.

1 participant