Conversation
- Translate all hardcoded header strings across en/uk/pl:
- NotificationBell: title, markAllRead, syncing, empty state, justNow, type labels
- LanguageSwitcher: title
- UserNavDropdown: "My Account" label
- Intl.RelativeTimeFormat now uses actual user locale (was hardcoded 'en')
- Add notification translations to actions (quiz achievement, profile name/password change)
- Fix AchievementBadge hydration mismatch: replace direct document.documentElement check
with useState(false) + useEffect + MutationObserver (eliminates SSR/client mismatch)
- Dashboard cards: unify all cards to use dashboard-card CSS class for consistent hover
- ProfileCard: make stat items clickable (Quizzes→quiz results, Points→stats, Rank→leaderboard)
with smooth scrollIntoView behavior
- CartButton: restyle to match LanguageSwitcher/NotificationBell minimal icon button
feat: header translations, dashboard UX polish & hydration fix
fix(blog,qa): restore Sanity images on Vercel and strengthen Git tab …
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for develop-devlovers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdds v1.0.3 release notes and multiple frontend changes: Sanity image optimization bypass helpers and Next.js config update, ScrollWatcher + CSS scrollbar dynamics, localization for notifications and UI, UI/styling tweaks across dashboard/header/components, client-hydration adjustments, and assorted import/refactor edits. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
frontend/components/dashboard/ProfileCard.tsx (1)
67-70: Hardcoded English strings in toast error messages.The fallback strings (
'Failed to update name','Something went wrong','Failed to update password') are not localized. Given this PR addresses hardcoded strings elsewhere, consider using translation keys for consistency.♻️ Suggested localization for toast messages
- toast.error(result.error || 'Failed to update name'); + toast.error(result.error || t('nameUpdateError')); } - } catch { - toast.error('Something went wrong'); + } catch { + toast.error(t('genericError'));(Similar for
handleUpdatePassword)Also applies to: 86-89
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/components/dashboard/ProfileCard.tsx` around lines 67 - 70, Replace hardcoded English toast messages in ProfileCard.tsx with localized translation keys: use the existing i18n hook (e.g., useTranslation to get t) and call toast.error(t('profile.updateNameFailed')) in handleUpdateName and toast.error(t('profile.somethingWentWrong')) in the catch block; do the same in handleUpdatePassword (replace its `'Failed to update password'` and catch message with appropriate t('profile.updatePasswordFailed') / t('profile.somethingWentWrong') keys). Ensure the file imports/uses useTranslation and that the translation keys are added to the locale files so the messages are not hardcoded.frontend/components/shared/ScrollWatcher.tsx (1)
7-14: Optional: annotatetimeoutas| undefinedand extract the debounce delay as a named constant.
let timeout: ReturnType<typeof setTimeout>is uninitialized;clearTimeout(timeout)on the very first scroll event (and during cleanup before any scroll) silently passesundefined, which works at runtime but can trip up TypeScript's strict definite-assignment analysis (TS2454). Naming the delay also makes the intent self-documenting.♻️ Proposed refinement
+const SCROLL_DEBOUNCE_MS = 800; + export function ScrollWatcher() { useEffect(() => { - let timeout: ReturnType<typeof setTimeout>; + let timeout: ReturnType<typeof setTimeout> | undefined; const onScroll = () => { document.documentElement.classList.add('is-scrolling'); clearTimeout(timeout); timeout = setTimeout(() => { document.documentElement.classList.remove('is-scrolling'); - }, 800); + }, SCROLL_DEBOUNCE_MS); };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/components/shared/ScrollWatcher.tsx` around lines 7 - 14, The timeout variable declared in ScrollWatcher.tsx ("timeout") is uninitialized and should be typed as possibly undefined to avoid TypeScript definite-assignment issues; update its declaration to include "| undefined" and ensure clearTimeout is only called with a possibly undefined value (current pattern is fine once typed). Also extract the hard-coded 800ms into a named constant (e.g., SCROLL_DEBOUNCE_MS) near the top and use that constant inside the onScroll debounce setTimeout so the delay is self-documenting; references: timeout, onScroll, and the new SCROLL_DEBOUNCE_MS constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 688-715: The CHANGELOG entry for "## [1.0.3] - 2026-02-23"
contains two separate "### Fixed" headings which should be merged; consolidate
the second "### Fixed" block (containing items like "SSR hydration mismatch in
AchievementBadge", "Header hardcoded locale issues", and "Notification rendering
consistency") into the first "### Fixed" list so there is a single "Fixed"
section under that release, preserving list ordering and Markdown formatting for
lint MD024 compliance and easier scanning.
In `@frontend/lib/user-stats.ts`:
- Line 3: Fix the import spacing in frontend/lib/user-stats.ts by updating the
named import line that references getAllSponsors and getSponsors so there is a
space after the comma (the import currently reads "import {
getAllSponsors,getSponsors } from '@/lib/about/github-sponsors';"); modify the
import for readability to separate the identifiers with a space while keeping
the same module path and names.
---
Nitpick comments:
In `@frontend/components/dashboard/ProfileCard.tsx`:
- Around line 67-70: Replace hardcoded English toast messages in ProfileCard.tsx
with localized translation keys: use the existing i18n hook (e.g.,
useTranslation to get t) and call toast.error(t('profile.updateNameFailed')) in
handleUpdateName and toast.error(t('profile.somethingWentWrong')) in the catch
block; do the same in handleUpdatePassword (replace its `'Failed to update
password'` and catch message with appropriate t('profile.updatePasswordFailed')
/ t('profile.somethingWentWrong') keys). Ensure the file imports/uses
useTranslation and that the translation keys are added to the locale files so
the messages are not hardcoded.
In `@frontend/components/shared/ScrollWatcher.tsx`:
- Around line 7-14: The timeout variable declared in ScrollWatcher.tsx
("timeout") is uninitialized and should be typed as possibly undefined to avoid
TypeScript definite-assignment issues; update its declaration to include "|
undefined" and ensure clearTimeout is only called with a possibly undefined
value (current pattern is fine once typed). Also extract the hard-coded 800ms
into a named constant (e.g., SCROLL_DEBOUNCE_MS) near the top and use that
constant inside the onScroll debounce setTimeout so the delay is
self-documenting; references: timeout, onScroll, and the new SCROLL_DEBOUNCE_MS
constant.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
assets/01-screencapture.pngis excluded by!**/*.pngassets/02-screencapture.pngis excluded by!**/*.pngassets/03-screencapture.pngis excluded by!**/*.pngassets/04-screencapture.pngis excluded by!**/*.pngassets/05-screencapture.pngis excluded by!**/*.pngassets/08-screencapture.pngis excluded by!**/*.pngfrontend/package-lock.jsonis excluded by!**/package-lock.jsonstudio/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (39)
CHANGELOG.mdfrontend/actions/notifications.tsfrontend/actions/quiz.tsfrontend/app/[locale]/blog/[slug]/PostDetails.tsxfrontend/app/[locale]/blog/category/[category]/page.tsxfrontend/app/[locale]/dashboard/page.tsxfrontend/app/[locale]/layout.tsxfrontend/app/[locale]/leaderboard/page.tsxfrontend/app/globals.cssfrontend/components/blog/BlogCard.tsxfrontend/components/blog/BlogFilters.tsxfrontend/components/dashboard/AchievementBadge.tsxfrontend/components/dashboard/AchievementsSection.tsxfrontend/components/dashboard/ActivityHeatmapCard.tsxfrontend/components/dashboard/ExplainedTermsCard.tsxfrontend/components/dashboard/ProfileCard.tsxfrontend/components/dashboard/QuizResultsSection.tsxfrontend/components/dashboard/StatsCard.tsxfrontend/components/header/AppMobileMenu.tsxfrontend/components/header/DesktopActions.tsxfrontend/components/header/MobileActions.tsxfrontend/components/header/NotificationBell.tsxfrontend/components/header/UserNavDropdown.tsxfrontend/components/home/FloatingCode.tsxfrontend/components/leaderboard/AchievementPips.tsxfrontend/components/shared/LanguageSwitcher.tsxfrontend/components/shared/ScrollWatcher.tsxfrontend/components/shop/header/CartButton.tsxfrontend/components/theme/ThemeToggle.tsxfrontend/data/categoryStyles.tsfrontend/db/schema/index.tsfrontend/lib/blog/image.tsfrontend/lib/user-stats.tsfrontend/messages/en.jsonfrontend/messages/pl.jsonfrontend/messages/uk.jsonfrontend/next.config.tsfrontend/package.jsonstudio/package.json
💤 Files with no reviewable changes (1)
- frontend/components/header/AppMobileMenu.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
CHANGELOG.md (1)
701-712: Extra blank lines between subsections in### Changedare inconsistent with the rest of the file.Every other
### Changedblock in this changelog (e.g., v1.0.2, v1.0.1) lists subsections without blank-line separators. The blank lines between "Q&A UI", "Header & Localization", and "Dashboard UX" here are a minor inconsistency.📝 Proposed edit
### Changed - Q&A UI: - Updated Git category tab color for stronger visual distinction from HTML - - Header & Localization: - Translated all header UI strings (en / uk / pl) - Notifications now fully localized with locale-aware relative time - LanguageSwitcher and User menu labels localized - - Dashboard UX: - Unified dashboard cards styling using shared `dashboard-card` class - Clickable profile stats with smooth scroll navigation - Improved avatar detection logic🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CHANGELOG.md` around lines 701 - 712, The `### Changed` block contains extra blank lines between subsections "Q&A UI", "Header & Localization", and "Dashboard UX" that break consistency; remove the blank-line separators so each subsection follows immediately after the previous line (matching other `### Changed` blocks like v1.0.2/v1.0.1) while keeping the subsection headings and their bullet lists unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 692-697: The changelog entry lists "Improved image optimization
across blog pages and components" under the Bug Fixes section; move that bullet
from the "Fixed" list under "Blog (Sanity):" into the "### Changed" section (or
create a "Changed" subsection if one doesn't exist) so it reads as an
enhancement; locate the exact bullet "- Improved image optimization across blog
pages and components" and remove it from the "Fixed" block and add it under
"Changed" to follow Keep a Changelog conventions.
---
Nitpick comments:
In `@CHANGELOG.md`:
- Around line 701-712: The `### Changed` block contains extra blank lines
between subsections "Q&A UI", "Header & Localization", and "Dashboard UX" that
break consistency; remove the blank-line separators so each subsection follows
immediately after the previous line (matching other `### Changed` blocks like
v1.0.2/v1.0.1) while keeping the subsection headings and their bullet lists
unchanged.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.mdfrontend/lib/user-stats.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- frontend/lib/user-stats.ts
| - Blog (Sanity): | ||
| - Fixed images not rendering on Vercel production | ||
| - Improved image optimization across blog pages and components | ||
| - SSR hydration mismatch in AchievementBadge (client/server state sync) | ||
| - Header hardcoded locale issues | ||
| - Notification rendering consistency |
There was a problem hiding this comment.
"Improved image optimization" is an enhancement, not a bug fix — move it to ### Changed.
Per Keep a Changelog conventions (which this file explicitly follows at line 5), Fixed is exclusively for bug fixes. "Improved image optimization across blog pages and components" describes a capability improvement and belongs under ### Changed.
📝 Proposed edit
- Blog (Sanity):
- Fixed images not rendering on Vercel production
- - Improved image optimization across blog pages and components ### Changed
+- Blog (Sanity):
+ - Improved image optimization across blog pages and components
+
- Q&A UI:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Blog (Sanity): | |
| - Fixed images not rendering on Vercel production | |
| - Improved image optimization across blog pages and components | |
| - SSR hydration mismatch in AchievementBadge (client/server state sync) | |
| - Header hardcoded locale issues | |
| - Notification rendering consistency | |
| ### Fixed | |
| - Blog (Sanity): | |
| - Fixed images not rendering on Vercel production | |
| - SSR hydration mismatch in AchievementBadge (client/server state sync) | |
| - Header hardcoded locale issues | |
| - Notification rendering consistency | |
| ### Changed | |
| - Blog (Sanity): | |
| - Improved image optimization across blog pages and components | |
| - Q&A UI: |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CHANGELOG.md` around lines 692 - 697, The changelog entry lists "Improved
image optimization across blog pages and components" under the Bug Fixes
section; move that bullet from the "Fixed" list under "Blog (Sanity):" into the
"### Changed" section (or create a "Changed" subsection if one doesn't exist) so
it reads as an enhancement; locate the exact bullet "- Improved image
optimization across blog pages and components" and remove it from the "Fixed"
block and add it under "Changed" to follow Keep a Changelog conventions.
DevLovers v1.0.3 - Hotfix Release
Fixed
Summary by CodeRabbit
New Features
Bug Fixes
Performance & Stability
Documentation