Skip to content

Commit bff3956

Browse files
committed
refactor(ui): show full nesting chain in create breadcrumb
Nested creates now show the full parent chain in the breadcrumb: Create VPC (staging) / Create Subnet / Create SecurityGroup instead of the previous barely-visible "(for VPC)" suffix. Supports arbitrary nesting depth via createStack traversal.
1 parent 0e54093 commit bff3956

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

commands/ui/view_create.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,17 @@ func (m Model) renderCreateInputView() string {
219219

220220
var headerContext string
221221
if len(m.createStack) > 0 {
222-
parentName := m.createStack[len(m.createStack)-1].parentBundleName
223-
headerContext = fmt.Sprintf("Create %s (%s, for %s)", bundleName, envLabel, parentName)
222+
// Build chain: Create VPC (staging) / Create Subnet / Create SecurityGroup
223+
parts := make([]string, 0, len(m.createStack)+1)
224+
for i, frame := range m.createStack {
225+
if i == 0 {
226+
parts = append(parts, fmt.Sprintf("Create %s (%s)", frame.parentBundleName, envLabel))
227+
} else {
228+
parts = append(parts, "Create "+frame.parentBundleName)
229+
}
230+
}
231+
parts = append(parts, "Create "+bundleName)
232+
headerContext = strings.Join(parts, " / ")
224233
} else {
225234
headerContext = fmt.Sprintf("Create %s (%s)", bundleName, envLabel)
226235
}

0 commit comments

Comments
 (0)