Skip to content

Glow watched items in calendar with green#1729

Merged
IgnisDa merged 3 commits intoIgnisDa:mainfrom
dimon222:feature/glow_calendar_watched
Mar 21, 2026
Merged

Glow watched items in calendar with green#1729
IgnisDa merged 3 commits intoIgnisDa:mainfrom
dimon222:feature/glow_calendar_watched

Conversation

@dimon222
Copy link
Copy Markdown
Contributor

@dimon222 dimon222 commented Mar 20, 2026

This is another "watched" quality of life add.
I previously asked for this feature, but decided to just contribute it.

Tl; dr - the bigger library gets the bigger calendar gets. Right now the only way in calendar to find out what you still need to watch is to either compare next vs upcoming episodes for shows/animes, or for movies to look at explicit finished checkmark.
This change does slightly different approach - it adds green glow around items that you have watched >0 times this way allowing you to see explicitly what you didn't watch yet (effectively the NON-green glowing items).

Example:
image

Summary by CodeRabbit

  • New Features
    • Calendar events detected as watched now display a distinct green-themed shadow and reduced border to differentiate them.
    • Watched status is auto-detected from your viewing history and passed into media and calendar metadata displays.
  • Style
    • Visual treatment refined for watched vs. unwatched events (shadow and border adjustments).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

Walkthrough

Adds a computed "watched" flag for calendar events inside the metadata display component, passes show/podcast extra info from the calendar route into metadata display, and updates the entity card to use a green shadow and suppress its border when a calendar event is watched.

Changes

Cohort / File(s) Summary
Entity Display Styling
apps/frontend/app/components/common/entity-display.tsx
Added optional isCalendarEventWatched?: boolean to BaseEntityDisplayItemCard. Updated cardStyle.boxShadow to use a green-themed shadow when isCalendarEventWatched is truthy (mode-aware), preserved prior yellow/blue shadow logic when not watched, included isCalendarEventWatched in useMemo deps, and changed Card withBorder to !shouldHighlightImage && !props.isCalendarEventWatched.
Metadata Display Props & Computation
apps/frontend/app/components/media/display-items.tsx
MetadataDisplayItem now accepts calendarEventShowInfo?: SeenShowExtraInformationPartFragment and calendarEventPodcastInfo?: SeenPodcastExtraInformationPartFragment. It uses userMetadataDetails to compute isCalendarEventWatched by matching show season/episode or podcast episode progress (checks timesSeen > 0) and forwards isCalendarEventWatched into BaseEntityDisplayItem.
Calendar Route — Prop Passing
apps/frontend/app/routes/_dashboard.calendar.tsx
CalendarEventMetadata now passes calendarEventShowInfo and calendarEventPodcastInfo (normalized to undefined when absent) into MetadataDisplayItem so the watched computation can run and drive downstream styling.

Sequence Diagram

sequenceDiagram
    participant CalendarRoute as CalendarEventMetadata
    participant MetadataComp as MetadataDisplayItem
    participant MetadataHook as useUserMetadataDetails
    participant EntityCard as BaseEntityDisplayItemCard

    CalendarRoute->>MetadataComp: render with calendarEventShowInfo, calendarEventPodcastInfo
    MetadataComp->>MetadataHook: request userMetadataDetails for metadataId
    MetadataHook-->>MetadataComp: return userMetadataDetails

    MetadataComp->>MetadataComp: compute isCalendarEventWatched<br/>(match show season/episode or podcast episode -> timesSeen>0)
    MetadataComp->>EntityCard: pass props including isCalendarEventWatched

    rect rgba(0,200,0,0.5)
    EntityCard->>EntityCard: apply watched styling (green shadow) and suppress border
    end

    EntityCard-->>MetadataComp: render styled card
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Glow watched items in calendar with green' directly and clearly describes the main feature being implemented—adding a green visual indicator to mark watched calendar items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/frontend/app/components/common/entity-display.tsx`:
- Line 309: The local constant isCalendarEventWatched is a redundant passthrough
of props.isCalendarEventWatched; remove the const and use
props.isCalendarEventWatched directly where referenced (e.g., inside the
cardStyle memo's boxShadow, the memo dependency array, and the withBorder prop).
Specifically, delete the line declaring isCalendarEventWatched, change boxShadow
to use props.isCalendarEventWatched, update the memo dependency array to include
props.isCalendarEventWatched instead of the removed identifier, and set
withBorder to !shouldHighlightImage && !props.isCalendarEventWatched.

In `@apps/frontend/app/routes/_dashboard.calendar.tsx`:
- Around line 113-115: Duplicate React Query subscriptions occur because
useUserMetadataDetails is called here while MetadataDisplayItem also calls it;
move the isCalendarEventWatched logic into MetadataDisplayItem or create a
shared hook (e.g., useCalendarEventWatched) that both components call so only
one source fetches userMetadataDetails, and add the same enabled/inViewport
gating used in MetadataDisplayItem to the hook call (useUserMetadataDetails) so
fetching is lazy—locate references to MetadataDisplayItem,
useUserMetadataDetails, isCalendarEventWatched, inViewport and
props.item.metadataId to implement the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 360f6f11-f6ce-4d28-bfee-7509d390a26d

📥 Commits

Reviewing files that changed from the base of the PR and between 27993df and 9a9b624.

📒 Files selected for processing (3)
  • apps/frontend/app/components/common/entity-display.tsx
  • apps/frontend/app/components/media/display-items.tsx
  • apps/frontend/app/routes/_dashboard.calendar.tsx

@IgnisDa
Copy link
Copy Markdown
Owner

IgnisDa commented Mar 21, 2026

Made some small re-ordering changes, rest looks good. Will merge this soon. Thanks for the PR!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/frontend/app/components/media/display-items.tsx`:
- Around line 7-8: The two new type imports are out of alphabetical order; swap
the specifiers so SeenPodcastExtraInformationPartFragment comes before
SeenShowExtraInformationPartFragment in the import list (update the import line
in display-items.tsx that currently contains type
SeenShowExtraInformationPartFragment, type
SeenPodcastExtraInformationPartFragment to the correct alphabetical order).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2cf4f93c-7a84-4a31-b884-232c2936efc6

📥 Commits

Reviewing files that changed from the base of the PR and between 1e6ce93 and c03f847.

📒 Files selected for processing (2)
  • apps/frontend/app/components/common/entity-display.tsx
  • apps/frontend/app/components/media/display-items.tsx

@IgnisDa IgnisDa merged commit 8a3450e into IgnisDa:main Mar 21, 2026
10 checks passed
@dimon222 dimon222 deleted the feature/glow_calendar_watched branch March 21, 2026 11:49
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