Skip to content

(SP: 1)[FIX] temporarily disable blog categories DB fetch in locale l…#422

Merged
ViktorSvertoka merged 1 commit intodevelopfrom
lso/feat/hot-fix
Mar 28, 2026
Merged

(SP: 1)[FIX] temporarily disable blog categories DB fetch in locale l…#422
ViktorSvertoka merged 1 commit intodevelopfrom
lso/feat/hot-fix

Conversation

@liudmylasovetovs
Copy link
Copy Markdown
Collaborator

@liudmylasovetovs liudmylasovetovs commented Mar 28, 2026

Description

Temporarily removes the blog categories database fetch from frontend/app/[locale]/layout.tsx to stop the entire site from crashing in Netlify SSR runtime.

The layout was importing getCachedBlogCategories, which pulled in the Drizzle DB layer through frontend/db/index.ts on every request. In the current Netlify runtime, this path fails because the DB env is not available there, so even non-blog pages were crashing. This PR replaces that global fetch with an empty categories array as a containment hotfix.


Related Issue

Issue: #<issue_number>


Changes

  • removed the global getCachedBlogCategories(locale) call from frontend/app/[locale]/layout.tsx
  • replaced runtime blog category loading in the root locale layout with a temporary empty blogCategories array
  • kept the rest of the layout structure unchanged to minimize blast radius while isolating the SSR crash path

Database Changes (if applicable)

  • Schema migration required
  • Seed data updated
  • Breaking changes to existing queries
  • Transaction-safe migration
  • Migration tested locally on Neon

How Has This Been Tested?

  • Tested locally
  • Verified in development environment
  • Checked responsive layout (if UI-related)
  • Tested accessibility (keyboard / screen reader)

Screenshots (if applicable)

Not applicable — runtime/layout hotfix only.


Checklist

Before submitting

  • Code has been self-reviewed
  • No TypeScript or console errors
  • Code follows project conventions
  • Scope is limited to this feature/fix
  • No unrelated refactors included
  • English used in code, commits, and docs
  • New dependencies discussed with team
  • Database migration tested locally (if applicable)
  • GitHub Projects card moved to In Review

Reviewers

Summary by CodeRabbit

  • Refactor
    • Modified data loading behavior to initialize blog categories as an empty list instead of fetching them concurrently.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
devlovers-net Ignored Ignored Mar 28, 2026 8:11am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc34b194-770b-4048-99e8-e91e92c47587

📥 Commits

Reviewing files that changed from the base of the PR and between 79191c2 and e3c1c08.

📒 Files selected for processing (1)
  • frontend/app/[locale]/layout.tsx

📝 Walkthrough

Walkthrough

The layout component's concurrent data fetching has been simplified by commenting out the getCachedBlogCategories import and its associated concurrent fetch. The Promise.all pattern for parallel loading has been replaced with a single sequential getMessages call, while blogCategories is now initialized as an empty array and passed to dependent components.

Changes

Cohort / File(s) Summary
Layout Data Fetching
frontend/app/[locale]/layout.tsx
Removed concurrent fetching of blog categories; replaced Promise.all([getMessages, getCachedBlogCategories]) with sequential getMessages call. Initialized blogCategories as empty typed array instead of fetched data.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • LesiaUKR
  • AM1007
  • ViktorSvertoka

Poem

🐰 A simpler path we've carved today,
No more waiting for blog's delay,
Messages fetch—swift and true,
Empty categories, fresh and new,
Layout flows with lighter weight!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lso/feat/hot-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ViktorSvertoka ViktorSvertoka merged commit 75662f4 into develop Mar 28, 2026
7 of 8 checks passed
@ViktorSvertoka ViktorSvertoka deleted the lso/feat/hot-fix branch March 28, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants