UPG-100: the lazy-panel comment named the wrong API and a moved line

Two stale claims in one comment. It said `defineAsyncComponent` while the code
below it calls `retryableAsyncComponent` (:56), and it pointed at
research-map.vue:152 for the pattern — which is now a tStatic import; the real
lazy-load moved to :193.

Not cosmetic. Auditing card BUG-LAZY-PLUGIN-DEATH-ON-A-SINGLE-FAILED-IMPORT, the
census of components bypassing the retry wrapper is a grep for raw
`defineAsyncComponent`, and this comment made my own file read as a bypass. The
one real bypass (pplr-data-maps.vue:46, six lazy views) is exp's and routed. A
comment that names the wrong API costs the next reader the same detour.

Says why the wrapper is used rather than only naming it: Vue caches a REJECTED
loader promise, so one dropped chunk request kills the panel for the life of the
page. That is the defect the card exists for, and the reason not to "simplify"
this back to the raw API.

Comment-only, so the build is byte-identical — the strip-shadow-css-comments
pass drops it. Rebuilt and re-ran fix:sri anyway to prove it: 124 hashes already
agreed, 0 rewritten, the committed .js unchanged.
This commit is contained in:
Doxa Maps 2026-09-28 11:12:41 +00:00
parent b235203064
commit 02230d3eb8

View file

@ -46,9 +46,12 @@ import LegendMobile from '@map/components/legends/LegendMobile.vue'
// own built-in light theme avoids duplicating ~60 CSS rules that would drift.)
import { createPplrInstance, provideInstance } from '@map/composables/usePplrInstance.js'
// slice 13 §1a: pin-click → detail side panel. CONSUME the shared
// PeopleGroupDetail (never edit src/). defineAsyncComponent so its ~115 KB only
// loads on the first pin click — exactly the research-map pattern
// (research-map.vue:152). The component reads inject('uiStore') (provided by
// PeopleGroupDetail (never edit src/). Lazy so its ~115 KB only loads on the
// first pin click — exactly the research-map pattern (research-map.vue:193).
// retryableAsyncComponent, NOT raw defineAsyncComponent: Vue CACHES a rejected
// loader promise, so one dropped chunk request would kill the panel for the
// life of the page (card BUG-LAZY-PLUGIN-DEATH-ON-A-SINGLE-FAILED-IMPORT).
// The component reads inject('uiStore') (provided by
// ProfileLoader) + useI18n() (installed by this bundle's index.js), and drives
// its OWN visibility/close via uiStore.selectPeopleGroup(feature|null) — it has
// NO @close emit, so we gate the panel on uiStore.selectedPeopleGroup and let