Skip to content

Reset app to a clean first-run experience - #7

Merged
duhfreakinduh merged 2 commits into
mainfrom
chore/fresh-start
Aug 24, 2026
Merged

duhfreakinduh merged 2 commits into
mainfrom
chore/fresh-start

Conversation

@duhfreakinduh

Copy link
Copy Markdown
Owner

Fresh start

  • Move saved data to shakeonit_v3
  • On first v3 load, discard old test/demo storage
  • Start the scoreboard at 0 wins, 0 losses, 0 points
  • Keep only one default group: Friends
  • Seed exactly two active examples with clear AI-judge rules
    • First to make 10 free throws
    • Longest wall sit
  • Simplify the welcome text
  • Bump the service-worker cache to v8 so phones receive the reset

This intentionally resets prior local ShakeOnIt test data once, per request.

@duhfreakinduh
duhfreakinduh merged commit 798f245 into main Aug 24, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread app-core.js

const STORAGE_KEY = 'shakeonit_v2';
const STORAGE_KEY = 'shakeonit_v3';
const LEGACY_STORAGE_KEYS = ['shakeonit_v2', 'shakeonit_bets', 'shakeonit_scores'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread app-core.js
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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant