The autosave that can't wait
Type one sentence and the tally climbs by forty. Reload, and the last letter you typed is gone. The debounce is right there — and it tests clean.
reactnextChewy~25 min
1
Fresh from the oven
Clone it down and have a look around.
$
git clone https://github.com/loaf-crumbs/autosave-that-cant-wait.git2
The scenario
Crumbline's recipe cards hold the bakers' working notes — hydration tweaks, timing changes, what went wrong on Tuesday. An AI assistant recently added autosave: type, pause, saved. A debounce sits between the keystrokes and the API so the server only hears from you once the typing stops. It demoed fine, and the morning crew loves not having a save button.
Then someone noticed the tally. The header counts saves this session, and after typing one sentence it reads forty-something. The version history reads like a flipbook of you typing, one entry per keystroke. And the strangest part: type quickly, reload right away, and the last letter you typed is gone — the server's copy runs one keystroke behind, always, no matter how long you wait before reloading.
The debounce utility itself passes any test you throw at it in a plain script: call it a hundred times in a tight loop, it fires once, with the last arguments. Nothing errors on the client or the server, and the server saves exactly what it's told, exactly as often as it's asked.
3
What done looks like
- A burst of typing followed by a pause produces exactly one save
- The saved draft matches the editor exactly — last character included
- Notes still save on their own, with no manual save action
- The session tally climbs once per pause, not once per keystroke
4
Stuck?
Peek if you need to — they get more specific as you go.
5
Taste test
Send it in when you’re ready. We’ll see if it’s tasty.
When you've got the flag, paste it here.
No attempts yet.