# fix\(web\): render the diff preview statically · stienswout/t3code

[View on GitCafe](https://git.cafe/stienswout/t3code/commit/284ea9f7d0cee3c74697ebe40acb2b67936902b7)

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

Visibility: public

Requested revision: 284ea9f7d0cee3c74697ebe40acb2b67936902b7

Requested commit: 284ea9f7d0cee3c74697ebe40acb2b67936902b7

Commit: 284ea9f7d0cee3c74697ebe40acb2b67936902b7

Tree: 6bd872c658d438ad5efc6085e439406efc3676f3

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(web): render the diff preview statically

The interactive FileDiff's mount lifecycle can race the shared shiki
singleton when the typography views remount it - its render cache is
seeded highlighted-before-highlighting, so a lost race locks in an
unhighlighted frame permanently. The preview needs no interactivity,
so it now renders once per theme through the SSR pipeline (which
always awaits the highlighter before emitting HTML) and injects the
finished markup into a shadow root, the same way FileDiff hosts it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [67599b2710c3ca75350b51b6313793566dc65cf5](https://git.cafe/stienswout/t3code/commit/67599b2710c3ca75350b51b6313793566dc65cf5?format=markdown)

[Source at this commit](https://git.cafe/stienswout/t3code/tree/284ea9f7d0cee3c74697ebe40acb2b67936902b7?format=markdown)
