Commit 2a8ef10
committed
fix: improve error messaging and clarify tree node consistency
1. **store.ts - loadRootEntities**: Enhance version info error handling
- Add more informative warning message when version info fetch fails
- Explain impact to users: "Server will be shown with generic name"
- Clarify that version info may be incomplete but UI remains functional
- Maintains existing fallback behavior with better user communication
2. **store.ts - toTreeNode**: Add documentation for hasChildren logic
- Clarify relationship between hasChildren and children: undefined
- hasChildren controls whether expand button is shown
- children: undefined means "not loaded yet" (lazy loading)
- Document all three hasChildren determination paths:
* Explicit metadata from API (preferred)
* Children array length check (if provided)
* Type-based heuristic fallback (areas/components have children, apps don't)
- Prevents confusion about apparent inconsistency between flags1 parent eec6203 commit 2a8ef10
1 file changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | | - | |
144 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
150 | 155 | | |
151 | | - | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | | - | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| |||
574 | 579 | | |
575 | 580 | | |
576 | 581 | | |
577 | | - | |
| 582 | + | |
578 | 583 | | |
579 | 584 | | |
580 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
581 | 589 | | |
582 | 590 | | |
583 | 591 | | |
584 | | - | |
| 592 | + | |
585 | 593 | | |
586 | 594 | | |
587 | 595 | | |
| |||
0 commit comments