Library
Rows that indent and expand make this an outline view, not a list
Outline View
/ NSOutlineView · OutlineGroup /
also called tree view, hierarchical list, outline list, expandable table
An outline view is a tree-shaped list: rows can contain children, indentation shows depth, and disclosure triangles expand or collapse branches. A plain list has no hierarchy. A source list is a sidebar appearance and navigation convention that can be implemented with an outline view, but the terms are not interchangeable.
If you called it…
…you meant a outline view.
Anatomy — every part, named
- 1Disclosure triangle
NSOutlineView“The little expand arrow beside a row” is its disclosure triangle.
- 2Indentation level
NSOutlineView.level(forItem:)“How far a child row steps in from its parent” is its indentation level.
- 3Row selection highlight
NSTableRowView.isSelected“The colored strip behind the current row” is the row selection highlight.
Prompt — paste into your agent
Use an Outline View with NSOutlineView (SwiftUI: OutlineGroup) for the indented hierarchy: parent rows receive disclosure triangles and expanding one reveals child rows directly beneath it. Use a flat list only when rows have no children; apply source-list styling separately if the outline serves as a sidebar.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my macOS outline view (NSOutlineView). Rule out: rows refusing to expand because isItemExpandable and the child-count delegate answers disagree; reloadItem without reloadChildren:true leaving stale children; autosaveExpandedItems silently broken because items lack stable identity for persistentObject round-trips; row animations jumping because the model mutated before the animated update ran. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSOutlineView | |
| SwiftUI | OutlineGroup | |
| SwiftUI | List | when supplied hierarchical children |