Skip to content

feat(episode-carousel): highlight currently viewed episode - #13

Merged
Quick104 merged 1 commit into
mainfrom
t3code/2f7d918d
May 27, 2026
Merged

Quick104 merged 1 commit into
mainfrom
t3code/2f7d918d

Conversation

@Quick104

@Quick104 Quick104 commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Highlight the currently viewed episode in the episode carousel with a primary-colored ring and a "Now Viewing" badge with a pulsing indicator
  • Add aria-current="page" to the current episode's links for accessibility
  • Add padding to the embla viewport to accommodate the new ring/shadow without clipping

Testing

  • Not run

Note

Low Risk
Item-detail carousel UI and accessibility only; no API, auth, or data changes.

Overview
The More Episodes carousel on episode detail now makes the active episode obvious at a glance and for assistive tech.

The current slide uses a primary-colored ring (via box-shadow instead of a tinted border), a “Now Viewing” pill with a pulsing dot on the still, and aria-current="page" on both thumbnail and title links. The Embla viewport gains py-4 pl-4 so the ring and badge are not clipped. Styling is consolidated with cn() and a short border/shadow transition.

Reviewed by Cursor Bugbot for commit 5b32b01. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Added a "Now Viewing" badge overlay to clearly identify the currently selected episode in the carousel.
  • Style

    • Enhanced the episode carousel layout with improved padding and refined episode card styling.
    • Improved navigation accessibility with enhanced link attributes for keyboard users.

Review Change Stack

- Add "Now Viewing" badge with pulsing indicator on current episode
- Replace border with primary-color ring for current episode card
- Set aria-current="page" on links to the current episode
@Quick104
Quick104 merged commit 1070c62 into main May 27, 2026
1 of 2 checks passed
@Quick104
Quick104 deleted the t3code/2f7d918d branch May 27, 2026 01:29
@coderabbitai

coderabbitai Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 25577c17-9298-444a-9e79-83a1ce7555ee

📥 Commits

Reviewing files that changed from the base of the PR and between 811ce54 and 5b32b01.

📒 Files selected for processing (1)
  • web/src/pages/ItemDetail/components/EpisodeCarousel.tsx

📝 Walkthrough

Walkthrough

The EpisodeCarousel component receives visual and accessibility enhancements to better present the currently-viewed episode. The component imports a class-name utility, adds viewport padding, conditionally styles episode cards based on current state, renders a badge overlay, and marks the current episode with semantic accessibility attributes.

Changes

Episode Carousel Current-Episode Highlighting

Layer / File(s) Summary
Current episode visual and accessibility enhancements
web/src/pages/ItemDetail/components/EpisodeCarousel.tsx
cn utility is imported and used to compute conditional episode card styling (borders, outlines, shadows) for the current episode. Carousel viewport gains py-4 pl-4 padding. A "Now Viewing" badge overlay renders when an episode is current. Both the thumbnail and text links set aria-current="page" when isCurrent.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A carousel spins with episodes bright,
The current one now catches the light! 🌟
A badge and a glow mark the way,
With aria whispers that guide through the play,
Accessibility and style dance in harmony's sway. 🐰

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/2f7d918d

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

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5b32b01. Configure here.

)}

<div ref={emblaRef} className="embla__viewport overflow-hidden">
<div ref={emblaRef} className="embla__viewport overflow-hidden py-4 pl-4">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing right padding causes ring clipping on last slide

Medium Severity

The viewport padding py-4 pl-4 accommodates the ring/shadow on the top, bottom, and left sides, but omits right padding (pr-4). When the last episode is the currently viewed one and the carousel is scrolled to the end, the 2px box-shadow ring on the right edge gets clipped by overflow-hidden. Other carousels in the codebase (e.g., MediaCarousel.tsx, BrandCarousel.tsx) include right padding on their viewports for this reason.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5b32b01. Configure here.

Quick104 added a commit to thezak48/silo-server that referenced this pull request Jun 7, 2026
feat(episode-carousel): highlight currently viewed episode
Quick104 added a commit that referenced this pull request Jun 11, 2026
feat(episode-carousel): highlight currently viewed episode
CoffeeKnyte added a commit that referenced this pull request Jul 31, 2026
…accurate

Five defects in revocation state and credential semantics. Lands after the
tracker-lifecycle batch on purpose: raising the over-cap TTL is only safe once
the count feeding it is trustworthy.

#13 -- a longer old revocation suppressed a newer cutoff. applyLocal kept or
replaced the WHOLE record by expiry, so when the existing revocation expired
later the new one was dropped entirely, including its newer RevokedAt. The
durable upsert did the same, with a comment documenting it as intentional.
RevokedAt is the user-kill CUTOFF, so this left a credential issued between the
two cutoffs valid -- a second admin kill after a user re-authenticates silently
failed to cut them. The two fields now merge independently: ExpiresAt stays
monotonic, RevokedAt advances to the later value, and reason follows the newer
cutoff. Both superseded comments are replaced rather than left contradicting the
code. Session-kind revocation still ignores RevokedAt, so the enforcer's
re-revoke cannot weaken a session kill.

Also fixed while here: Redis received the merged record but pub/sub published the
raw input one, so under pub/sub-only delivery (Redis down) an edge got the newer
short record without the older long expiry and lost monotonicity. Both now carry
the merged record.

