Task 11 Report — Frontend klasifikasi surfacing (Berakhirnya Status PT)
Status: DONE
Commit
5ec9ffc — feat(berakhirnya): klasifikasi surfacing — positive detect rung above peleburan + fine-label carrier mirror + create-route
4 files changed: frontend/src/lib/pembubaran-detect.ts, frontend/src/lib/__tests__/pembubaran-detect.test.ts, frontend/src/components/klasifikasi/detect-banner.tsx, frontend/src/pages/KlasifikasiPage.tsx.
What changed
isBerakhirnyaPackage'sisClippingpredicate now usesstartsWith("BUKTI_PENGUMUMAN")(carrier mirror ofmapToDocumentType, counting the_149/_152fine labels toward the ≥2-clipping clause) instead of exact"BUKTI_PENGUMUMAN"equality. File-head comment updated: the predicate is no longer suppression-only — KlasifikasiPage now also detects berakhirnya POSITIVELY with it (backendinferSubmissionTyperemains the enforcement).DetectedFlowunion +FLOW_LABELS/FLOW_DESCRIPTIONSgained"berakhirnya"entries.KlasifikasiLabelTypeunion gained"berakhirnya";berakhirnyaPaketinserted above thehasAktaPeleburanrung in both thecomputedLabelTypeanddetectedFlowladders (afterhasSuratPerbaikan, before peleburan) — the byte-identicalhasAktaPembubaran = !berakhirnyaPaket && ...suppression is untouched.createSubmission.mutateonSuccess: newdata.type === "BERAKHIRNYA_STATUS_PT"branch →navigate(/berakhirnya/${id}/extraction), placed ahead of thePEMBUBARAN_PTbranch. No casts —CreateSubmissionResponse.typeis alreadystring, and the existing"supported" in datanarrowing already precedes this block.
Test summary
- Added test (
pembubaran-detect.test.ts, "fine-label carrier mirror" describe block, verbatim from brief) — ran GREEN even pre-fix on the RED check, because both given cases are also satisfied by the pre-existing exactBUKTI_PENGUMUMAN_152rung independent ofisClipping. Not a defect — assertions are exactly as specified in the brief; the fix is still correct and necessary for the general carrier-mirror case (e.g. two_149s with no_152present would need it). - Targeted regression run (detect-banner.test.tsx, detect-banner-laporan-rups, detect-banner-peleburan, pembubaran-detect, pembubaran-flow-config, akuisisi-flow, peleburan-flow, laporan-rups-flow): 8 files / 39 tests passed.
- Full frontend suite: 91 files passed / 1 file failed, 504 tests passed total. The 1 failed file,
PerbaikanReviewPage.test.tsx, fails withReferenceError: DOMMatrix is not definedinsidereact-pdf/jsdom — pre-existing environment gap unrelated to any file touched by this task (failure originates inpdf-viewer.tsx→react-pdf, not in klasifikasi/detect-banner/pembubaran-detect/KlasifikasiPage code).
tsc
cd frontend && bunx tsc --noEmit — clean, no output.
Concerns
- None blocking. Only note is the RED-step nuance above (the given test doesn't isolate the
isClippingchange in total isolation, sinceBUKTI_PENGUMUMAN_152exact match already covers case 1 of the two given assertions) — a test-design observation, not a functional gap. Brief's exact test text was used verbatim per instructions.