fix(dashboard): Activate fallback locale before extensions - #5061
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe i18n provider synchronously loads and activates an empty catalog for Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Dashboard Preview: https://admin-dashboard-8c1ykyc1n-vendure.vercel.app |
Dashboard extensions can evaluate translation calls before the asynchronous default catalog finishes loading. Activate an empty source-locale catalog synchronously so extension imports and compiled catalog loading remain parallel without triggering Lingui's missing-locale error.
0a91230 to
b0ebd3d
Compare
|
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@docs/docs/reference/dashboard/vite-plugin/vendure-dashboard-plugin.mdx`:
- Line 7: Update the source JSDoc in the `vendureDashboardPlugin` implementation
within `vite-plugin-vendure-dashboard.ts`, including the metadata and
`tempCompilationDir` documentation, rather than editing generated reference
output. Regenerate the reference documentation so the corresponding changes
appear under `docs/docs/reference/`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c04df112-80e0-463c-abe3-94071ede3d77
📒 Files selected for processing (1)
docs/docs/reference/dashboard/vite-plugin/vendure-dashboard-plugin.mdx
| ## vendureDashboardPlugin | ||
|
|
||
| <GenerationInfo sourceFile="packages/dashboard/vite/vite-plugin-vendure-dashboard.ts" sourceLine="242" packageName="@vendure/dashboard" since="3.4.0" /> | ||
| <GenerationInfo sourceFile="packages/dashboard/vite/vite-plugin-vendure-dashboard.ts" sourceLine="254" packageName="@vendure/dashboard" since="3.4.0" /> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Update the source JSDoc instead of editing generated reference output.
This file is auto-generated, so these metadata and tempCompilationDir documentation changes will be overwritten. Apply the documentation changes in packages/dashboard/vite/vite-plugin-vendure-dashboard.ts and regenerate the reference docs.
As per path instructions, docs/docs/reference/**: Do not edit files in docs/docs/reference/ directly - they are auto-generated by scripts and will be overwritten.
Also applies to: 26-26, 88-98
🤖 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 `@docs/docs/reference/dashboard/vite-plugin/vendure-dashboard-plugin.mdx` at
line 7, Update the source JSDoc in the `vendureDashboardPlugin` implementation
within `vite-plugin-vendure-dashboard.ts`, including the metadata and
`tempCompilationDir` documentation, rather than editing generated reference
output. Regenerate the reference documentation so the corresponding changes
appear under `docs/docs/reference/`.
Source: Path instructions
|



Description
Fixes a dashboard startup race where extensions could call Lingui translation functions before the asynchronous default catalog activated a locale. The source locale now activates synchronously with an empty catalog while the compiled dashboard and plugin catalogs continue loading in parallel, and a regression test covers extension evaluation during that window.
Breaking changes
No.
Screenshots
Not applicable.
Checklist
📌 Always:
👍 Most of the time:
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.