From dfe49b46850cf8d26c490f2ba81855801a5b73dc Mon Sep 17 00:00:00 2001 From: doxa-maps-88655c70 <88627970+doxa-maps-88655c70@users.noreply.github.com> Date: Thu, 24 Sep 2026 21:30:27 +0000 Subject: [PATCH] Correct two headers that still called the shared rollup a copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both tab components' file headers said the region grouping was a COPY of DX-life's countries-meta.ts "not an import", one of them attributing it to the other tab. That was true when it was written — their file is a .ts module with a Nuxt-only COUNTRIES import that cannot resolve outside that app — and it stopped being true when the file was ported to library/utils/countries-meta.js. Both tabs import summarizeRegions and PEOPLE_GROUP_LIST_FIELDS from there now, and grep finds exactly one definition in the repo. Worth the edit because a comment that still describes the old shape is worse than no comment: the next reader would have duplicated the rollup a third time on its authority, and one of the headers told them to copy it from the other tab. "Kept field-for-field identical so both tabs roll up the same way" is also no longer a discipline anyone has to maintain — it is the same function. --- .../regions-dashboard/region-dashboards.vue | 8 +++++--- plugin-designs/regions-dashboard/regions-list.vue | 13 +++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/plugin-designs/regions-dashboard/region-dashboards.vue b/plugin-designs/regions-dashboard/region-dashboards.vue index b43c28e12..eb3b03c0c 100644 --- a/plugin-designs/regions-dashboard/region-dashboards.vue +++ b/plugin-designs/regions-dashboard/region-dashboards.vue @@ -18,9 +18,11 @@ * WITH NO SELECTION it shows every region compared against each other, so the tab is meaningful * standalone (and on first paint, before anything has been clicked) rather than an empty state. * - * SOURCE for the grouping logic: regions-list.vue's summarizeRegions(), itself a copy of DX-life's - * config/countries-meta.ts. Copied rather than imported for the same reason stated there — and - * kept field-for-field identical so both tabs roll up the same way. + * SOURCE for the grouping logic: library/utils/countries-meta.js — the port of DX-life's + * config/countries-meta.ts. BOTH tabs import summarizeRegions and PEOPLE_GROUP_LIST_FIELDS from + * there, so "kept field-for-field identical" is no longer a discipline anyone has to maintain: it + * is the same function. This paragraph previously said the logic was copied from regions-list.vue + * rather than imported, which was true before the port and false afterwards. */ import { inject, ref, computed, onMounted, onBeforeUnmount, watch } from 'vue' import { useShadowStyles } from '@map/composables/useShadowStyles.js' diff --git a/plugin-designs/regions-dashboard/regions-list.vue b/plugin-designs/regions-dashboard/regions-list.vue index 4546527a8..588ff1aa9 100644 --- a/plugin-designs/regions-dashboard/regions-list.vue +++ b/plugin-designs/regions-dashboard/regions-list.vue @@ -19,8 +19,17 @@ * the same wagf_region / country_code fields the Nuxt route reads, so grouping happens here, * client-side, using the identical fields (PEOPLE_GROUP_LIST_FIELDS) and the identical rollup * shape (one row per country, rolled into one card per region) as countries-meta.ts's - * summarizeRegions(). This is a COPY of that grouping logic, not an import — DX-life's file is - * a .ts module with a Nuxt-only COUNTRIES import that cannot resolve outside that app. + * summarizeRegions(). + * + * ★ AND IT IS NOW ONE IMPLEMENTATION, NOT A COPY. This paragraph used to say the grouping was a + * COPY of countries-meta.ts "not an import", because DX-life's file is a .ts module with a + * Nuxt-only COUNTRIES import that cannot resolve outside that app. That was true when it was + * written and it stopped being true when the file was ported to + * library/utils/countries-meta.js: BOTH tabs now import summarizeRegions and + * PEOPLE_GROUP_LIST_FIELDS from there, and grep finds exactly one definition in the repo. + * Corrected because a comment that still describes the old shape is worse than no comment — the + * next reader would have duplicated the rollup a third time on its authority. When a comment and + * the code disagree, the comment is the one to distrust. * * EVENT CONTRACT (for the shell that nests this element — see RESULT-regions-list-element.md): * region-selected { slug, value, label, countryCount, count } — region heading clicked