Commit 762628a
authored
fix(frontend): prevent flash of empty seed opinion page during conver… (#411)
* fix(frontend): prevent flash of empty seed opinion page during conversation creation
When clicking "Publier" to create a conversation with seed opinions, the page
briefly flashed showing the empty seed opinion creation form before navigating
to the final conversation page.
Root cause:
The NewConversationRouteGuard component checks for unsaved changes before
allowing navigation. When the route was not unlocked, attempting to navigate
triggered the route guard's "save draft" dialog or caused timing issues with
the reactive store updates, leading to a flash of empty state.
Changes:
- Add ref to NewConversationRouteGuard to access its unlockRoute() method
- Call unlockRoute() before router.replace() to bypass unsaved changes check
- Remove draft clearing logic that was causing reactive store re-renders
This ensures the component maintains its seed opinion data during navigation
and transitions smoothly to the conversation page without intermediate UI
flashes or save prompts.
* chore: improve ai-assistant rules on commit1 parent 904d428 commit 762628a
2 files changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | | - | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | | - | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
347 | 352 | | |
348 | 353 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | 354 | | |
353 | 355 | | |
354 | 356 | | |
| |||
0 commit comments