fix(pl24): stop .action shadowing PSA illustration/parts dispatch
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled

isP4LegacyPath matched any ".action" path, shadowing the PSA
json-illustrations.action / image-board.action dispatch in
fetchSubGroupsByPath and fetchPartsByPath. Every PSA (Citroen/Peugeot/DS)
drill below main-group level fell through to the Ford/Fiat legacy parser,
which cannot parse PSA JSON, so it returned empty. PSA vehicles decoded
since the catalog module landed (72c0de6) showed categories but 0 parts
(41/43 affected). Exclude /psa/ from isP4LegacyPath so these paths reach
fetchPsaIllustrations / fetchPsaParts. Heals existing vehicles on demand;
no re-decode needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-02 00:28:41 +03:00
parent 10327b514c
commit 5e9d9050b9

View File

@@ -1506,7 +1506,13 @@ export class PL24Service {
}
private isP4LegacyPath(linkPath: string): boolean {
return linkPath.includes(".action");
// PSA (Citroen/Peugeot/DS) leaf paths — json-illustrations.action and
// image-board.action — also contain ".action" but MUST route to the
// dedicated PSA handlers (fetchPsaIllustrations / fetchPsaParts), not the
// Ford/Fiat legacy parser. Without this /psa/ guard, the broad ".action"
// match here shadows the PSA dispatch in fetchSubGroupsByPath /
// fetchPartsByPath, so every PSA drill below main-group level returns empty.
return linkPath.includes(".action") && !linkPath.includes("/psa/");
}
private isPsaPath(linkPath: string): boolean {