Repository navigation
Reset app to a clean first-run experience - #7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b7adb6ea8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const STORAGE_KEY = 'shakeonit_v2'; | ||
| const STORAGE_KEY = 'shakeonit_v3'; | ||
| const LEGACY_STORAGE_KEYS = ['shakeonit_v2', 'shakeonit_bets', 'shakeonit_scores']; |
There was a problem hiding this comment.
Reset the bonus-game storage during the v3 fresh start
When upgrading a device that has previously used the bonus arcade, this list removes only the old main-game keys, while app.js stores Mega Tic-Tac-Toe, Dots & Boxes, Memory, and Reaction progress under the four BONUS_STORAGE keys at lines 6–10. Those boards and best scores therefore survive the advertised clean first-run reset; include those keys in the one-time cleanup just as resetAllLocalData() does.
Useful? React with 👍 / 👎.
| const groupBets = activeBets().filter(bet => bet.group === state.currentGroup); | ||
| document.getElementById('tab-home').innerHTML = ` | ||
| <div class="hero"><div class="hero-emoji">👋</div><h1>Welcome back, ${escapeHtml(state.profile.name)}!</h1><p class="muted">Make friendly challenges, settle the result, and keep the bragging rights honest.</p></div> | ||
| <div class="hero"><div class="hero-emoji">👋</div><h1>Welcome, ${escapeHtml(state.profile.name)}!</h1><p class="muted">Start with the two examples below, or delete them and make your own challenge.</p></div> |
There was a problem hiding this comment.
Update the renderHome implementation that actually runs
On every load, index.html evaluates app-core.js before app.js, whose later renderHome() declaration at lines 42–65 replaces this implementation before the load handler renders the page. Consequently first-time users still see “Welcome back” and the old generic text instead of this new example-specific welcome; the copy change needs to be made in or consolidated with the later implementation.
Useful? React with 👍 / 👎.
Fresh start
shakeonit_v3This intentionally resets prior local ShakeOnIt test data once, per request.