Store data in localStorage

Store data in localStorage in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need this page to remember the user's draft between visits. Save the current form object as JSON…
I need this page to remember the user's draft between visits. Save the current form object as JSON under key draftProfile in localStorage whenever the user blurs a field or clicks Save. Before writing, read draftProfile, merge incoming values so we don't wipe unset fields, and only write if something actually changed. On write, also set lastSavedDraft to an ISO timestamp for audit.

Improve — make it easier to accept

+
Before I wire this up to the client's browser, make the draft easy to recover and inspect. Surface…
Before I wire this up to the client's browser, make the draft easy to recover and inspect. Surface a clear message when a draft exists, show the lastSavedDraft timestamp at the top, and put a Recover draft button that loads values without overwriting anything the user has changed in the current session. Flag fields that are missing from the draft versus the form schema so a reviewer doesn't think data silently disappeared.

Decide — diagnose the stuck moment

+
I closed the settings tab after entering about half the profile. I reopened and the form is empty.…

User closed the tab and swore their half-filled form would exist next time

I closed the settings tab after entering about half the profile. I reopened and the form is empty. I checked localStorage and found draftProfile present but not populating the form. Priya on support will blame our save logic. What's the likely cause — JSON mismatch, key name typo, or merge strategy — and what's the smallest fix I should try first to restore drafts without losing users' current input?

Become — change the pattern

+
Across several sprints we keep getting bug reports: users lose partially completed forms or see…

We repeatedly lose people’s unsaved inputs between sessions

Across several sprints we keep getting bug reports: users lose partially completed forms or see stale drafts. Each fix is a quick patch and the problem returns. Which habit should we change to stop this cycle? Propose a single checklist item and one small architectural change that would prevent accidental overwrite and make recovery reliable.

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.