Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughA new Architecture Decision Record (ADR) documenting the strategic removal of Sanity CMS and its replacement with Course Builder and egghead-rails. The document outlines an eight-phase decommission plan with specific technical actions, migration patterns, and verification steps across the content pipeline. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
Sanity vs Course Builder — Live Data AuditRan a live cross-reference against Sanity project Numbers
The 729 "course" count is misleading704 of those are
The 2 actual blockers (real courses, lessons in Sanity only)
These need to either be confirmed as retired/unpublished, or migrated to Course Builder before the Sanity overlay is removed. The 220 "missing" lessons are probably fineAll first-20 samples have Outstanding decisions
ADR validationThe 8-phase order in the ADR holds up against the data:
|
There was a problem hiding this comment.
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
`@docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md`:
- Around line 237-243: The markdown contains unlabeled fenced code blocks in
docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md
(around the block listing src/utils/... at lines ~237-243 and the env var block
around ~258-272) which triggers markdownlint MD040; fix by adding a language
identifier (use "text") to the opening backticks of those fenced blocks so they
become ```text, ensuring both blocks (the file list and the environment variable
list) are updated; no other changes required.
- Line 233: Replace the mistaken recursive/replace ripgrep flags by changing
each occurrence of rg -r "sanity" src/ --type ts --type tsx to a plain search
(e.g., rg "sanity" src/ --type ts --type tsx or rg -n "sanity" src/ --type ts
--type tsx) so the verification step only searches and does not attempt
replacement, and add language identifiers (use txt) to the missing fenced code
blocks that list files and environment variables (the triple-backtick blocks
shown around the src/... list and the NEXT_PUBLIC_SANITY_PROJECT_ID list) so
they become ```txt.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2dafcf15-953d-4506-932d-546e20c83bc4
📒 Files selected for processing (1)
docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md
|
|
||
| **Phase 8 — Delete utility files and packages** | ||
|
|
||
| Run only after `rg -r "sanity" src/ --type ts --type tsx` returns no results. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Verify ripgrep flag semantics:"
rg --help | rg -n -- '-r, --replace'
echo "Quick behavioral check:"
tmp_file="$(mktemp)"
printf 'sanity\ngroq\n' > "$tmp_file"
echo "Correct search form should match:"
rg -n 'sanity|groq' "$tmp_file"
echo "Replace mode (-r) is different behavior and not intended for existence checks."
rm -f "$tmp_file"Repository: skillrecordings/egghead-next
Length of output: 309
🏁 Script executed:
cat -n docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md | sed -n '230,280p'Repository: skillrecordings/egghead-next
Length of output: 2108
🏁 Script executed:
grep -n "rg -r" docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.mdRepository: skillrecordings/egghead-next
Length of output: 349
Fix ripgrep command syntax in verification steps and add language tags to code blocks.
The file contains three instances of rg -r (replace mode) where plain search is needed for verification. Additionally, two fenced code blocks are missing language identifiers.
Suggested fixes
Line 233:
-Run only after `rg -r "sanity" src/ --type ts --type tsx` returns no results.
+Run only after `rg "sanity" src/ --type ts --type tsx` returns no results.Lines 237–243 and 258–272:
-- **Files to delete**:
+- **Files to delete**:
- ```
+ ```txt
src/utils/sanity-client.ts
src/utils/sanity-server.ts
src/utils/sanity.fetch.only.server.ts
src/lib/sanity-allowlist.ts (deleted in Phase 1)
studio/ (entire directory)
- ```
+ ```
-- **Environment variables to remove** from all `.env.*` files and Vercel project settings:
- ```
+- **Environment variables to remove** from all `.env.*` files and Vercel project settings:
+ ```txt
NEXT_PUBLIC_SANITY_PROJECT_ID
...
- ```
+ ```Lines 276–277:
-- [ ] `rg -r "sanity" src/ --type-add 'tsx:*.tsx' -t ts -t tsx --iglob '!*.test.*'` returns zero results
-- [ ] `rg -r "groq" src/ --type-add 'tsx:*.tsx' -t ts -t tsx` returns zero results
+- [ ] `rg "sanity" src/ --type-add 'tsx:*.tsx' -t ts -t tsx --iglob '!*.test.*'` returns zero results
+- [ ] `rg "groq" src/ --type-add 'tsx:*.tsx' -t ts -t tsx` returns zero results🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md`
at line 233, Replace the mistaken recursive/replace ripgrep flags by changing
each occurrence of rg -r "sanity" src/ --type ts --type tsx to a plain search
(e.g., rg "sanity" src/ --type ts --type tsx or rg -n "sanity" src/ --type ts
--type tsx) so the verification step only searches and does not attempt
replacement, and add language identifiers (use txt) to the missing fenced code
blocks that list files and environment variables (the triple-backtick blocks
shown around the src/... list and the NEXT_PUBLIC_SANITY_PROJECT_ID list) so
they become ```txt.
| ``` | ||
| src/utils/sanity-client.ts | ||
| src/utils/sanity-server.ts | ||
| src/utils/sanity.fetch.only.server.ts | ||
| src/lib/sanity-allowlist.ts (deleted in Phase 1) | ||
| studio/ (entire directory) | ||
| ``` |
There was a problem hiding this comment.
Add language identifiers to fenced code blocks.
These two fenced blocks are unlabeled and trigger markdownlint MD040.
Suggested doc fix
- ```
+ ```text
src/utils/sanity-client.ts
src/utils/sanity-server.ts
src/utils/sanity.fetch.only.server.ts
src/lib/sanity-allowlist.ts (deleted in Phase 1)
studio/ (entire directory)...
-
NEXT_PUBLIC_SANITY_PROJECT_ID NEXT_PUBLIC_SANITY_DATASET NEXT_PUBLIC_SANITY_API_VERSION NEXT_PUBLIC_SANITY_PUBLIC_KEY SANITY_EDITOR_TOKEN SANITY_WEBHOOK_SIGNATURE_SECRET SANITY_WEBHOOK_CREATED_SECRET SANITY_WEBHOOK_SECRET SANITY_API_TOKEN SANITY_STUDIO_PROJECT_ID SANITY_STUDIO_API_VERSION SANITY_STUDIO_DATASET SANITY_ALLOWLIST_MAX_AGE_SECONDS
</details>
Also applies to: 258-272
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.21.0)</summary>
[warning] 237-237: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In
@docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md
around lines 237 - 243, The markdown contains unlabeled fenced code blocks in
docs/decisions/0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md
(around the block listing src/utils/... at lines ~237-243 and the env var block
around ~258-272) which triggers markdownlint MD040; fix by adding a language
identifier (use "text") to the opening backticks of those fenced blocks so they
become ```text, ensuring both blocks (the file list and the environment variable
list) are updated; no other changes required.
</details>
<!-- fingerprinting:phantom:triton:hawk -->
<!-- This is an auto-generated comment by CodeRabbit -->
Adds ADR-0004 capturing the decision to remove Sanity CMS entirely and replace it with Course Builder (MySQL) and egghead-rails (Postgres/GraphQL).
What's in this PR
docs/decisions/ADR directory with index0004-remove-sanity-cms-and-replace-with-course-builder-and-egghead-rails.md— full MADR-style decision recordThe decision
Sanity currently serves six roles in the app: lesson metadata overlay, course metadata, video resource storage, the Tips feature, 15 editorial content pages, and the instructor creation workflow. This ADR documents the decision to remove it entirely.
The ADR covers:
rgcommands, build checks, and operational steps (Sanity webhook deregistration, Redis key cleanup, env var removal)The
SANITY_REMOVAL_PLAN.mdin the repo root is the research artifact that fed this ADR.Summary by CodeRabbit
Release Notes