K.34 — Perubahan review: real KBLI codes, clickable roster rows, no empty sections
Deployed: ahu-ai-ocr:2ec5004a @ x056.ahu-demo.ocr.val.id · 2026-07-20
Suites: backend 2726 · frontend 1019 (0 fail)
Verified live on: dd8c42d8 review
1. Why old KBLI codes were '—' — the snapshot mis-read SABH's kegiatan JSON
Straight from tbl_perseroan.kegiatan for PT Virtue (id 1087779), each entry is one KBLI item:
{
"id": "46512", ← the 5-digit KBLI code
"maksud": "PERDAGANGAN BESAR DAN ECERAN; …", ← category HEADER (same on every row)
"tujuan": [
"Perdagangan Besar, Bukan Mobil Dan Sepeda Motor",
"Perdagangan Besar Mesin, Peralatan dan Perlengkapannya",
"Perdagangan besar komputer, perlengkapan komputer dan piranti lunak",
"Perdagangan Besar Piranti Lunak" ← the item's ACTUAL title (last element)
]
}
parseKegiatan took maksud as the title — so the registry side of your KBLI diff became twelve copies of the same category header, the path elements leaked in as code-less rows ('—'), and the diff paired almost nothing (a wall of false removed/added). Fixed: kode = id, judul = last tujuan element (fallback to maksud), pinned by unit tests on the real shape.
I refreshed dd8c42d8's stored snapshot with the corrected parser and revalidated. The live diff went from noise to the truth: 9 unchanged items (real codes + titles) + 3 removed (46523, 46900, 62015). The cached Ringkasan AI — which was literally describing the broken data ("banyak entri kosong") — was regenerated too. Other existing perubahan submissions re-read the registry at company-select time, so new ones are correct automatically.
2. Pemegang Saham (Akta Baru) rows are clickable like Pendirian
The perubahan projector emitted empty cellFieldRefs — the universal roster component had nothing to link. Now it uses exactly Pendirian's Item-C idiom: a cell ref is emitted only when a real BoundingBox row backs the key (never a dead link), mapped onto the akta-perubahan extraction's own keys — pemegang_saham_lama.N.{nama, jumlah_lembar, persentase}, direksi_baru.N.*, dewan_komisaris_baru.N.*. Clicking a row rides the standard viewer path: document switch → page → word-tight highlight (including K.33's boxes-arrive re-fire).
Live payload on dd8c42d8: all four shareholder rows carry refs (nama on all; jumlah/persentase where the OCR grounded a box).
3. The empty "Pengurus (Akta Baru)" section
Your akta is a KBLI-only perubahan — it doesn't restate direksi/komisaris, so the extracted roster is legitimately empty. The bug was rendering the section anyway. Roster sections now appear only when they have rows; the PT's registered pengurus still shows where it belongs, under "Data Perseroan Terdaftar" (SABH snapshot). Same guard applies to an empty Pemegang Saham roster.
Commits
2ec5004a |
all three fixes + parseKegiatan unit tests on the real SABH shape |