Skip to content

Add dispatch milestone celebration#150

Open
0xturboblitz wants to merge 1 commit into
meltylabs:mainfrom
0xturboblitz:1-start-here-29909c3d
Open

Add dispatch milestone celebration#150
0xturboblitz wants to merge 1 commit into
meltylabs:mainfrom
0xturboblitz:1-start-here-29909c3d

Conversation

@0xturboblitz

Copy link
Copy Markdown

Summary

Adds a milestone celebration after every 10 dispatched trains. The celebration shows the total dispatch count in the center of the page with a short pop animation and confetti burst, then cleans itself up.

Screenshots

Before 10 dispatches:

Before 10 dispatches

After 10 dispatches:

After 10 dispatches

Mobile after 10 dispatches:

Mobile after 10 dispatches

Validation

  • git diff --check
  • pnpm i attempted, but this dependency-free starter repo has no package.json
  • npm run dev attempted, but this dependency-free starter repo has no package.json
  • Served the static page at http://127.0.0.1:5177/
  • Playwright validation dispatched 10 trains, confirmed milestone text, confirmed 28 confetti pieces, confirmed counter text, confirmed cleanup, and captured desktop/mobile screenshots

@0xturboblitz 0xturboblitz requested a review from mattppal as a code owner July 9, 2026 21:29
@0xturboblitz

Copy link
Copy Markdown
Author

@codex review

@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: 868f2112e0

ℹ️ 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 index.html
Comment on lines +490 to +493
window.setTimeout(() => {
milestone.classList.remove("show");
milestone.textContent = "";
}, 1900);

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 Cancel stale milestone cleanup timers

When the user keeps dispatching quickly, the next milestone can start before this cleanup timer from the previous one fires: the 120 ms throttle allows 10 more dispatches in about 1.2s, which is less than the 1.9s timeout. That stale timeout then removes show and clears the text for the new 20/30/... celebration partway through its animation, so store and clear the previous timeout or verify it is still cleaning up the same milestone before mutating the DOM.

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