Undo option for cell deletions
Problem: When a mistake is made typing in a cell, e.g. selecting some code and accidentally overtyping it, the text-box undo/redo function can be used to recover deleted or altered code, even including states which were never committed. However, after deleting a cell, the text box it was in disappears entirely, making it impossible to undo the effect without opening up the notebook history.
Proposed solution: It would be great to have some UI affordance for "un-delete last deleted cell" (comparable to web browsers' "re-open last closed window" menu option) or maybe some more general undo/redo tool. Ideally this undo tool should even restore the original textbox, with its edit history. I'm not precisely where where in the UI this would best be located.
Current workaround: Open the notebook history in a separate browser tab, navigate back in the history to before the cell was deleted, scroll down to the cell in question, and copy its content, then go back to the browser tab with the current notebook version, make a new cell, and paste it.
Downsides of the current workaround: It is slow and cumbersome, and does not preserve the cell ID, which interferes with the platform's ability to diff across versions / across forks.
Extra notes: I find myself needing this on a daily basis.
Related request: t/2605
I lost hours of writing today when I hit escape to close the cell editor then hit “d” in what I thought was a different window. I couldn’t find an undo option.
Oh no, Shaun! I assume you looked in your notebook history and the edits were never committed?

Thanks @CobusT yeah I checked and for some reason it wasn’t there. What controls when something is saved there? Luckily most of it was still in my head, and I was able to replace it. Just wanted to share what happened.
When you execute the cell, it commits the content. That could happen because you hit the 'Run cell' UI elements (to the right of the cell as well as in the notebook footer) or hit Shift-Enter. Cells are also executed when you click into a different cell.