feat(docs): add bilingual sectioned documentation shell - #129
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe docs app now supports English and Vietnamese locale routing, localized content and metadata, English fallback notices, locale-aware generated outputs, updated section navigation metadata, and expanded validation and end-to-end coverage. ChangesLocalized documentation experience
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant Proxy
participant DocsPage
participant ContentSource
Browser->>Proxy: Request /vi/docs/{slug}
Proxy->>DocsPage: Route with locale vi
DocsPage->>ContentSource: Resolve slug and locale
ContentSource-->>DocsPage: Vietnamese page or English fallback
DocsPage-->>Browser: Render localized page and fallback state
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@apps/docs/content/docs/meta.json`:
- Around line 5-8: Restore the existing external Changelog navigation entry in
apps/docs/content/docs/meta.json at lines 5-8, and add the same entry to
apps/docs/content/docs/meta.vi.json at lines 3-8 so both sidebars preserve the
shared link.
In `@apps/docs/src/app/`[lang]/docs/[[...slug]]/page.tsx:
- Around line 23-31: Update generateMetadata to handle an absent or empty
params.slug before calling source.getPage, matching Page’s behavior for the
optional [[...slug]] route. Normalize it to the docs home slug or return
metadata for the docsHome(params.lang) redirect, while preserving the existing
lookup for non-empty slugs.
In `@apps/docs/src/app/sitemap.ts`:
- Around line 6-11: Update the sitemap mapping around the page entries to
prepend the existing root “/” sitemap entry, then spread the localized page
mappings after it so the generated sitemap includes both the root URL and all
documentation pages.
In `@apps/docs/src/proxy.ts`:
- Around line 75-85: Add a CDN/edge caching rule for the docs routes `/docs/**`
and `/vi/docs/**` so shared cache entries are keyed by the `Accept` header or
shared caching is disabled, covering both HTML and Markdown responses. Keep the
existing `Vary` behavior in the `isMarkdownPreferred` and `rewriteLocalized`
flow. Run the docs checks, production build, and localized Playwright flow
afterward.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 03d04eba-e648-4c11-9098-f9f17e67ba6a
📒 Files selected for processing (37)
apps/docs/ARCHITECTURE.mdapps/docs/CLAUDE.mdapps/docs/content/docs/admins/meta.jsonapps/docs/content/docs/admins/meta.vi.jsonapps/docs/content/docs/architecture-security/meta.jsonapps/docs/content/docs/architecture-security/meta.vi.jsonapps/docs/content/docs/deployment/meta.jsonapps/docs/content/docs/deployment/meta.vi.jsonapps/docs/content/docs/developers/meta.jsonapps/docs/content/docs/developers/meta.vi.jsonapps/docs/content/docs/meta.jsonapps/docs/content/docs/meta.vi.jsonapps/docs/content/docs/overview/meta.jsonapps/docs/content/docs/overview/meta.vi.jsonapps/docs/proxy.tsapps/docs/scripts/check-docs.mjsapps/docs/scripts/check-links.tsapps/docs/src/app/[lang]/docs/[[...slug]]/page.tsxapps/docs/src/app/[lang]/docs/layout.tsxapps/docs/src/app/[lang]/layout.tsxapps/docs/src/app/[lang]/llms-full.txt/route.tsapps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/app/[lang]/llms.txt/route.tsapps/docs/src/app/[lang]/og/docs/[...slug]/route.tsxapps/docs/src/app/[lang]/page.tsxapps/docs/src/app/api/search/route.tsapps/docs/src/app/docs/layout.tsxapps/docs/src/app/layout.tsxapps/docs/src/app/llms-full.txt/route.tsapps/docs/src/app/llms.txt/route.tsapps/docs/src/app/page.tsxapps/docs/src/app/sitemap.tsapps/docs/src/lib/i18n.tsapps/docs/src/lib/layout.shared.tsxapps/docs/src/lib/source.tsapps/docs/src/proxy.tsapps/docs/test/e2e/navigation.spec.ts
💤 Files with no reviewable changes (6)
- apps/docs/src/app/llms-full.txt/route.ts
- apps/docs/src/app/layout.tsx
- apps/docs/src/app/docs/layout.tsx
- apps/docs/proxy.ts
- apps/docs/src/app/page.tsx
- apps/docs/src/app/llms.txt/route.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
**/*: Always read the repository guidance and relevant sections ofARCHITECTURE.md; before changing a domain, read its specification, test-coverage document, and binding decision filenames.
Treat the repository as the engineering system of record; current repository and runtime evidence take precedence over chat or Northstar.
Readdocs/guidelines/agent-safety.mdbefore retrieval, AI, MCP, permission, upload, graph, or export work. Never commit secrets or customer data.
Files:
apps/docs/content/docs/meta.vi.jsonapps/docs/src/app/[lang]/page.tsxapps/docs/src/app/[lang]/docs/layout.tsxapps/docs/content/docs/deployment/meta.vi.jsonapps/docs/content/docs/overview/meta.vi.jsonapps/docs/content/docs/developers/meta.vi.jsonapps/docs/src/lib/layout.shared.tsxapps/docs/src/app/api/search/route.tsapps/docs/scripts/check-links.tsapps/docs/content/docs/admins/meta.vi.jsonapps/docs/CLAUDE.mdapps/docs/src/app/[lang]/llms.txt/route.tsapps/docs/src/app/sitemap.tsapps/docs/content/docs/developers/meta.jsonapps/docs/src/app/[lang]/llms-full.txt/route.tsapps/docs/content/docs/deployment/meta.jsonapps/docs/content/docs/meta.jsonapps/docs/content/docs/admins/meta.jsonapps/docs/content/docs/architecture-security/meta.jsonapps/docs/ARCHITECTURE.mdapps/docs/src/lib/i18n.tsapps/docs/src/app/[lang]/layout.tsxapps/docs/src/app/[lang]/docs/[[...slug]]/page.tsxapps/docs/content/docs/architecture-security/meta.vi.jsonapps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/proxy.tsapps/docs/src/app/[lang]/og/docs/[...slug]/route.tsxapps/docs/scripts/check-docs.mjsapps/docs/src/lib/source.tsapps/docs/content/docs/overview/meta.jsonapps/docs/test/e2e/navigation.spec.ts
apps/docs/content/docs/**/*
📄 CodeRabbit inference engine (apps/docs/CLAUDE.md)
Public prose must live only under
content/docs; internal engineering documents are source evidence and must not be used as publication input.
Files:
apps/docs/content/docs/meta.vi.jsonapps/docs/content/docs/deployment/meta.vi.jsonapps/docs/content/docs/overview/meta.vi.jsonapps/docs/content/docs/developers/meta.vi.jsonapps/docs/content/docs/admins/meta.vi.jsonapps/docs/content/docs/developers/meta.jsonapps/docs/content/docs/deployment/meta.jsonapps/docs/content/docs/meta.jsonapps/docs/content/docs/admins/meta.jsonapps/docs/content/docs/architecture-security/meta.jsonapps/docs/content/docs/architecture-security/meta.vi.jsonapps/docs/content/docs/overview/meta.json
apps/docs/content/docs/**/meta{,.vi}.json
📄 CodeRabbit inference engine (apps/docs/CLAUDE.md)
Keep root-folder names and descriptions aligned between
meta.jsonandmeta.vi.json; these files define the sidebar documentation switcher.
Files:
apps/docs/content/docs/meta.vi.jsonapps/docs/content/docs/deployment/meta.vi.jsonapps/docs/content/docs/overview/meta.vi.jsonapps/docs/content/docs/developers/meta.vi.jsonapps/docs/content/docs/admins/meta.vi.jsonapps/docs/content/docs/developers/meta.jsonapps/docs/content/docs/deployment/meta.jsonapps/docs/content/docs/meta.jsonapps/docs/content/docs/admins/meta.jsonapps/docs/content/docs/architecture-security/meta.jsonapps/docs/content/docs/architecture-security/meta.vi.jsonapps/docs/content/docs/overview/meta.json
apps/docs/**/*
📄 CodeRabbit inference engine (apps/docs/CLAUDE.md)
Run
pnpm --filter@orgmemory/docscheckandpnpm --filter@orgmemory/docsbuildbefore handoff.
Files:
apps/docs/content/docs/meta.vi.jsonapps/docs/src/app/[lang]/page.tsxapps/docs/src/app/[lang]/docs/layout.tsxapps/docs/content/docs/deployment/meta.vi.jsonapps/docs/content/docs/overview/meta.vi.jsonapps/docs/content/docs/developers/meta.vi.jsonapps/docs/src/lib/layout.shared.tsxapps/docs/src/app/api/search/route.tsapps/docs/scripts/check-links.tsapps/docs/content/docs/admins/meta.vi.jsonapps/docs/CLAUDE.mdapps/docs/src/app/[lang]/llms.txt/route.tsapps/docs/src/app/sitemap.tsapps/docs/content/docs/developers/meta.jsonapps/docs/src/app/[lang]/llms-full.txt/route.tsapps/docs/content/docs/deployment/meta.jsonapps/docs/content/docs/meta.jsonapps/docs/content/docs/admins/meta.jsonapps/docs/content/docs/architecture-security/meta.jsonapps/docs/ARCHITECTURE.mdapps/docs/src/lib/i18n.tsapps/docs/src/app/[lang]/layout.tsxapps/docs/src/app/[lang]/docs/[[...slug]]/page.tsxapps/docs/content/docs/architecture-security/meta.vi.jsonapps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/proxy.tsapps/docs/src/app/[lang]/og/docs/[...slug]/route.tsxapps/docs/scripts/check-docs.mjsapps/docs/src/lib/source.tsapps/docs/content/docs/overview/meta.jsonapps/docs/test/e2e/navigation.spec.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{js,jsx,ts,tsx}: Frontend verification must include lint, typecheck, tests, production build, and browser verification when the flow matters.
Before using unfamiliar React, Vite, Tailwind, TypeScript, Next.js, or Fumadocs APIs, consult current official documentation, Context7, and the relevant project verification skill.
Files:
apps/docs/src/app/[lang]/page.tsxapps/docs/src/app/[lang]/docs/layout.tsxapps/docs/src/lib/layout.shared.tsxapps/docs/src/app/api/search/route.tsapps/docs/scripts/check-links.tsapps/docs/src/app/[lang]/llms.txt/route.tsapps/docs/src/app/sitemap.tsapps/docs/src/app/[lang]/llms-full.txt/route.tsapps/docs/src/lib/i18n.tsapps/docs/src/app/[lang]/layout.tsxapps/docs/src/app/[lang]/docs/[[...slug]]/page.tsxapps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/proxy.tsapps/docs/src/app/[lang]/og/docs/[...slug]/route.tsxapps/docs/src/lib/source.tsapps/docs/test/e2e/navigation.spec.ts
apps/docs/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (apps/docs/CLAUDE.md)
Verify unfamiliar Next.js and Fumadocs APIs against current official documentation or the installed dependency types before using them.
Files:
apps/docs/src/app/[lang]/page.tsxapps/docs/src/app/[lang]/docs/layout.tsxapps/docs/src/lib/layout.shared.tsxapps/docs/src/app/api/search/route.tsapps/docs/scripts/check-links.tsapps/docs/src/app/[lang]/llms.txt/route.tsapps/docs/src/app/sitemap.tsapps/docs/src/app/[lang]/llms-full.txt/route.tsapps/docs/src/lib/i18n.tsapps/docs/src/app/[lang]/layout.tsxapps/docs/src/app/[lang]/docs/[[...slug]]/page.tsxapps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.tsapps/docs/src/proxy.tsapps/docs/src/app/[lang]/og/docs/[...slug]/route.tsxapps/docs/src/lib/source.tsapps/docs/test/e2e/navigation.spec.ts
apps/docs/**/CLAUDE.md
📄 CodeRabbit inference engine (apps/docs/CLAUDE.md)
Read the repository-root
CLAUDE.mdbefore this guidance andapps/docs/ARCHITECTURE.md.
Files:
apps/docs/CLAUDE.md
🧠 Learnings (1)
📚 Learning: 2026-07-28T20:06:14.375Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 112
File: apps/docs/scripts/generate-openapi.ts:211-219
Timestamp: 2026-07-28T20:06:14.375Z
Learning: When generating OrgMemory documentation and authored documentation metadata (e.g., `lastReviewed`), evaluate and format any generated/derived dates using the project timezone `Asia/Bangkok`. Ensure the generated dates stay consistent with the authored corpus when interpreted in that timezone (i.e., avoid UTC/local-time defaults or timezone drift during OpenAPI/docs generation).
Applied to files:
apps/docs/scripts/check-links.ts
🔇 Additional comments (31)
apps/docs/scripts/check-docs.mjs (1)
13-14: LGTM!Also applies to: 76-85, 170-200, 286-316
apps/docs/scripts/check-links.ts (1)
17-21: LGTM!apps/docs/src/app/[lang]/llms-full.txt/route.ts (1)
1-18: LGTM!apps/docs/src/app/[lang]/llms.mdx/docs/[[...slug]]/route.ts (1)
3-13: LGTM!Also applies to: 25-25
apps/docs/src/app/[lang]/llms.txt/route.ts (1)
1-16: LGTM!apps/docs/src/app/[lang]/og/docs/[...slug]/route.tsx (1)
6-30: LGTM!apps/docs/src/app/api/search/route.ts (1)
5-10: LGTM!apps/docs/ARCHITECTURE.md (1)
9-22: LGTM!Also applies to: 32-36
apps/docs/CLAUDE.md (1)
13-19: LGTM!apps/docs/test/e2e/navigation.spec.ts (1)
24-55: LGTM!Also applies to: 57-90, 110-130, 173-182, 204-221, 233-235
apps/docs/src/lib/i18n.ts (1)
1-72: LGTM!apps/docs/content/docs/admins/meta.json (1)
2-9: LGTM!apps/docs/content/docs/admins/meta.vi.json (1)
1-10: LGTM!apps/docs/content/docs/overview/meta.vi.json (1)
1-12: LGTM!apps/docs/src/lib/source.ts (1)
7-7: LGTM!Also applies to: 16-53
apps/docs/src/lib/layout.shared.tsx (1)
2-12: LGTM!apps/docs/src/proxy.ts (1)
1-74: LGTM!Also applies to: 89-103
apps/docs/src/app/[lang]/layout.tsx (1)
1-68: LGTM!apps/docs/src/app/[lang]/docs/layout.tsx (1)
1-26: LGTM!apps/docs/src/app/[lang]/page.tsx (1)
1-9: LGTM!apps/docs/content/docs/architecture-security/meta.json (1)
2-4: LGTM!apps/docs/content/docs/architecture-security/meta.vi.json (1)
1-12: LGTM!apps/docs/content/docs/deployment/meta.json (1)
2-4: LGTM!apps/docs/content/docs/deployment/meta.vi.json (1)
1-9: LGTM!apps/docs/content/docs/developers/meta.json (1)
2-4: LGTM!apps/docs/content/docs/developers/meta.vi.json (1)
1-10: LGTM!apps/docs/content/docs/overview/meta.json (1)
2-4: LGTM!apps/docs/src/app/[lang]/docs/[[...slug]]/page.tsx (4)
1-6: LGTM!
23-31: 📐 Maintainability & Code QualityRun the required frontend verification for the locale route.
This change affects redirects and localized rendering. Verify lint, typecheck, tests, production build, and browser flows for both English and Vietnamese docs paths.
As per coding guidelines, frontend flows must receive all five verification steps before handoff.
Source: Coding guidelines
48-53: LGTM!
97-107: LGTM!
What changed
/docs/**and expose Vietnamese under/vi/docs/**page.vi.mdxtranslations with an explicit English fallback banner when a reviewed Vietnamese page is not availablesrc/proxy.ts, matching this app'ssrc/applayoutWhy
The docs need a controlled bilingual structure before individual pages are reviewed and translated. This change establishes the routing and navigation contract while deliberately keeping content work page-by-page.
User and developer impact
/vi/docs/**immediately and see a clear fallback for untranslated pages.vi.mdxfilesValidation
corepack pnpm --filter @orgmemory/docs checkcorepack pnpm --filter @orgmemory/docs buildcorepack pnpm --filter @orgmemory/docs check:outputgit diff --checkLocal validation ran on Node 23.11.1 and emitted the repository's expected Node
>=24engine warning. GitHub CI is the Node 24 authority.Summary by CodeRabbit
New Features
Bug Fixes
Documentation