--- id: "8234c147-b313-4294-a6b3-4930dd36a2ab" name: "Chunked InsertText Composer Fill" micro_summary: "Failed fill method: small repeated Input.insertText chunks land out of order in the Lexical composer while the total length still matches." status: "discarded" see_also: [] scope: "Can a large ChatGPT composer prompt be filled by chunked CDP text insertion?" discard_reason: "900 to 1200 character Input.insertText chunks all land and the flattened length matches, but Lexical re-renders between chunks and scrambles the order. Use a single insert of the whole payload." --- Tried filling a Lexical composer with repeated small `Input.insertText` calls, 900 to 1200 characters each, on the theory that per-call payload limits made chunking necessary. Result: the final flattened length matched the source exactly and every probe substring was present, but the text landed out of order. Reading it back showed fragments interleaved, for example a paragraph tail from the middle of the brief appearing at the end. Cause: Lexical re-renders and moves the selection between inserts, so later chunks land at whatever caret position the re-render produced. Total length is not a content check, and `textContent.length` agreeing is exactly the false green that makes this dangerous. Same failure appeared whether chunks were driven by `type_text` or by direct `Input.insertText`. A single insert of the whole payload preserves order. Verify by comparing flattened text against the source and, for long payloads, by checking the last 40 characters, not by length alone.