Repository navigation
Commit 325d841
refactor(web): composer clears scroll-collapse in render, not after paint
ChatComposer cleared its scroll-collapsed flag in a passive effect whenever
the composer stopped being eligible for scroll-collapse (multiline prompt,
expanded chrome, mobile viewport, non-server route, or the setting turned
off). That committed the 3.8k-line component once with the stale flag and
then a second time after paint.
The flag lives in useState inside this component (useComposerFocusState),
so reset it during render with a guard, the same pattern this file already
uses for the model picker. The flag is still cleared rather than masked, so
the composer does not re-collapse on its own when it becomes eligible again.
Effects: ChatComposer.tsx 17 -> 16 useEffect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 79f6cd3 commit 325d841
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2380 | 2380 | | |
2381 | 2381 | | |
2382 | 2382 | | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
2383 | 2388 | | |
2384 | 2389 | | |
2385 | 2390 | | |
2386 | 2391 | | |
2387 | 2392 | | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
2391 | | - | |
2392 | | - | |
2393 | | - | |
2394 | 2393 | | |
2395 | 2394 | | |
2396 | 2395 | | |
| |||
0 commit comments