Repository navigation
feat(web): daily video carousel on current Home (supersedes #2957) - #2966
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔍 PR Validation |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1700b54b2b
ℹ️ 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".
| --video-base: #131314; | ||
| --video-raised: #1e1f20; | ||
| --video-ink: #f5f5f7; | ||
| --video-ink-soft: #c9cacf; | ||
| --video-line: rgba(255, 255, 255, 0.22); |
There was a problem hiding this comment.
Apply theme tokens to the carousel surfaces
In Light mode, the carousel and all its cards remain dark because these local variables never reference the shared theme tokens or receive light-theme overrides. The high-contrast override also changes only the border and secondary text, leaving the surfaces unchanged. This violates the explicit Theme Parity requirement in apps/web/AGENTS.md; use the shared surface, ink, and border tokens or provide equivalent theme-specific overrides.
AGENTS.md reference: apps/web/AGENTS.md:L12-L12
Useful? React with 👍 / 👎.
| import type { HomeVideoFeed } from '@/lib/home-video-feed'; | ||
|
|
||
| async function fetchVideos(url: string): Promise<HomeVideoFeed> { | ||
| const response = await fetch(url); |
There was a problem hiding this comment.
Bound the client feed request with a timeout
If the homepage feed request stalls, this fetch has no application-level deadline, so SWR cannot enter its error/retry path and the carousel remains in its loading state until the browser or network eventually terminates the request. The server-side upstream timeout does not bound the browser-to-server connection. Add an AbortSignal.timeout() signal here, as explicitly required for every fetch by the root AGENTS.md.
AGENTS.md reference: AGENTS.md:L108-L108
Useful? React with 👍 / 👎.
| } catch { | ||
| return Response.json( |
There was a problem hiding this comment.
Log feed failures before returning the generic 503
When getHomeVideoFeed() fails, this bare catch discards the exception and returns a generic 503 without any application diagnostic. This also hides unexpected implementation failures, not just expected upstream outages, making production failures difficult to investigate. Capture and log the exception while retaining the sanitized response; the root AGENTS.md explicitly prohibits bare catches without logging.
AGENTS.md reference: AGENTS.md:L109-L109
Useful? React with 👍 / 👎.
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|


Outcome
Rebuilds the v0 daily video carousel from #2957 on the current Home (
app/page.tsx). Latest Tech / Business / AI videos from YouTube channel RSS feeds, cached 24h, shown in a keyboard-accessible carousel with click-to-play privacy-enhanced embeds (youtube-nocookie).Scope
lib/home-video-feed.ts(+ tests): feed fetch, strict XML validation (no DOCTYPE/ENTITY, size cap, zod schema),unstable_cache24h, stable daily selection.app/api/home/videos/route.ts: read-only JSON, 503 +Retry-Afterwhen all sources fail.components/home/DailyVideoCarousel.tsx(+ test), mounted inapp/page.tsxbetween the hero and the Studio preview.lib/auth-paths.ts:/api/home/videosadded to the public exact-path allowlist.styles/home-simple.css: carousel styles in the existing Home stylesheet. Premium dark panel (#131314 / #1E1F20 bases, cobalt-violet-cyan-magenta gradients), no green, works in light and dark themes, high-contrast and reduced-motion handled.fast-xml-parser@^5.12.1added vianpm install -w apps/web(lockfile regenerated by npm).LiveOnRampfiles are not re-added. Nothing under.github/touched. CSP already allowsi.ytimg.comandyoutube-nocookie.com.Risk
Low. Additive and isolated; the only existing-file behavior change is one public API path. External dependency on YouTube RSS availability, with honest empty/partial/unavailable states in the UI.
Verification (apps/web, KV_REST_API_*/Redis env unset)
eslint src: cleantsc --noEmit: cleanvitest run: 202 files passed, 1969 tests passed (55 skipped, pre-existing)next build: succeeds,/api/home/videosregistered as a dynamic routetest_workflow_pr_gate_coverage.pyandtest_repository_reconciliation_workflow.py: 92 passedSupersedes #2957
Closes #2965