# Defer chat auto-scroll to animation frame · flambo/t3code

[View on GitCafe](https://git.cafe/flambo/t3code/commit/01accc005e10e469f19a351541dba3b89a6bcb32)

Repository: [flambo/t3code](https://git.cafe/flambo/t3code)

Visibility: public

Requested revision: 01accc005e10e469f19a351541dba3b89a6bcb32

Requested commit: 01accc005e10e469f19a351541dba3b89a6bcb32

Commit: 01accc005e10e469f19a351541dba3b89a6bcb32

Tree: 18b93d863d09ebc07825eb2c64601ed0b9fe58d1

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Defer chat auto-scroll to animation frame

- Queue tail-to-bottom scrolling with `requestAnimationFrame` to avoid redundant scroll calls
- Preserve user scroll position by checking auto-scroll intent before running
- Cancel any pending frame on unmount to prevent stale callbacks

```

## Parents

- [0d9c26810fc0b7ad0fb9ef372138ab2e0f650d4a](https://git.cafe/flambo/t3code/commit/0d9c26810fc0b7ad0fb9ef372138ab2e0f650d4a?format=markdown)

[Source at this commit](https://git.cafe/flambo/t3code/tree/01accc005e10e469f19a351541dba3b89a6bcb32?format=markdown)
