MBTI64-ZH32-EN32-V8_5-V5-FIRST-CLASS-SECTIONS-UI-ORDER-REPAIR-01#1509
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e29c68389a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const intentLinks = hasV85Sections | ||
| ? buildV85PersonalitySectionShortcuts(locale, v85Sections, mbtiIntentCtaHref) | ||
| : legacyIntentLinks; |
There was a problem hiding this comment.
Preserve section nav when V8.5 links are empty
When the backend returns only V8.5 sections outside the seven hard-coded shortcut keys (for example the v8_5_module_01_* sections that this commit also marks renderable), hasV85Sections becomes true here, so this branch discards legacyIntentLinks; buildV85PersonalitySectionShortcuts then filters all anchors out and returns only the test CTA. On those pages both the hero map and sticky nav lose all content section links even though renderable sections exist, so fall back to legacy links or include the module keys when the V8.5 shortcut list has no anchors.
Useful? React with 👍 / 👎.
What changed
v8_5_*first-class CMS sections in the personality detail renderer.Why
Production backend now exposes V8.5/V5 first-class sections, but the fap-web personality detail page still prioritized the legacy section map and legacy sections. This PR makes the already-promoted CMS content the main reading experience without adding frontend editorial fallback.
Validation
pnpm exec vitest run tests/contracts/personality-sections.contract.test.tsx tests/contracts/personality-cms.contract.test.tspnpm test:contractpnpm typecheckNEXT_PUBLIC_API_URL=https://api.fermatmind.com NEXT_PUBLIC_SITE_URL=https://fermatmind.com pnpm buildgit diff --checkhttps://api.fermatmind.comfor/zh/personality/intj-aand/en/personality/intj-aIntentionally deferred