Unsaved work has to survive process death
Aliases: draft persistence · unsaved content · autosave
What it is
Whatever someone has typed in a field, editor, or checkout note and has not submitted yet is a draft. After the process is reclaimed or the app is swiped away, those characters must still be readable from storage. They must not live only as in-memory widget state. The view can return to the right page with an empty box: the place is right, the labor is gone. This entry is how unsubmitted content survives death. It is not why the process is killed, and not how the navigation stack and scroll offset come back.
Why it happens
Typing costs more than tapping. A comment, an address, an unsent message is work already paid for, and "still in the box" is treated as saved. Widget state follows the process by default: when the process dies, the buffer inside EditText or UITextView dies with it. Persistence means writing the draft to a record outside the process (a local database, a file, a system draft API) and reading it back the next time that editor opens. The write cannot wait for Send. Send is commit; a draft is a continuous snapshot before commit. Local drafts can conflict with a version already on the server, but losing the draft usually hurts more than showing an old copy that needs a confirm. Swiping from recents still takes a full teardown on some systems; the characters in the box at that moment remain unsaved work, not a deliberate clear.
Where it stops holding
Passwords, one-time codes, and similar secrets must not be written as drafts; the persistence set has to exclude credential fields. Managed devices and private-browsing modes may forbid disk writes; the editor then needs an explicit "this will not be kept," not a silent drop. In collaborative editing, a newer remote commit can stale the local draft; restore needs a conflict cue rather than a blind overwrite. A three-word search query is cheap to retype and does not need the same policy as a long-form draft. The test is retyping cost, not "is it a text field."
Applying it
- When the editor leaves the foreground or typing pauses, write the draft outside the process. Do not write only on Save or Send.
- On reopening the same editor, restore automatically and mark the text as an unsent draft so it is not mistaken for words the system typed.
- Verify by typing a long sentence that cannot be recalled from memory into a comment or order note, then killing the process with system tools before returning from Messages. Re-entering that editor should still show the sentence. A blank box means the page survived and the content did not.