Enhance pool expiry messaging with urgency levels and relative dates - #2
Merged
Merged
Conversation
Any visitor now sees a colour-coded expiry banner whenever a box has a
delete date set, not just when it is within 7 days.
The banner shows:
- The exact date ("4 Jul 2026") plus a human relative label ("in 3 months")
- A ⚠️ icon and urgent call-to-action when deletion is imminent
Colour urgency tiers (light + dark theme):
- critical (red) ≤ 7 days
- warning (orange) ≤ 30 days
- notice (yellow) ≤ 90 days
- info (blue) > 90 days
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019sA2fUMbEuMe8QTgfJanif
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
Improved the pool expiry notification system to provide more granular urgency indicators and human-friendly relative date formatting. The expiry banner now displays contextual messaging based on how soon the pool will expire, with distinct visual styling for different urgency levels.
Key Changes
BuildExpiryLabel()method to generate human-readable relative dates (e.g., "today", "tomorrow", "in 3 days", "in 2 weeks")BuildExpiryUrgency()method that categorizes expiry timeframes into four levels:critical: ≤7 days (red styling, warning emoji, action text)warning: ≤30 days (orange styling)notice: ≤90 days (yellow styling)info: >90 days (blue styling)ExpiryLabelandExpiryUrgencyproperties toGalleryModelImplementation Details
TimeSpan.TotalDaysandTotalHoursfor accurate thresholdshttps://claude.ai/code/session_019sA2fUMbEuMe8QTgfJanif