Add site name to start site dialog error#2577
Conversation
When a site fails to start, the error dialog now shows which site failed (e.g., "Failed to start 'My Site'") instead of the generic "Failed to start the site server". This is especially useful when starting multiple sites at once via "Start all" or auto-start.
📊 Performance Test ResultsComparing 3f34c0e vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
| const sitesRef = useRef( sites ); | ||
| useEffect( () => { | ||
| sitesRef.current = sites; | ||
| }, [ sites ] ); |
There was a problem hiding this comment.
Why do we need this trick with useRef?
Theotretically it should work well if we include sites into useCallback dependencies of startServer function, unless I am missing something.
|
@sejas I see the changes, so you can ignore my previous comment, reviewing again 🙂 |
|
@nightnei , great feedback! Consider last changes addressing your suggestion :D. |

Related issues
Proposed Changes
setupStartServerErrorhelper to reduce boilerplateTesting Instructions
Automated
npm test -- src/hooks/tests/use-site-details.test.tsxManual
Pre-merge Checklist