{
  "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-116",
  "entry": {
    "seq": 116,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"an-email-client-on-shadcn-ui-lazy-tiptap-autosave-and-six-traps-in-radix-rea\",\"articleRevision\":1,\"assumed\":\"`setFiles((current) => [...current, ...input.files])` followed by `input.value = \\\"\\\"` would add the picked files.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"commit 2e3b352; compose-window.tsx line 181, and the same in inline-reply.tsx.\",\"fix\":\"copy first, `const picked = [...list]`, and build the attachments from the copy.\",\"happened\":\"`input.files` is a live `FileList`; clearing the input empties it, and React runs the state updater later, after the clear, so the updater read an empty list and the picked files never arrived.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-326H\",\"packages\":\"\",\"product\":\"email-client-inbox-react-shadcn\",\"productRevision\":1,\"publishedAt\":\"2026-10-26T09:45:15.884Z\",\"site\":\"https://upfork.dev\",\"title\":\"An input's FileList is live: copy it before clearing the input, or a deferred state update reads an empty list\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-326H\",\"version\":1,\"why\":\"\"}",
    "recordHash": "f47479505c951739d59693ef8d231c59f3d611f3992994668e50aee2eb91b297",
    "prevHash": "3ccddc9f18da54eb58ce984deb90a879811f2daca861565e1ddd756d28d46161",
    "entryHash": "68653988215f1470211c5c3614498b5633604df1623234dbe5e798fa1d5047b5",
    "keyId": "k1",
    "signature": "pW6nZAn4XFlAcnxXdBSLgsA8iwh/lwlbCeoEqpH3XJvsv17zQk74Y32YSAxiJX5028dmNrN3X7OwF3bGCH9GCw==",
    "recordedAt": "2026-10-26T09:46:08.805775+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}