Conversation
This reverts commit 3f53c65.
* ✨ Add Polar package and checkout flow * 🔥 Remove slack webhook example * ♻️ Fix conflict in package file * ♻️ Update to have build time deps in devdependencies * ♻️ Update lock file
* updates sponsorship page with latest packages and statistics * restore things lost in the paste * fix broke ass countup * pacify linter * dynamic year * animation and intrigue * cruft * Apply suggestions from code review Co-authored-by: Robbie Wagner <rwwagner90@gmail.com> * adds text balance to the headline * fix code rabbit nit * restore product IDs to ad reads * hookup new products * fix readme * updates alignment, adds link to contact page, adds param to sponsor for frequency --------- Co-authored-by: Robbie Wagner <rwwagner90@gmail.com>
📝 WalkthroughWalkthroughAdds a Collections feature: static collection data and pages, computed collection logic from transcripts, topic/LLM keyword utilities and an analysis script, a nav link, a small CSS support rule, a package.json dependency update, and a .gitignore correction. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as Analyze CLI
participant FS as File System (transcripts)
participant App as App Data (getAllEpisodes)
participant Scorer as TopicScorer (topic-keywords)
participant Output as Console / Files
CLI->>App: load episodes (getAllEpisodes)
CLI->>FS: read transcript files
FS-->>CLI: transcript text
CLI->>Scorer: score transcript (LLM/topics)
Scorer-->>CLI: relevance scores
CLI->>CLI: aggregate scores, update collection memberships
CLI->>Output: log results / emit collection slugs
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 64: Remove the unused "tsx" devDependency from package.json: locate the
"tsx": "^4.21.0" entry in the dependencies/devDependencies block and delete that
line, then run the project's package manager (npm/yarn/pnpm) to update the
lockfile and node_modules so the dependency is fully removed; verify no scripts
or configs (e.g., vitest.config.ts) rely on the "tsx" package before committing.
In `@scripts/analyze-transcripts.ts`:
- Around line 189-200: The scoreLLMRelevance function builds unescaped RegExp
from LLM_KEYWORDS and matches against lowerText, which causes short tokens (like
"ts") to match unintended substrings; update scoreLLMRelevance to escape each
keyword (e.g., replace special regex chars) and wrap with word boundaries (\\b)
when constructing the RegExp so you only count whole-word matches; apply the
same change to the other similar matching routines referenced (the blocks around
lines 238-249 and 491-500) so all keyword-based scoring uses escaped,
word-boundary regexes.
In `@src/pages/collections/index.astro`:
- Around line 55-61: The map callback for collection.latestEpisodes includes an
unused parameter named index which triggers the linter; update the mapping
expression collection.latestEpisodes.map((episode, index) => ...) to remove the
unused index parameter so it becomes collection.latestEpisodes.map(episode =>
...) (or use _ if you intend to keep it intentionally unused), ensuring the
component render signature for the img uses only episode.
🧹 Nitpick comments (3)
src/pages/collections/index.astro (1)
11-22: Optional: pre-index episodes by slug to avoid repeated scans.
Current approach filters all episodes for each collection (O(collections × episodes)). Pre-indexing can reduce work on larger catalogs.♻️ Possible refactor (adjust typings as needed)
// For each collection, get the 4 latest episodes +const episodesBySlug = new Map( + allEpisodes.map((episode) => [episode.episodeSlug, episode]) +); + const collectionsWithEpisodes = collections.map((collection) => { - const collectionEpisodes = allEpisodes - .filter((episode) => collection.episodeSlugs.includes(episode.episodeSlug)) + const collectionEpisodes = collection.episodeSlugs + .map((slug) => episodesBySlug.get(slug)) + .filter( + (episode): episode is (typeof allEpisodes)[number] => Boolean(episode) + ) .sort((a, b) => b.published - a.published) .slice(0, 4); // Get 4 latest episodessrc/pages/collections/[slug].astro (2)
19-22: Prefer aSetfor episode slug lookups.This reduces lookup cost when collections or episode lists grow.
♻️ Suggested refactor
-// Filter episodes that belong to this collection and sort newest-first -const collectionEpisodes = allEpisodes - .filter((episode) => collection.episodeSlugs.includes(episode.episodeSlug)) - .sort((a, b) => b.published - a.published); +// Filter episodes that belong to this collection and sort newest-first +const episodeSlugSet = new Set(collection.episodeSlugs); +const collectionEpisodes = allEpisodes + .filter((episode) => episodeSlugSet.has(episode.episodeSlug)) + .sort((a, b) => b.published - a.published);
62-115: Optional: addrel="prev"/rel="next"on pagination links.Helps SEO and navigation semantics.
✨ Optional tweak
- <a - href={`/collections/${prevCollection.slug}`} + <a + href={`/collections/${prevCollection.slug}`} + rel="prev" class="group relative grid overflow-hidden rounded-lg bg-light-card dark:bg-dark-card transition-transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 dark:focus:ring-offset-dark-background" > ... - <a - href={`/collections/${nextCollection.slug}`} + <a + href={`/collections/${nextCollection.slug}`} + rel="next" class="group relative grid overflow-hidden rounded-lg bg-light-card dark:bg-dark-card transition-transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:ring-offset-2 dark:focus:ring-offset-dark-background" >
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/pages/collections/index.astro`:
- Around line 13-42: The current selection loop uses usedImageUrls + getImg
(which can return show.image) and can yield imageGroupEpisodes empty for
collections that do have episodes; modify collections.map so after the existing
loop (which populates unique, seenInGroup and updates usedImageUrls) you detect
if unique.length === 0 && eps.length > 0 and then perform a fallback: pick the
newest episode (eps[0]) and push it into unique and (optionally) add its image
to usedImageUrls, or exempt show.image from being marked in usedImageUrls so
fallback thumbnails aren’t blocked; reference the symbols usedImageUrls, getImg,
eps, unique, seenInGroup, and imageGroupEpisodes when making this change.
Summary by CodeRabbit
New Features
Style
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.