03 — /knowledge/registries Audit + UX classification
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/healthcomputes gap = record−actual Nuxt-side → Điều 28 violation.- Surfaces stale/odd stored numbers:
CAT-DOT.record_count=307vs pivot 309 (PIV-007);CAT-006309 vs actual 163;CAT-ALL1,666,499 vs 1,919,748;CAT-00737 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).