#7 + M1 -- Postgres could indefinitely block the urgent Redis kill.
RevokeWithWarnings held the global opMu across all propagation, stripped the
caller's deadline with WithoutCancel, and did the durable Postgres upsert BEFORE
Redis, on a pool with no statement timeout. The local kill still applied, so
playback on that process was fine -- but edge propagation, pub/sub, the admin
response and every later revoke/unrevoke stalled behind the lock. Redis and
pub/sub now go first, and the detached context is bounded. WithoutCancel is kept
deliberately: propagation must outlive an aborted admin request.

opMu scope is deliberately NOT narrowed. mirrorToRedis is an unconditional SET
with no atomic merge, so same-process serialization is what stops an older value
overwriting a newer one; narrowing the lock would also let an unrevoke interleave
with a revoke's propagation. Bounding the context caps how long the lock can be
held, which is the actual reported harm. The remaining cross-replica race -- two
central replicas racing the same SET -- is documented, not half-fixed; it needs
A6's shared picture.

A2 / #6 -- a missed unrevoke got resurrected. In-memory tombstones already
existed, but being process-local they did not survive a restart or reach a
replica that missed the pub/sub event, so maintain's durable self-heal
re-Upserted the surviving entry and the ban returned. Tombstones are now durable,
via two nullable columns on stream_revocations rather than a second table: a
tombstone is a state of the same key, and it needs its own expiry horizon
separate from the revocation's. The upsert rejects a stale replica's write while
a tombstone is live but lets a genuinely newer revocation clear it, and warm
paths apply tombstones BEFORE revocations so an un-banned key cannot be restored
as a live kill. Tombstones are pruned on the same sweep, so the table cannot grow
without bound.

A1 / #3 -- over-cap kills reopened after 5 minutes while the token stayed
reconstructable for 24h. The TTL now derives from playback.MaxTokenTTL rather
than duplicating 24h, behind a validated setting.

Critically, the enforcer uses a revoke-if-absent path rather than re-revoking.
Expiry is monotonic and the enforcer re-evaluates every 30s, so a plain long TTL
would slide expiry forward by another full lifetime on every pass -- making a
wrong kill effectively permanent for as long as any stale record persisted, with
only an explicit unrevoke to recover it. Admin Revoke keeps its monotonic
behaviour; only the enforcer's own repeat kill is non-extending. The setting is
documented as affecting future revocations only, since monotonic expiry means it
cannot shorten one already issued.

A3 / #5 -- the user cutoff compared against a fresh time.Now() taken at request
entry, so a request from a pre-cutoff login could look post-cutoff and escape the
kill. The credential time is now the access token's iat.

Two deliberate choices worth stating. API-key credentials carry no issue time, so
they pass the zero time and, per IsRevoked's documented contract, are never
matched by a user cutoff: a user kill provably cannot cut an API-key-owned pour.
That is an accepted, logged, documented hole -- and strictly better than
time.Now(), which actively defeats the cutoff. And jellycompat uses the compat
session's CreatedAt rather than the bridged Silo token's iat, because that token
refreshes without a new Jellyfin login, so its iat would advance on refresh and
let a refreshed credential slip past a cutoff.

Stream tokens are now bound to their route: a token whose SessionID does not match
the URL's session_id is rejected with 403 instead of being silently ignored,
matching the reconstruction helper that already refused a different session.

Per-login logout cuts remain out of scope -- they need per-login identity in the
stream credential. S5 (the (sessionID, userID, startedAt) clump) is rejected as
ceremony now that A3 is the iat option rather than the generation model.

#12 (closing an RSS feed does not cut its current pour) is deferred: it needs a
namespaced revocation id that cannot collide with real session ids, that id
threaded onto public feed requests, and protection against a new feed inheriting
an old tombstone.

Part of #305.
CoffeeKnyte added a commit that referenced this pull request Jul 31, 2026
…mits

Marks #13, #7/M1, A2/#6, A1/#3 and A3/#5 resolved, and records the limits this
batch accepts rather than leaving them for the next reviewer to rediscover.

Retracts the last of the two false claims flagged in the serve-path docs pass:
the kill switch now does "keep a stream dead" for the token's reconstructable
life. The other -- monitoring does not "never trust client progress" -- is still
false and stays flagged until decision A5 lands.

Newly documented accepted limits:

- A user cutoff cannot cut an API-key-owned pour. API-key credentials carry no
  issue time, so they take the zero credential time and IsRevoked's documented
  fail-open contract applies. Deliberate, logged, and better than substituting
  time.Now(), which actively defeats the cutoff.
- Two central replicas revoking the same key can still race the Redis mirror,
  because mirrorToRedis is an unconditional SET rather than an atomic merge.
  Same-process writes are serialized by opMu; cross-replica convergence needs
  A6's shared picture.
- The over-cap TTL setting affects future revocations only. Monotonic expiry
  means it cannot shorten an existing kill; only an explicit unrevoke clears one,
  and the enforcer may recreate it while the over-count persists.
- Per-login logout cuts are still unavailable: cutting one device's live streams
  needs per-login identity in the stream credential, which is the
  authorization-generation model rather than the iat model chosen here.

Records that the enforcer's repeat kill is non-extending and why: with monotonic
expiry and a 30s evaluation loop, a plain long TTL would renew a wrong kill
indefinitely for as long as any stale record survived.

Part of #305.
@Rhainland Rhainland mentioned this pull request Oct 27, 2026
15 tasks
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.

1 participant