Commit e5aaa47
committed
fix(ui): resolve editor race condition and default personality inheritance
**Problem:**
1. Personality/SystemPrompt editors showed empty fields on first open (race condition)
2. Changing default personality in preferences didn't affect new conversations
3. Mermaid diagrams render poorly for complex flows (hardcoded spacing)
**Solution:**
1. Replaced .onAppear pattern with custom init() in editors:
- PersonalityEditor: Initialize @State values directly from personality parameter
- SystemPromptConfigurationEditor: Same pattern for consistency
- Data available immediately when view appears, no async delay
2. ConversationSettings.init() now reads defaultPersonalityId from UserDefaults:
- Falls back to Assistant UUID if not set
- New conversations inherit user's default personality preference
3. Issue #3 investigated but not fixed in this commit:
- All Mermaid renderers use hardcoded sizing (nodeWidth=180, spacing=100, etc.)
- Recommendation: Switch to mermaid - Recommendation: Switch to mermaid - Recommendation: Switch to mermaid - Recommendation: Switchg:* - Recomm: - Recommendation: Switch to mermaid - Recommendation: Switch to mermaide view displays
✅ Default personality now inherited by new conversations1 parent b0dd6e3 commit e5aaa47
3 files changed
Lines changed: 61 additions & 31 deletions
File tree
- Sources
- ConversationEngine
- UserInterface
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
152 | 167 | | |
153 | 168 | | |
154 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
129 | 149 | | |
130 | 150 | | |
131 | 151 | | |
| |||
297 | 317 | | |
298 | 318 | | |
299 | 319 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | 320 | | |
313 | 321 | | |
314 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
101 | 119 | | |
102 | 120 | | |
103 | 121 | | |
| |||
230 | 248 | | |
231 | 249 | | |
232 | 250 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | 251 | | |
237 | 252 | | |
238 | 253 | | |
| |||
270 | 285 | | |
271 | 286 | | |
272 | 287 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
0 commit comments