Add shared Logo component and password_reset_tokens migration#73
Conversation
Replace duplicated header/sidebar logo links with a single reusable Logo component, add container padding, and remove unused default Next.js public assets.
📝 WalkthroughWalkthroughThe PR adds password reset token database storage, introduces a shared homepage logo component, updates header and sidebar branding, adds container padding, and removes Firebase messaging logic from the service worker. ChangesPassword reset storage
Web shell updates
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
backend/internal/infrastructure/database/migrations/20260627161855_password_reset_tokens.sql (1)
4-4: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueConsider an index on
If the application queries tokens by
WHERE email = $1 AND used_at IS NULL AND expires_at > NOW()would require a full table scan without an index onThis depends on the actual access patterns in the application layer.
🤖 Prompt for 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. In `@backend/internal/infrastructure/database/migrations/20260627161855_password_reset_tokens.sql` at line 4, The password reset token table may require an index for email-based lookups. Review the application queries for active or invalidated tokens by email, and if applicable add an index on the email column in the migration, optionally including used_at and expires_at when supported by the query patterns.web/components/common/Logo.tsx (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
cn()instead of template string interpolation for className.The
Containercomponent in this same PR usescn()to merge Tailwind classes viatwMerge, butLogouses raw template interpolation. This means conflicting classes passed throughclassName(e.g.text-lgvs the defaulttext-sm) won't be resolved bytwMergeand will rely on CSS source order. Usecn()for consistency and correct conflict resolution.♻️ Proposed refactor
import Link from 'next/link' +import { cn } from '`@/lib/utils`' export function Logo({ className }: { className?: string }) { return ( - <Link href="/" className={`text-sm font-semibold tracking-tight hover:opacity-70 transition-opacity ${className ?? ''}`}> + <Link href="/" className={cn("text-sm font-semibold tracking-tight hover:opacity-70 transition-opacity", className)}> App </Link> ) }🤖 Prompt for 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. In `@web/components/common/Logo.tsx` at line 5, Replace the template-string className construction in the Logo component’s Link with the shared cn() utility, passing the default classes and optional className as arguments so Tailwind conflicts are resolved consistently with Container.
🤖 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.
Nitpick comments:
In
`@backend/internal/infrastructure/database/migrations/20260627161855_password_reset_tokens.sql`:
- Line 4: The password reset token table may require an index for email-based
lookups. Review the application queries for active or invalidated tokens by
email, and if applicable add an index on the email column in the migration,
optionally including used_at and expires_at when supported by the query
patterns.
In `@web/components/common/Logo.tsx`:
- Line 5: Replace the template-string className construction in the Logo
component’s Link with the shared cn() utility, passing the default classes and
optional className as arguments so Tailwind conflicts are resolved consistently
with Container.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d490f8d4-9574-46d9-b2de-528f7c3c9bad
⛔ Files ignored due to path filters (5)
web/public/file.svgis excluded by!**/*.svgweb/public/globe.svgis excluded by!**/*.svgweb/public/next.svgis excluded by!**/*.svgweb/public/vercel.svgis excluded by!**/*.svgweb/public/window.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
backend/internal/infrastructure/database/migrations/20260627161855_password_reset_tokens.sqlweb/components/common/Logo.tsxweb/components/common/container.tsxweb/components/layout/AppSidebar.tsxweb/components/layout/header.tsxweb/public/firebase-messaging-sw.js
💤 Files with no reviewable changes (1)
- web/public/firebase-messaging-sw.js
Summary
Logocomponent used by bothAppSidebarandheader, removing duplicated logo markupContainerpassword_reset_tokensgoose migration (backend, no application code wired up yet)Test plan
cd web && pnpm lint && pnpm buildcd web && pnpm testcd backend && make migrate-statusto confirm the new migration is picked upSummary by CodeRabbit
New Features
Bug Fixes