KB-5A43

03 — /knowledge/registries Audit + UX classification

3 min read Revision 1
architectureregistriesnuxtpage-auditdieu28hardcodedrilldownux2026-05-30verified

title: 03 — /knowledge/registries Audit + UX-idea classification date: 2026-05-30

03 — /knowledge/registries Audit + UX-idea classification

Route & sources

pages/knowledge/registries.vue (SSR) + /api/registry/health + Directus reads of meta_catalog.

Render (live)

"Danh mục hệ thống" Meta-Catalog ("living catalog, real-time count via PG trigger"); layer-grouped cards + system-log + nav (All Entities · Taxonomy 6x6 · Entity Matrix · Species Matrix · Changelog). Scrape: Atoms 1,666,499 · Molecules 774 · Compounds 423 · Classification Species 178,030 · Orphans 15 · System Issues 175,323 · Directus fields 1,482 · Entity labels 690,341 · Universal edges 2,199 · Knowledge docs 4,727.

Counting behaviour — VERIFIED

  • Cards read meta_catalog.record_count/actual_count (CAT-* rows) directly — NOT pivot.
  • /api/registry/health computes gap = record−actual Nuxt-side → Điều 28 violation.
  • Surfaces stale/odd stored numbers: CAT-DOT.record_count=307 vs pivot 309 (PIV-007); CAT-006 309 vs actual 163; CAT-ALL 1,666,499 vs 1,919,748; CAT-007 37 vs 52. "178,030/175,323" species/issues figures are component aggregates (phantom).
  • Phantom hardcoded rows CAT-SPE/ORP/PHA/UNM/017 (display 308–322) — literal arrays.

Điều 28 verdict: VIOLATION.

Old-design UX ideas — classification

Old idea Verdict Treatment
Layer-grouped catalog REUSE groups from meta_catalog.composition_level (data)
Card count+species+orphan EXTEND enrich into child-summary (doc 08)
Drill nav (All Entities/Taxonomy/Matrix) REUSE recursive root→layer→species→collection→item→substrate
"Living catalog, real-time count" REUSE true once pivot-sourced + refresh status
Changelog/system-log WRAP source from pivot_results.refreshed_at+audit
Gap computed in Nuxt REJECT move to PG test_counting_contract()
Phantom literal rows RETIRE categories only from PG row sets
record_count as truth RETIRE replaced by pivot_count(); record_count shown only as "stored (drift)"
Fixed flat card depth REJECT dynamic depth (count>1 ⇒ inner layer)

Core principle to preserve (user addendum)

"Cứ một đối tượng có số lượng > 1 thì lại sinh thêm layer bên trong … cho đến khi còn độc bản và đến lớp cuối là DB của đối tượng / các mối quan hệ." The old page gestured at this but stopped at a flat grid; the new surface makes it recursive + data-driven (doc 07/09).

Back to Knowledge Hub knowledge/dev/reports/architecture/registries-pivot-os-agency-surface-master-design-2026-05-30/03-registries-page-audit.md