Line

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

ui/client/features/pages-editor/hooks/useSuggestedNextSteps

Cockpit client (features), next. Source: ui/client/features/pages-editor/hooks/useSuggestedNextSteps.tsx.

Type Aliases#

SuggestedStepId#

SuggestedStepId = "add-missing-layers" | "automap-props" | "generate-tests"

Defined in: ui/client/features/pages-editor/hooks/useSuggestedNextSteps.tsx:9

Functions#

useSuggestedNextSteps()#

useSuggestedNextSteps(feature, file, nodeId, contentHash, onSaved): object

Defined in: ui/client/features/pages-editor/hooks/useSuggestedNextSteps.tsx:21

Runs the three "first wired" suggested next steps (issue) from the Pages editor's inspector. Only the mechanical path is wired today (see the honest catalogue in docs/design/ia-five-screens.md section 8.7): auto-map and test generation already have a deterministic block and write directly (no Approvals routing yet, tracked as a follow-up); missing layer files has a CLI block but no HTTP endpoint, so it stays disabled with a reason rather than being mislabelled "AI only / no block yet".

Parameters#

feature

string

file

string

nodeId

string

contentHash

string

onSaved

(tree) => void

Returns#

object

cancel

cancel: (id) => void

Parameters
id

SuggestedStepId

Returns

void

runAutoMap

runAutoMap: (_mode) => Promise<void>

Parameters
_mode

GenerateMode

Returns

Promise<void>

runGenerateTests

runGenerateTests: (_mode) => Promise<void>

Parameters
_mode

GenerateMode

Returns

Promise<void>

runs

runs: Record<SuggestedStepId, StepRun>