fix: support RFC3339 timestamps in parseTrialExpiry and update banner background colors - #5451
Merged
Merged
Conversation
Contributor
📝 WalkthroughSummary by CodeRabbit
WalkthroughTrial expiry parsing now accepts valid dates with optional time suffixes, while the expiry banner uses fixed background colors for expired/critical and warning states. ChangesTrial expiry handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
impoiler
force-pushed
the
07-22-fix_parsetrialexpiry_parsing_fix
branch
2 times, most recently
from
July 22, 2026 07:17
d00ba76 to
6685c04
Compare
impoiler
force-pushed
the
07-22-fix_parsetrialexpiry_parsing_fix
branch
from
July 22, 2026 07:18
6685c04 to
92b23d9
Compare
parseTrialExpiry and update banner background colors
impoiler
marked this pull request as ready for review
July 22, 2026 07:20
Contributor
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@ui/components/trialExpiryBanner.tsx`:
- Line 22: Update the conditional class expression in the trial expiry banner to
add dark-mode background classes paired with the existing dark-mode red-400 and
amber-400 foreground colors, ensuring both expired/critical and warning states
remain readable in dark mode while preserving the current light-mode styles.
In `@ui/lib/constants/config.ts`:
- Around line 18-20: Update dateRegex in the date parsing logic to validate the
complete supported timestamp suffix rather than accepting arbitrary text after
the date. Preserve date-only parsing and any intentionally supported RFC3339
variants, reject malformed values such as “2024-01-01Tgarbage”, and add
regression coverage for invalid suffixes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b9ae48b2-37eb-4a2d-87cd-e7a53c1da60d
📒 Files selected for processing (2)
ui/components/trialExpiryBanner.tsxui/lib/constants/config.ts
akshaydeo
approved these changes
Jul 22, 2026
Contributor
Merge activity
|
akshaydeo
pushed a commit
that referenced
this pull request
Jul 24, 2026
…er background colors (#5451) ## Summary Fixes two issues with the trial expiry banner: the background colours were using Tailwind opacity-modifier classes that didn't render correctly, and the trial expiry date parser rejected RFC3339 timestamps (e.g. `2024-06-01T00:00:00Z`) injected by the Docker build, causing the banner to silently disappear. ## Changes - Replaced `bg-red-500/10` and `bg-amber-500/10` with explicit hex values (`#ffebea` and `#fff4e4`) to ensure the banner background renders as intended in both expired/critical and warning states. - Updated `parseTrialExpiry` to accept both bare `YYYY-MM-DD` dates and full RFC3339 timestamps. Only the calendar date portion is used (interpreted at local midnight), so the time component is stripped before parsing. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Set `TRIAL_EXPIRY_DATE` to an RFC3339 value such as `2024-06-01T00:00:00Z` and confirm the banner appears with the correct background colour. 2. Set it to a bare date such as `2024-06-01` and confirm the banner still renders correctly. 3. Set it to a date within the warning window and confirm the amber (`#fff4e4`) background is shown. 4. Set it to an expired or critical date and confirm the red (`#ffebea`) background is shown. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Before: banner background was invisible due to unresolved Tailwind opacity-modifier classes. After: banner displays the correct solid tinted background in both warning and expired/critical states. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
akhsaul
pushed a commit
to akhsaul/bifrost
that referenced
this pull request
Aug 27, 2026
…er background colors (maximhq#5451) ## Summary Fixes two issues with the trial expiry banner: the background colours were using Tailwind opacity-modifier classes that didn't render correctly, and the trial expiry date parser rejected RFC3339 timestamps (e.g. `2024-06-01T00:00:00Z`) injected by the Docker build, causing the banner to silently disappear. ## Changes - Replaced `bg-red-500/10` and `bg-amber-500/10` with explicit hex values (`#ffebea` and `#fff4e4`) to ensure the banner background renders as intended in both expired/critical and warning states. - Updated `parseTrialExpiry` to accept both bare `YYYY-MM-DD` dates and full RFC3339 timestamps. Only the calendar date portion is used (interpreted at local midnight), so the time component is stripped before parsing. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Set `TRIAL_EXPIRY_DATE` to an RFC3339 value such as `2024-06-01T00:00:00Z` and confirm the banner appears with the correct background colour. 2. Set it to a bare date such as `2024-06-01` and confirm the banner still renders correctly. 3. Set it to a date within the warning window and confirm the amber (`#fff4e4`) background is shown. 4. Set it to an expired or critical date and confirm the red (`#ffebea`) background is shown. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Before: banner background was invisible due to unresolved Tailwind opacity-modifier classes. After: banner displays the correct solid tinted background in both warning and expired/critical states. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
occcat
pushed a commit
to occcat/bifrost
that referenced
this pull request
Sep 2, 2026
…er background colors (maximhq#5451) ## Summary Fixes two issues with the trial expiry banner: the background colours were using Tailwind opacity-modifier classes that didn't render correctly, and the trial expiry date parser rejected RFC3339 timestamps (e.g. `2024-06-01T00:00:00Z`) injected by the Docker build, causing the banner to silently disappear. ## Changes - Replaced `bg-red-500/10` and `bg-amber-500/10` with explicit hex values (`#ffebea` and `#fff4e4`) to ensure the banner background renders as intended in both expired/critical and warning states. - Updated `parseTrialExpiry` to accept both bare `YYYY-MM-DD` dates and full RFC3339 timestamps. Only the calendar date portion is used (interpreted at local midnight), so the time component is stripped before parsing. ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Set `TRIAL_EXPIRY_DATE` to an RFC3339 value such as `2024-06-01T00:00:00Z` and confirm the banner appears with the correct background colour. 2. Set it to a bare date such as `2024-06-01` and confirm the banner still renders correctly. 3. Set it to a date within the warning window and confirm the amber (`#fff4e4`) background is shown. 4. Set it to an expired or critical date and confirm the red (`#ffebea`) background is shown. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings Before: banner background was invisible due to unresolved Tailwind opacity-modifier classes. After: banner displays the correct solid tinted background in both warning and expired/critical states. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes two issues with the trial expiry banner: the background colours were using Tailwind opacity-modifier classes that didn't render correctly, and the trial expiry date parser rejected RFC3339 timestamps (e.g.
2024-06-01T00:00:00Z) injected by the Docker build, causing the banner to silently disappear.Changes
bg-red-500/10andbg-amber-500/10with explicit hex values (#ffebeaand#fff4e4) to ensure the banner background renders as intended in both expired/critical and warning states.parseTrialExpiryto accept both bareYYYY-MM-DDdates and full RFC3339 timestamps. Only the calendar date portion is used (interpreted at local midnight), so the time component is stripped before parsing.Type of change
Affected areas
How to test
TRIAL_EXPIRY_DATEto an RFC3339 value such as2024-06-01T00:00:00Zand confirm the banner appears with the correct background colour.2024-06-01and confirm the banner still renders correctly.#fff4e4) background is shown.#ffebea) background is shown.Screenshots/Recordings
Before: banner background was invisible due to unresolved Tailwind opacity-modifier classes.
After: banner displays the correct solid tinted background in both warning and expired/critical states.
Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines