KB-65CB
07 — UI Handoff After Graph Commit
3 min read Revision 1
registries-pivotuihandoffnode-contract2026-06-03
07 — UI Handoff After Graph Commit
The UI consumes one view: v_registries_pivot_node_contract
No other source, no recomputation. The hierarchy is now live in the same view, so the old /knowledge/registries column→layer drill philosophy is preserved with backend data.
Fields the UI reads (verbatim)
| field | use |
|---|---|
node_code, label |
node identity + display |
parent_code, is_root, has_children, child_pivot_codes[], child_layer_kind |
tree structure (data-driven) |
count_value, count_status (pivot_backed/PIVOT_MISSING) |
the number + whether it exists |
final_substrate_ref |
L3/L4 terminus (source table) for leaves; NULL for parents |
detail_route, drilldown_query_ref |
navigation |
orphan_count, phantom_count, unmanaged_count (NULL=missing), drift_status |
OS-Agency safety columns |
pin_state (PIN_REGISTRY_MISSING), warning_flags (jsonb) |
badges |
Live layer examples for the UI
- Layer 1 row set: PIV-019 birth_registry 1,131,998 · PIV-007 DOT 309 · PIV-207 approvals 211 · PIV-001 catalog 169 · PIV-009 collections 168 · PIV-016 species 42 · PIV-015 triggers 107 · PIV-005 workflow-steps 70 … (24 roots).
- A DOT row in L1 / its drill: PIV-007 (309,
has_children=true) → child PIV-104 (DOT theo Nhóm). - Layer 2 group/category list: PIV-104 →
pivot=8,(null)=4,Vòng đời thực thể=2,Giám sát hệ thống=2 (⚠ published-only; banner that Σ16 ≠ 309). PIV-101 → 6 composition drills (PIV-201..206). - Layer 3 substrate example: PIV-015 →
final_substrate_ref='trigger_registry'; PIV-019 →birth_registry.
What the UI must NOT compute
- count — read
count_valueonly. - layer depth / hierarchy — read
parent_code/has_children/child_pivot_codesonly (no hardcoded depth, no naming-convention inference). - child existence — read
has_children. - group dimension — read
child_layer_kind. - orphan / phantom / drift / unmanaged — read the dedicated columns; render
PIVOT_MISSING/NULLas honest "not yet defined", never as 0.
Mandatory honesty banners
- A
PIVOT_MISSINGbadge +next_action=propose_pivotwherevercount_status=PIVOT_MISSING. - Never render
unmanaged_count=NULLas 0; render as "not yet ratified". - Surface the PIV-104 published-only drill gap (Σ16 vs 309) rather than hiding it.
Route behavior
/knowledge/registries-pivot→ renders the node contract tree (now hierarchical).- Future parity/redirect with
/knowledge/registries→ the old column/layer philosophy maps 1:1 onto L1 roots → L2 children → L3 substrate. No reinterpretation of layer philosophy is needed by the UI.
Conclusion
UI can proceed directly from the backend contract. The graph commit required zero view or UI change — the same view simply now reports has_children/child_pivot_codes for the 6 parents.