fix: /feed.xml relation crash + blue form-input focus ring#1333
Conversation
The schema barrel re-exports four tables under camelCase aliases for app
ergonomics (post_votes as postVotes, etc.). Passing the whole module
namespace to drizzle put two keys per table into its tableNamesMap; the
collision made drizzle attach each join table's relations to the alias
key and leave the canonical key with none. Relational queries that walk a
many-relation on those tables (with: { tags }, with: { votes }) then threw
"There is not enough information to infer relation posts.tags" — which is
exactly what /feed.xml does, so the RSS feed 500'd.
Strip the aliases from the schema object handed to drizzle so each table
is registered once; app code still imports the aliases from the barrel
unchanged. Adds a regression test that builds the /feed.xml query.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tailwindcss/forms paints a hardcoded blue (#2563eb) focus ring and border on every form control, so text inputs lit up blue while links and buttons already used the mint :focus-visible ring. Override the plugin's ring colour and border to the accent token for all form controls, keeping an accessible (now on-brand, thin) focus indicator instead of the off-palette blue. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe PR fixes a Drizzle ORM relational query failure by stripping four camelCase barrel alias exports ( ChangesDrizzle Schema Alias Collision Fix
Accent Focus Ring Override
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
…less inputs Code review hardening: - relations test now asserts comment_votes and feed_sources relations register too (not just post_tags/post_votes), and builds a query walking votes + source — covering all four stripped aliases, not just two. - focus-ring override now also targets bare `input:not([type])`, which @tailwindcss/forms styles but the typed-selector list missed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two production fixes.
1.
/feed.xml500 — "There is not enough information to infer relation posts.tags"Sentry:
GET /feed.xmlthrowing on every request (13 events).Root cause: the schema barrel re-exports four tables under camelCase aliases (
post_votes as postVotes,comment_votes as commentVotes,post_tags as postTags,feed_sources as feedSources).server/db/index.tspassed the wholeimport * as schemanamespace to drizzle, so two keys pointed at the same table object, colliding drizzle'stableNamesMap. Drizzle attached each join table's relations to the alias key and left the canonical key with empty relations — so anymanyrelational walk (with: { tags },with: { votes }) couldn't find the reverse relation and threw./feed.xmluseswith: { tags: { with: { tag: true } } }, so it 500'd.bookmarks/comments(no alias) worked, which is why it looked selective.Fix: strip the four aliases from the schema object handed to drizzle so each table is registered once. App code still imports the aliases from the barrel unchanged. Added
server/db/relations.test.tsthat asserts the join-table relations register and the exact/feed.xmlquery builds.Verified by reproducing the build error locally, then confirming it's gone after the fix (
post_tags/post_votesrelations now populate; the feed query.toSQL()no longer throws).2. Blue focus ring on form inputs
@tailwindcss/formspaints a hardcoded blue (#2563eb) focus ring + border on every form control, so text inputs lit up blue while links/buttons already used the mint:focus-visiblering. Recoloured the plugin's ring + border to the--color-accenttoken for all form controls — keeps an accessible, thin, on-brand focus indicator instead of the off-palette blue.Verified via Playwright: input focus ring went from
#2563eb→rgb(45 212 191)(accent); links/buttons unchanged; the command-palette input's existing subtle-underline treatment is unaffected.Checks
ESLint clean ·
tsc0 errors ·server/db/relations.test.ts+utils/url.test.tspass (9 tests)🤖 Generated with Claude Code