Skip to content

Enhance pool expiry messaging with urgency levels and relative dates - #2

Merged
DomDom3333 merged 1 commit into
mainfrom
claude/box-delete-date-visibility-0rj5kh
Jul 22, 2026
Merged

DomDom3333 merged 1 commit into
mainfrom
claude/box-delete-date-visibility-0rj5kh

Conversation

@DomDom3333

Copy link
Copy Markdown
Owner

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

  • Backend logic: Added BuildExpiryLabel() method to generate human-readable relative dates (e.g., "today", "tomorrow", "in 3 days", "in 2 weeks")
  • Urgency classification: Added 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)
  • Model properties: Added ExpiryLabel and ExpiryUrgency properties to GalleryModel
  • UI enhancement: Redesigned expiry banner with:
    • Flexible layout using flexbox for better responsiveness
    • Contextual emoji icon (⚠️ for critical, 🗓 for others)
    • Relative date display in smaller, muted text
    • Urgent call-to-action text only shown for critical expiry
  • Styling: Added comprehensive CSS for four urgency levels with light and dark theme support, maintaining visual consistency with existing banner styles

Implementation Details

  • The expiry check now always evaluates the expiry date when present, not just when it's within 7 days
  • Relative date calculations use TimeSpan.TotalDays and TotalHours for accurate thresholds
  • Plural handling for day/week/month labels (e.g., "1 day" vs "2 days")
  • Color palette chosen for accessibility and visual hierarchy across both light and dark themes

https://claude.ai/code/session_019sA2fUMbEuMe8QTgfJanif

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
@DomDom3333
DomDom3333 merged commit 8785a9b into main Jul 22, 2026
1 check passed
@DomDom3333
DomDom3333 deleted the claude/box-delete-date-visibility-0rj5kh branch July 22, 2026 18: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.

2 participants