Merge pull request 'refactor(glossaire): stabiliser le moteur de navigation intelligente' (#330) from feat/glossary-navigation-engine-step24 into main
All checks were successful
CI / build-and-anchors (push) Successful in 38s
Proposer Apply (Queue) / apply-proposer (push) Successful in 35s
SMOKE / smoke (push) Successful in 15s
Deploy staging+live (annotations) / deploy (push) Successful in 8m55s

Reviewed-on: #330
This commit was merged in pull request #330.
This commit is contained in:
2026-04-26 19:34:28 +00:00

View File

@@ -510,13 +510,19 @@ export function getGlossarySmartNavigation(
): GlossarySmartNavigation {
const currentSlug = slugOfGlossaryEntry(currentEntry);
const rawNavigation = currentEntry.data.navigation;
const defaultNavigation = GLOSSARY_NAV_DEFAULTS[familyOf(currentEntry)];
const defaultNavigation = GLOSSARY_NAV_DEFAULTS[familyOf(currentEntry)] ?? {};
const navigationSource = rawNavigation ?? {
primaryNext: undefined,
primaryReason: undefined,
paths: defaultNavigation ?? {},
flows: {},
const navigationSource = {
primaryNext: rawNavigation?.primaryNext,
primaryReason: rawNavigation?.primaryReason,
paths: {
understand: rawNavigation?.paths?.understand ?? defaultNavigation.understand ?? [],
deepen: rawNavigation?.paths?.deepen ?? defaultNavigation.deepen ?? [],
compare: rawNavigation?.paths?.compare ?? defaultNavigation.compare ?? [],
apply: rawNavigation?.paths?.apply ?? defaultNavigation.apply ?? [],
},
flows: rawNavigation?.flows ?? {},
relationWeights: rawNavigation?.relationWeights ?? {},
};
const primaryNext = resolveGlossaryEntriesInSourceOrder(