Goal
Remember the last username, message, color, and selected built-in badges when the page reloads, so a refresh does not wipe in-progress work.
Scope
- On meaningful state changes, save a small JSON blob to
localStorage (version the key, e.g. tmc-state-v1).
- On load, restore username, message, color (via
parseHexColor), and selected built-in badge IDs that still exist in BADGES.
- Reset should clear persisted state as well as the UI.
- Fail soft: corrupt/missing storage must fall back to current defaults without breaking the page.
Out of scope
- Persisting custom badge image data URLs (can be large; skip or document as follow-up).
- Syncing across tabs beyond a simple reload restore.
- New dependencies or frameworks.
Acceptance
- Reload restores the last valid username/message/color/built-in badges.
- Reset clears storage and returns to defaults.
- Invalid stored color is ignored (defaults apply).
node --test still passes; manual check via ./start-local.sh.
Please comment here before starting if you want to claim this.
Goal
Remember the last username, message, color, and selected built-in badges when the page reloads, so a refresh does not wipe in-progress work.
Scope
localStorage(version the key, e.g.tmc-state-v1).parseHexColor), and selected built-in badge IDs that still exist inBADGES.Out of scope
Acceptance
node --teststill passes; manual check via./start-local.sh.Please comment here before starting if you want to claim this.