Blog and Sanity: fixes and refactoring#267
Conversation
….org JSON‑LD for Article (BlogPosting) and BreadcrumbList , Added <time datetime> tags where blog dates renders
merging develop
…he BreadcrumbList, logo to the cocial links in User info, Fixed: main container alignment, category navigation in breadcrumbs
…he BreadcrumbList, logo to the cocial links in User info, Fixed: main container alignment, category navigation in breadcrumbs
…, fied breadcrumbs category translaion, added category to the recommended cards, fixed search for localisations
merging develop
merging develop
merging develop
merging develop
feat(Blog): merging develop
merging develop
merge develop into sanity
✅ Deploy Preview for develop-devlovers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the
📝 WalkthroughWalkthroughThis PR updates blog components to use Next.js Image component, refactors BlogFilters state management to derive currentPage from URL parameters, modifies quiz-related test files and infrastructure, and contains unresolved merge conflicts in multiple files requiring manual resolution before merging. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 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)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. 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: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/components/blog/BlogHeaderSearch.tsx (1)
76-98:⚠️ Potential issue | 🟡 MinorLocale change won't refresh search items if already loaded.
Adding
localeto the dependency array is correct since it's used in the fetch URL. However, the effect guardif (!open || items.length || !isLoading)returns early whenitems.lengthis truthy, meaning a locale change won't trigger a re-fetch if items are already loaded.Consider clearing
itemswhen locale changes to ensure fresh data for the new language:🔧 Proposed fix
Add a separate effect to clear items on locale change:
+ const prevLocaleRef = useRef(locale); + + useEffect(() => { + if (prevLocaleRef.current !== locale) { + prevLocaleRef.current = locale; + setItems([]); + if (open) setIsLoading(true); + } + }, [locale, open]);frontend/lib/tests/quiz/verify-answer.test.ts (1)
10-26:⚠️ Potential issue | 🔴 CriticalUnresolved merge conflict blocks compilation.
The second conflict is around mock setup. The tests use
mockGetCorrectAnswer(lines 47, 70, 144, 163), which comes from the develop side's Redis mock pattern. The HEAD side's imports (factories, setup utilities) are not used anywhere in the test file.🐛 Proposed fix: Resolve by keeping the develop side mock setup
-<<<<<<< HEAD -import { - createCorrectAnswersMap, - createMockQuestions, - resetFactoryCounters, -} from '../factories/quiz/quiz'; -import { cleanupQuizTestEnv, setupQuizTestEnv } from './setup'; -======= // Mock the Redis module vi.mock('@/lib/quiz/quiz-answers-redis', () => ({ getCorrectAnswer: vi.fn(), })); import { getCorrectAnswer } from '@/lib/quiz/quiz-answers-redis'; const mockGetCorrectAnswer = vi.mocked(getCorrectAnswer); ->>>>>>> develop
🤖 Fix all issues with AI agents
In `@frontend/actions/quiz.ts`:
- Around line 3-4: Remove the duplicate import from 'drizzle-orm' and drop the
unused symbol: consolidate the imports so only eq and inArray are imported once
(remove the extra line that re-imports eq and inArray) and remove the unused and
import; update the import statement that currently references and, eq, inArray
to only export the actually used symbols eq and inArray to fix the compilation
error.
In `@frontend/components/quiz/QuizContainer.tsx`:
- Around line 2-7: Resolve the unresolved git conflict in QuizContainer.tsx by
removing the conflict markers (<<<<<<< HEAD, =======, >>>>>>> develop) and
keeping the develop-side import that uses the renamed icon: replace the
conflicting import block with a single import from 'lucide-react' that includes
TriangleAlert (and the other icons Ban, Clock, FileText) so the component's use
of TriangleAlert at the referenced occurrence works.
In `@frontend/lib/tests/quiz/setup.ts`:
- Around line 1-5: Resolve the Git conflict markers in setup.ts by removing the
<<<<<<<, =======, and >>>>>>> lines and keeping the vitest import line "import {
afterEach, beforeEach, vi } from 'vitest';" (these symbols are required because
the file uses vi.fn(), beforeEach, and afterEach); ensure only a single clean
import statement remains at the top so the existing vi.fn() calls compile.
In `@frontend/lib/tests/quiz/verify-answer.test.ts`:
- Around line 2-6: There is an unresolved merge conflict in the vitest imports
that removes the `vi` import used by vi.clearAllMocks() and vi.mocked(); open
the import line in verify-answer.test.ts and resolve the conflict by keeping the
develop-side import that includes `vi` (i.e., import { beforeEach, describe,
expect, it, vi } from 'vitest'), ensuring any other expected imports like
afterEach are preserved if used elsewhere in the file.
| <<<<<<< HEAD | ||
| import { afterEach, beforeEach, vi } from 'vitest'; | ||
|
|
||
| ======= | ||
| >>>>>>> develop |
There was a problem hiding this comment.
Unresolved merge conflict blocks compilation.
The file contains Git conflict markers (<<<<<<<, =======, >>>>>>>) that must be resolved before merging. The HEAD side's import is required since vi.fn() is used throughout this file (lines 37, 38, 41, 44, 50).
🐛 Proposed fix: Resolve conflict by keeping the vitest import
-<<<<<<< HEAD
import { afterEach, beforeEach, vi } from 'vitest';
-
-=======
->>>>>>> develop
+📝 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.
| <<<<<<< HEAD | |
| import { afterEach, beforeEach, vi } from 'vitest'; | |
| ======= | |
| >>>>>>> develop | |
| import { afterEach, beforeEach, vi } from 'vitest'; | |
🧰 Tools
🪛 Biome (2.3.13)
[error] 1-1: Expected a statement but instead found '<<<<<<< HEAD'.
Expected a statement here.
(parse)
[error] 3-5: Expected a statement but instead found '=======
develop'.
Expected a statement here.
(parse)
🤖 Prompt for AI Agents
In `@frontend/lib/tests/quiz/setup.ts` around lines 1 - 5, Resolve the Git
conflict markers in setup.ts by removing the <<<<<<<, =======, and >>>>>>> lines
and keeping the vitest import line "import { afterEach, beforeEach, vi } from
'vitest';" (these symbols are required because the file uses vi.fn(),
beforeEach, and afterEach); ensure only a single clean import statement remains
at the top so the existing vi.fn() calls compile.
Merging develop into sanity
Refactoring and fixes fot eslint
Summary by CodeRabbit
New Features
Improvements