Repository navigation
feat(ui): shared PageBack component for consistent back navigation - #12
Conversation
Replace the eight inconsistent back affordances across user-facing pages with a single absolute-positioned chevron pill, so the control lives in the same screen position regardless of title length or hero content. DetailBreadcrumb keeps its textual hierarchy path but no longer owns the back chevron; PageBack does. DetailHero gains a topNav slot consumed by Movie/Series/Season/Episode/Request detail pages. Non-hero pages drop their bespoke back buttons and add PageBack inside a relative wrapper. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughAdds a reusable PageBack component (label, to, preferHistory, floating), updates DetailHero to accept topNav, replaces inline back-navigation across item-detail and standard pages, simplifies breadcrumbs, removes RequestActions' onBack/back button, and adds PageBack tests. ChangesBack Navigation Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7be1f7363b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Add `floating` prop to pin PageBack to viewport on lg+ screens - Switch styling from glass-subtle to glass with shadow for better contrast - Use floating variant on SettingsLayout
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 13fe740. Configure here.
| type="button" | ||
| aria-label={label} | ||
| onClick={goBack} | ||
| className={`glass text-foreground hover:bg-accent ${position} z-20 flex items-center justify-center rounded-full p-1.5 shadow-md transition-colors`} |
There was a problem hiding this comment.
Wrong CSS class: glass instead of glass-subtle
Medium Severity
The PageBack button uses the glass CSS class, but both the design spec and PR description explicitly require glass-subtle to match the old DetailBreadcrumb chevron styling. The glass class renders a significantly more prominent effect (70% surface opacity, 20px blur, heavy drop shadow) compared to glass-subtle (40% surface opacity, 12px blur, minimal shadow). This visual mismatch is especially noticeable on hero pages with backdrop images, where the spec notes glass-subtle was chosen for contrast balance. The test also asserts the wrong class.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 13fe740. Configure here.
feat(ui): shared PageBack component for consistent back navigation
feat(ui): shared PageBack component for consistent back navigation
…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.


Summary
PageBack— a smallglass-subtlechevron pill, absolute-positioned in the top-left, callingnavigate(-1)— matching the existingDetailBreadcrumbchevron styling exactly.DetailBreadcrumbkeeps its textual hierarchy path on Season/Episode pages but no longer owns the back chevron.DetailHerogains atopNavslot that hero pages opt into; non-hero pages addPageBackinside arelativewrapper.Pages affected
Hero (slot into DetailHero): MovieContent, SeriesContent, SeasonContent, EpisodeContent, RequestDetail
Hero (new affordance, custom header): PersonDetail
Non-hero (replace existing back): SettingsLayout, RequestBrowse, CollectionEditor, SmartCollectionWizard, RecommendationsSection
Non-hero (new affordance): ProfileCustomizeHome
Component: DetailBreadcrumb (chevron removed, breadcrumb segments retained)
Out of scope: admin pages, auth/onboarding flows, playback chrome, Watch Together flows.
Spec:
docs/superpowers/specs/2026-05-26-page-back-component-design.mdTest plan
cd web && pnpm exec eslint <changed files>— 0 errors, 1 pre-existing warningcd web && pnpm exec prettier --check <changed files>— cleancd web && pnpm exec tsc -b— cleancd web && pnpm exec vitest run src/components/PageBack.test.tsx— 4 new tests pass (default label, custom label, navigate(-1) on click, positioning classes)EpisodeContent.test.tsxto drop assertions on the removed chevron link; existing path-segment link still asserted.SettingsLayout.test.tsxto check foraria-label="Go back"instead of the removedhref="/"link.make verify-local-paths— clean🤖 Generated with Claude Code
Note
Low Risk
UI-only navigation and layout changes with no API or auth impact; main review focus is correct fallback routes and history vs explicit
toon deep-linked pages.Overview
Introduces a shared
PageBackcontrol (glass chevron pill, top-left) that callsnavigate(-1)when router history exists, otherwise navigates to a configurable fallback (to, default/). OptionalpreferHistory,label, andfloating(viewport-pinned on large screens, e.g. Settings) round out the API, with Vitest coverage for navigation and styling.DetailHerogains atopNavslot; movie/series/season/episode and request detail pages passPageBackthere. Other user-facing screens replace ad-hoc ghost links, text links, and header back buttons withPageBackinsiderelativewrappers (often with top margin so content clears the overlay). Collection flows typically useto="/collections"withpreferHistory={false}; recommendations/requests browse similarly pin to their hub routes.DetailBreadcrumbdrops its leading chevron back link and keeps only the text trail; episode tests now expect a single season href (breadcrumb only, not a duplicate back control).RequestDetailremoves inline back buttons from the action bar and error state in favor of hero/headerPageBack.SettingsLayout/ wizard tests assert the accessible Go back button instead of old link markup.Reviewed by Cursor Bugbot for commit 13fe740. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Refactor
Tests