mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
When creating a new conversation, the route-sync effect could fight the conversation switch if the URL was not updated synchronously. This caused users to be unable to switch back to older conversations after creating a new one. The fix mirrors the approach already used in handleSelectConversation (added in PR #1710): push the new conversation ID into the URL synchronously so the route-sync effect sees a matching routeConversationId before it can revert activeConversationId. Without this synchronous URL update: 1. handleNewConversation sets activeConversationId to fresh.id 2. The URL-sync effect (L1336) eventually updates the URL 3. But the route-sync effect (L800-819) may see the stale routeConversationId and pull activeConversationId back to the old conversation 4. This prevents users from switching to other conversations Fixes #2930