Commit 36a38b3
authored
🤖 perf: async workspace name generation for faster UX (#877)
Previously, workspace creation blocked for up to 10s while waiting for
the AI to generate a workspace name. This caused a poor UX where users
had to wait before seeing any result.
## Changes
- Use `generatePlaceholderName()` to create workspace immediately with a
temporary name derived from the user's message (e.g., 'add-user-auth')
- Generate AI name asynchronously in the background via
`generateAndApplyAIName()`
- If AI generation succeeds and differs from placeholder, rename
workspace using existing `rename()` method
- If AI generation or rename fails, gracefully keep the placeholder name
## UX Improvement
| Before | After |
|--------|-------|
| User waits 5-10s for AI name generation | Workspace appears instantly
|
| Loading spinner while blocked | AI name applied seamlessly when ready
|
| Network/API errors block creation | Errors handled gracefully,
placeholder name retained |
The existing `generatePlaceholderName()` function was already
implemented but unused - this change puts it to work.
_Generated with `mux`_1 parent a1ba71d commit 36a38b3
File tree
8 files changed
+338
-77
lines changed- src
- browser
- components
- RightSidebar/CodeReview
- node
- runtime
- services
- tests/runtime
8 files changed
+338
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| |||
586 | 589 | | |
587 | 590 | | |
588 | 591 | | |
589 | | - | |
| 592 | + | |
590 | 593 | | |
591 | 594 | | |
| 595 | + | |
592 | 596 | | |
593 | 597 | | |
594 | 598 | | |
| |||
609 | 613 | | |
610 | 614 | | |
611 | 615 | | |
612 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
| 643 | + | |
640 | 644 | | |
641 | 645 | | |
642 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
| 304 | + | |
301 | 305 | | |
302 | 306 | | |
303 | 307 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| 246 | + | |
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
246 | | - | |
| 251 | + | |
| 252 | + | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
| |||
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
| 342 | + | |
336 | 343 | | |
337 | 344 | | |
338 | 345 | | |
| |||
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
621 | 639 | | |
622 | 640 | | |
623 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
184 | 195 | | |
185 | 196 | | |
186 | 197 | | |
187 | | - | |
| 198 | + | |
188 | 199 | | |
189 | 200 | | |
190 | 201 | | |
| |||
0 commit comments