@@ -26,7 +26,7 @@ import { resolvePackageJson } from "../../shared/runtime/root.js"
2626import { getSelectedTrack , setSelectedTrack , hasSelectedConditions , setSelectedConditions , getProjectName , setProjectName , getControllerAgents , initControllerAgent , loadControllerConfig } from "../../shared/workflows/index.js"
2727import { loadTemplate } from "../../workflows/templates/loader.js"
2828import { getTemplatePathFromTracking } from "../../shared/workflows/template.js"
29- import type { TrackConfig , ConditionConfig } from "../../workflows/templates/types"
29+ import type { TrackConfig , ConditionGroup } from "../../workflows/templates/types"
3030import type { AgentDefinition } from "../../shared/agents/config/types"
3131import type { InitialToast } from "./app"
3232
@@ -126,7 +126,7 @@ export function App(props: { initialToast?: InitialToast }) {
126126 const [ view , setView ] = createSignal < "home" | "onboard" | "workflow" > ( "home" )
127127 const [ workflowEventBus , setWorkflowEventBus ] = createSignal < WorkflowEventBus | null > ( null )
128128 const [ templateTracks , setTemplateTracks ] = createSignal < Record < string , TrackConfig > | null > ( null )
129- const [ templateConditions , setTemplateConditions ] = createSignal < Record < string , ConditionConfig > | null > ( null )
129+ const [ templateConditionGroups , setTemplateConditionGroups ] = createSignal < ConditionGroup [ ] | null > ( null )
130130 const [ initialProjectName , setInitialProjectName ] = createSignal < string | null > ( null )
131131 const [ controllerAgents , setControllerAgents ] = createSignal < AgentDefinition [ ] | null > ( null )
132132
@@ -152,9 +152,9 @@ export function App(props: { initialToast?: InitialToast }) {
152152 const existingProjectName = await getProjectName ( cmRoot )
153153
154154 const hasTracks = template . tracks && Object . keys ( template . tracks ) . length > 0
155- const hasConditions = template . conditions && Object . keys ( template . conditions ) . length > 0
155+ const hasConditionGroups = template . conditionGroups && template . conditionGroups . length > 0
156156 const needsTrackSelection = hasTracks && ! selectedTrack
157- const needsConditionsSelection = hasConditions && ! conditionsSelected
157+ const needsConditionsSelection = hasConditionGroups && ! conditionsSelected
158158 const needsProjectName = ! existingProjectName
159159
160160 // Check if workflow requires controller selection
@@ -170,7 +170,7 @@ export function App(props: { initialToast?: InitialToast }) {
170170 // If project name, tracks, conditions, or controller need selection, show onboard view
171171 if ( needsProjectName || needsTrackSelection || needsConditionsSelection || needsControllerSelection ) {
172172 if ( hasTracks ) setTemplateTracks ( template . tracks ! )
173- if ( hasConditions ) setTemplateConditions ( template . conditions ! )
173+ if ( hasConditionGroups ) setTemplateConditionGroups ( template . conditionGroups ! )
174174 if ( needsControllerSelection ) setControllerAgents ( controllers )
175175 setInitialProjectName ( existingProjectName ) // Pass existing name if any (to skip that step)
176176 currentView = "onboard"
@@ -343,7 +343,7 @@ export function App(props: { initialToast?: InitialToast }) {
343343 < Match when = { view ( ) === "onboard" } >
344344 < Onboard
345345 tracks = { templateTracks ( ) ?? undefined }
346- conditions = { templateConditions ( ) ?? undefined }
346+ conditionGroups = { templateConditionGroups ( ) ?? undefined }
347347 controllerAgents = { controllerAgents ( ) ?? undefined }
348348 initialProjectName = { initialProjectName ( ) }
349349 onComplete = { handleOnboardComplete }
0 commit comments