fix(standard.site): publish episode docs with publication AT-URI#23
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough
ChangesAT-URI site field and backfill migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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)
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 |
Bluesky shows the publication-promoted card by resolving a site.standard.document record's `site` field to the publication record. Episodes were published with `site: https://whiskey.fm` (a bare URL), so the publication ref was never attached and shared links showed no publication status. Write the publication AT-URI instead; the page URL still reconstructs as publication.url + path. (Existing 247 records were already migrated in place out-of-band.)
40bd0fb to
11da41f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/publish-episodes.ts`:
- Around line 97-100: The environment guard checking for STANDARD_SITE_URL or
siteUrl is now stale since the code has been refactored to use publication
AT-URIs via getPublicationAtUri() which requires only the publisher DID and
publication rkey. Remove the conditional gating that checks for siteUrl or
STANDARD_SITE_URL in the publish logic, as siteUrl is no longer part of the
publication payload and this guard can unnecessarily skip publishing. This stale
gating occurs at multiple locations in the file (around lines 97-100 and 147),
so ensure all instances that check for siteUrl or STANDARD_SITE_URL as a
prerequisite for publishing are removed or refactored to not require this check.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 149decc3-520d-4a32-892c-bfd764529374
📒 Files selected for processing (3)
package.jsonscripts/fix-document-sites.tsscripts/publish-episodes.ts
site now uses the publication AT-URI, so STANDARD_SITE_URL is no longer referenced; requiring it in the env guard could skip publishing unnecessarily. (per CodeRabbit review)
Bluesky shows the publication-promoted card by resolving a
site.standard.documentrecord'ssitefield → the publication record. Episodes were published withsite: "https://whiskey.fm"(a bare URL), so the publication ref was never attached and shared links showed no publication status.This makes
publish-episodes.tswrite the publication AT-URI assiteso newly-published episodes carry the publication association (the page URL still reconstructs aspublication.url+path).The existing 247 records were already migrated in place out-of-band and verified via cardyb
/v1/extract(episode URLs now return bothsite.standard.documentandsite.standard.publicationrefs). This PR only prevents future episodes from regressing.