Repository navigation
fix(web): keep badges readable on watched calendar cards - #4807
Conversation
A watched calendar card dimmed and greyed its whole poster layer, so the premiere, finale, digital and physical badges and the check mark faded with the artwork. The premiere badge fell well below 4.5:1 with every shipped accent. Dim only the artwork layer and leave the badges and check mark at full strength. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 21 minutes. View limit details
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
| page background behind it keeps the dimmed artwork as dark as | ||
| when the whole card faded into the page. */} | ||
| <div | ||
| className={`absolute inset-0 ${watched ? "opacity-60 grayscale" : ""}`} |
There was a problem hiding this comment.
S1 · Low. A watched season-premiere badge loses contrast when bright artwork sits behind it and the server uses the shipped red accent (#ef4444). In a fixture rendering both revisions with the app CSS, the highest sampled text contrast fell from 2.92:1 to 1.31:1 in Chromium (1.29:1 in Firefox). Moving the badge out of the grayscale layer leaves red text over a translucent red tint on a mid-grey poster, so text and fill end up close in luminance.
Suggested repair: give the premiere badge an opaque fill and a foreground that reaches 4.5:1 against it.
There was a problem hiding this comment.
The badge's translucent fill (bg-primary/20 text-primary in upcomingEventPresentation.ts) causes this, and the same badge fails on unwatched bright posters too (about 1:1 with the default accent). Before this change the watched badge also failed (2.92:1), because the grayscale turned it grey on grey. Both values are well under 4.5:1. This change keeps that line untouched because #4780 replaces it with an opaque fill, which makes the badge's contrast independent of the poster behind it. With that fill, a watched badge measures the same as an unwatched one. Until #4780 lands, this case moves from one failing value to another, so #4780 should merge first or together with this PR.
🤖 Claude Code (claude-opus-5-5)
Problem
Related issue: N/A
Validation tasks: changes #1136 C1 (minor: on watched cards the premiere badge now keeps its accent colour instead of turning grey, so premieres stand out more)
Other clients: Apple N/A (watched calendar cards aren't dimmed); Android: Android TV parity issue to follow (it dims the whole card, badges included; the phone app doesn't dim); Roku N/A (watched calendar cards show a check disc and are not dimmed)
On the web calendar, a watched event card set its whole poster area to 60% opacity and grayscale. That area also holds the badge row and the watched check mark, so the PREMIERE, NEW SEASON, FINALE, DIGITAL and PHYSICAL labels faded along with the artwork. The premiere badge suffered most: with every shipped accent preset it fell to roughly 1.5–3:1 on a watched card, well below WCAG AA's 4.5:1.
This change dims and greys only the artwork, which stays as dark as before. Badges and the check mark sit above it at full strength.
Approach
CalendarEventCardnow wraps the poster image, thumbhash placeholder, default artwork and bottom scrim in an inner layer, and only that layer getsopacity-60 grayscalewhen the event is watched. The badges and check mark stay outside it. A watched card's poster area takes the page background, so the dimmed artwork blends with the same colour as before rather than the lighter card surface. The card border no longer dims.The home row cards (
SectionItemCard,ContinueWatchingCard) show the same badges but don't dim watched items, so they need no change.The premiere badge's translucent fill is still hard to read on bright posters and with some accents, on watched and unwatched cards alike. That fill belongs to #4780, so this PR leaves
upcomingEventPresentation.tsalone.Validation
CalendarEventCardwith fixture events on a dark poster, a bright poster and no poster. Captures cover 1400, 820 and 390 px, the default, amber and sky accents, and high contrast.eslinton the changed file and the web typecheck pass. No test was added: the change is presentational, and the before/after captures are the proof.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/watched-card-badge-contrast/
Surface and build: web calendar event card, rendered in a temporary harness with fixture events; before on main, after on this branch.
Risks
None identified.
Checklist
Council review
Background review: 1 round, reviewed eaccaf9
Background review: Opus and Gemini found nothing. Sol's one finding (S1) is the bright-poster premiere badge with the red accent, which is the translucent fill #4780 replaces; answered in its thread, and it means #4780 should merge first or together with this PR.
Visual review: 2 rounds, final captures from this branch's component code
Fixed: dimmed dark posters looked lighter than before, because the artwork blended with the card surface; the poster area now takes the page background on watched cards, and sampled pixels match main. Answered: the premiere badge stays unreadable on bright posters (it is on unwatched cards too; #4780 replaces its translucent fill); the watched check-mark circle blends into dark posters and overlaps the default-artwork icon (both unchanged from main, outside this fix); the watched card border no longer dims (intended).
AI Disclosure
🤖 Generated with Claude Code
Note
Fix watched-state dimming applying to badges on CalendarEventCard
The watched opacity and grayscale styles previously sat on the outer image container, so they also dimmed badges and overlays. In CalendarEventCard.tsx, those styles now target a new absolute layer around the thumbnail, poster or default artwork, and bottom gradient. Badges stay outside that layer. The outer container uses the page background color when the event is watched.
Macroscope summarized eaccaf9.