plan 0012: updates blog follow-ups — draft visibility fix + RSS feed#356
Merged
Conversation
The public reads relied on RLS alone, but policies OR together: an admin's session satisfies 'Admins read all posts', so their own drafts showed up on /updates. The public queries now filter published=true explicitly; RLS stays the gate for everyone else. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Su6PHag9FiG2AL3mhmzvSp
New rss-feed edge function renders the RSS 2.0 feed server-side — feed readers can't run the SPA and hosting is static-assets-only. Anon-key read of published posts (RLS gate), 15-min edge cache, tags as categories. lib/rssFeed.ts derives the URL from the baked backend; /updates gets a subscribe pill and both public pages emit the rel=alternate autodiscovery link via a new useDocumentHead feedUrl option. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Su6PHag9FiG2AL3mhmzvSp
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lapwing | 9a03282 | Commit Preview URL Branch Preview URL |
Jul 25 2026, 03:09 AM |
|
Updates to Preview Branch (claude/updates-blog-cms-b2yoeu) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Coverage SummaryLines: 57.41% (6614/11520) · Statements: 56.51% · Functions: 55.14% · Branches: 53.38% Per-file coverage
|
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two follow-ups to the updates blog (#352, plan 0012) that landed after that PR merged:
/updates. The public reads (fetchPublishedPosts,fetchPostBySlug) now filterpublished = trueexplicitly; RLS remains the gate for everyone else. Anonymous visitors were never affected.rss-feededge function renders the RSS 2.0 feed server-side (feed readers can't run the SPA and hosting is static-assets-only): anon-key read of published posts through RLS, excerpt descriptions, tags as<category>, 15-minute edge cache./updatesgets an "RSS feed" subscribe pill, and both public pages emit the<link rel="alternate" type="application/rss+xml">autodiscovery tag (newfeedUrloption onuseDocumentHead).lib/rssFeed.tsderives the feed URL from the bakedVITE_SUPABASE_URL, so each deployment links its own backend. Registered insupabase/config.toml(verify_jwt = false).The feed lives on the Supabase functions domain; a pretty same-domain URL (
/feed.xml) would need a Cloudflare Worker script — same deferred infrastructure as per-post OG cards, noted in the plan doc.Related Issues
Follow-up to #352.
Type of Change
Checklist
npm run lintpassesnpm run typecheckpassesnpm run test:runpassesnpm run buildsucceedsREADME.md,CLAUDE.md, Credits,CHANGELOG.md) —docs/backend.md,docs/plans/0012-updates-blog-cms.md, and the CHANGELOG blog entry now mention the feeddatalogParser.ts, added tests, updated the formats tableNotes for Reviewers
rss-feededge function duplicates a trimmed copy ofderiveExcerpt(Deno functions are self-contained and can't import fromsrc/) — flagged in the plan doc so the two stay in step.curl https://<project-ref>.supabase.co/functions/v1/rss-feedshould return RSS XML listing published posts only.🤖 Generated with Claude Code
https://claude.ai/code/session_01Su6PHag9FiG2AL3mhmzvSp
Generated by Claude Code