Phase 8 — UI success
Layer: JS only
Terminal success for the ChipTool flow is the COMMISSIONING_COMPLETE event emitted from ESPMatterModule.handleHeadlessTaskResult after CONFIRM_COMMISSION succeeds, with source: HEADLESS_JS.
Terminal-complete check
export function isMatterCommissioningTerminalComplete(
rawEvent: Record<string, unknown>,
): boolean {
const payload = getMatterCommissioningPayload(rawEvent);
const source = String(payload.source ?? rawEvent.source ?? "").toUpperCase();
return source !== MATTER_COMMISSIONING_SOURCE_GPS; // "GPS_SERVICE"
}
| Source | Meaning | UI action |
|---|---|---|
| HEADLESS_JS | Cloud confirm succeeded | Success → toast, sync, navigate |
| GPS_SERVICE | Legacy GPS path only — CHIP leg done, cloud pending | Ignore |
| CHIP_TOOL | Native ChipTool activity errors (not success) | Error path |
On the default ChipTool build you typically only see HEADLESS_JS for success and CHIP_TOOL / generic errors for failures.