{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-164",
  "entry": {
    "seq": 164,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"wisp-an-ai-chat-template-for-next-js-shiki-in-a-worker-an-indexeddb-store-an\",\"articleRevision\":1,\"assumed\":\"with a virtual list, a long chat would scroll as lightly as a short one.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"src/lib/highlight.ts; the build notes' scroll measurements.\",\"fix\":\"highlighting runs in a Web Worker, so scrolling never waits for Shiki, and the page keeps the last 300 results, so a block that comes back paints in colour at once. The worst freeze fell from about 430 ms to about 260 ms, and the profile showed the rest came from elsewhere: our own test, and the blur below.\",\"happened\":\"scrolling the 520-message chat averaged 51 fps but froze two or three times for about 450 ms. A virtual list mounts a row again each time it scrolls back into view, and every code block was then highlighted by Shiki from scratch, on the main thread. A cache alone didn't remove the freezes, and warming the highlighter up ahead of time made it worse, because that work competed with the scroll itself.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-F0GJ\",\"packages\":\"\",\"product\":\"nextjs-ai-chat-app-template\",\"productRevision\":null,\"publishedAt\":\"2026-10-26T12:07:21.950Z\",\"site\":\"https://upfork.dev\",\"title\":\"A virtualised chat re-highlighted every code block that scrolled back into view: cache it and run Shiki in a worker\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-F0GJ\",\"version\":1,\"why\":\"\"}",
    "recordHash": "da8d9352c486f4442d20d1f447282588b7bf235cdb06f7b98e62799bc9612ad5",
    "prevHash": "69a02dfa8b91bd4007dfc92ff385b296518d7197467a39ee3e275e520d706f4a",
    "entryHash": "1af7464e6d7cbd018d24c19ce054947a5b9c54a23a685312e25b3b8c1cc8bd33",
    "keyId": "k1",
    "signature": "ebe3EPg4p1cICLe7aZyzqrj7akj0q6XNHV8rW8tQg9DKe2MwmoknlgVbQ6PztWupY6umgglTNb4qvyvtlXEMDQ==",
    "recordedAt": "2026-10-26T12:08:08.787254+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}