Skip to content

Resolve#86

Closed
krishnnag998-del wants to merge 2 commits into
hrx01-dev:mainfrom
krishnnag998-del:resolve
Closed

Resolve#86
krishnnag998-del wants to merge 2 commits into
hrx01-dev:mainfrom
krishnnag998-del:resolve

Conversation

@krishnnag998-del

@krishnnag998-del krishnnag998-del commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

##discription
prerender issues

Summary by CodeRabbit

  • Improvements

    • Enhanced application initialization reliability with fallback configuration support, ensuring stability across different setup scenarios.
    • Optimized internal request handling and infrastructure for improved performance.
  • Refactor

    • Streamlined core routing architecture for better code organization without affecting user-visible functionality.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f8a42536-900e-413e-9e0b-b23e04a6f943

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea51c8 and abdcc55.

📒 Files selected for processing (3)
  • scripts/prerender.js
  • src/Firebase/firebase.ts
  • src/app/App.tsx

📝 Walkthrough

Walkthrough

Three independent fixes: BrowserRouter is removed as a JSX wrapper from App.tsx so AuthProvider directly contains Routes; each firebaseConfig field in firebase.ts gains a mock string fallback via ||; and the prerender server's URL-to-file path construction switches from path.normalize/path.resolve to path.join(DIST_DIR, urlPath).

Changes

Router, Firebase config, and prerender path fixes

Layer / File(s) Summary
Remove BrowserRouter wrapper from App
src/app/App.tsx
BrowserRouter is removed from the import and from the JSX tree; AuthProvider now directly wraps Routes and all route declarations.
Firebase config mock fallbacks
src/Firebase/firebase.ts
All seven firebaseConfig fields (apiKey, authDomain, projectId, storageBucket, messagingSenderId, appId, measurementId) now use import.meta.env.* || "<mock_value>" fallbacks.
Prerender server path construction
scripts/prerender.js
URL-to-filesystem path building drops path.normalize/path.resolve in favour of path.join(DIST_DIR, urlPath); the existing startsWith(distDirResolved) directory-traversal guard is retained.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • hrx01-dev/Servio#41: Modifies React Router wiring in src/app/App.tsx and related router setup, directly overlapping with the BrowserRouter removal in this PR.
  • hrx01-dev/Servio#42: Works on the same scripts/prerender.js HTTP server path normalization/mapping logic that this PR modifies.
  • hrx01-dev/Servio#52: Modifies src/Firebase/firebase.ts to drive firebaseConfig from import.meta.env, the same file and pattern extended here with fallback defaults.

Suggested labels

bug

🐇 A router unwrapped, a config with care,
Mock keys and join paths floating in air.
BrowserRouter gone, the providers align,
And prerender walks paths in a straight, tidy line.
Hop hop, little fixes — the build is just fine! 🌟

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@hrx01-dev hrx01-dev closed this Jun 20, 2026
@krishnnag998-del krishnnag998-del deleted the resolve branch June 20, 2026 21:25
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