Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/debug/hooks/useDebug

Cockpit client (features), next. Source: ui/client/features/debug/hooks/useDebug.tsx.

Functions#

useDebug()#

useDebug(onApproved): object

Defined in: ui/client/features/debug/hooks/useDebug.tsx:20

The Debug screen: the four choosers of the debug chain (reproduce -> isolate -> fix -> verify) are answered one at a time; once all four are answered the server compiles a plan (debug.fix's ai exit is excluded from it, LIN-82 decision a) and Approve hands it to the Plan screen's own run route, unchanged. debug.verify's repeat-until loop (shouldReiterate) is UI/CLI state, not a new engine primitive: marking a run "did not pass" clears isolate, fix and verify's answers (keeping reproduce's) and re-reads, so the isolate chooser is re-presented.

latest mirrors the reducer so an action fired right after another (an answer right after a read) reads state that already reflects it; seq drops a read that a newer one overtook, the same pattern as useRequirement.

Parameters#

onApproved

() => void

Returns#

object

answer

answer: (chooser, option) => Promise<void>

Parameters
chooser

StepId

option

string

Returns

Promise<void>

approve

approve: () => Promise<void>

Returns

Promise<void>

setFeature

setFeature: (feature) => void

Parameters
feature

string

Returns

void

start

start: () => Promise<void>

Returns

Promise<void>

state

state: ScreenState

verifyResult

verifyResult: (passed) => Promise<void> | undefined

Parameters
passed

boolean

Returns

Promise<void> | undefined