Skip to content

Feature/highscores 4#66

Merged
manix84 merged 12 commits into
mainfrom
feature/highscores-4
May 22, 2026
Merged

Feature/highscores 4#66
manix84 merged 12 commits into
mainfrom
feature/highscores-4

Conversation

@manix84
Copy link
Copy Markdown
Owner

@manix84 manix84 commented May 22, 2026

This pull request introduces several new features and improvements focused on high-score tracking, Storybook integration, touch controls, and improved user feedback. The most significant changes include adding a satellite connection indicator for high-score sync state, enabling the touch steering guide by default, publishing a production Storybook reference site (including a new sprite gallery), and ensuring debug-mode runs are kept local-only for high scores. The update also improves migration and persistence of user options and enhances test coverage for these behaviors.

High Score System Improvements

  • Added a satellite connection indicator to reflect the high-score API state (offline, error, waiting, syncing, and success) in both the UI and documentation. The indicator provides real-time feedback and transitions back to "waiting" after a short success confirmation. [1] [2] [3] [4] [5] [6] [7]
  • Updated high-score logic so that runs using debug mode are always kept local-only, even if debug is enabled mid-session or restored from a session. Added tests to verify this behavior. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Storybook Integration

  • Added a production Storybook reference route under /stories/, built and published as part of the main build process. The showcase page now links to this route for sprite, menu, preroll, achievement, audio, and UI reference views. [1] [2] [3] [4] [5] [6]
  • Introduced a Storybook sprite gallery that previews real sprite sheets with live animation and supports multiple view modes. [1] [2]

Touch Controls and User Options

  • Enabled the touch steering guide by default for touch-capable devices, updated documentation and UI strings to reflect this, and ensured old preferences are migrated to the new default. Added tests to verify migration and persistence of user preferences. [1] [2] [3] [4] [5]

Documentation and Release Notes

  • Updated README.md and WHATSNEW.md to document all new features, changes to the high-score system, Storybook integration, and touch controls. [1] [2] [3] [4] [5] [6] [7] [8]

Build Process

  • Modified the build script to include Storybook output in the release artifacts, ensuring the reference site is always up-to-date.

These changes improve user experience, increase feature visibility, and ensure high-score integrity and transparency, especially for offline and debug scenarios.

Copilot AI review requested due to automatic review settings May 22, 2026 22:32
@manix84 manix84 enabled auto-merge (squash) May 22, 2026 22:33
@manix84 manix84 merged commit 67c37dd into main May 22, 2026
4 of 5 checks passed
@manix84 manix84 deleted the feature/highscores-4 branch May 22, 2026 22:34
Copy link
Copy Markdown

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

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: cae92def3c

ℹ️ 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 vite.config.ts
Comment on lines +40 to +45
const getHighScoreApiCandidates = (): string[] => {
const urls = new Set<string>([getHighScoreApiUrl(), defaultHighScoreApiUrl]);

for (let offset = 0; offset < apiPortScanAttempts; offset += 1) {
urls.add(`http://localhost:${apiPortScanStart + offset}`);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict API proxy to trusted high-score endpoints

The new proxy fallback scans http://localhost:8787..8806 and accepts the first response that is merely non-404 JSON, so any unrelated local JSON service on those ports can be treated as the high-score API. In that setup, score submissions (POST /api/high-scores) and run receipt requests can be sent to the wrong process, causing incorrect sync behavior and possible local data leakage during development. The candidate selection needs stronger validation (or no broad port scan) so only the intended high-score server is eligible.

Useful? React with 👍 / 👎.

@manix84 manix84 restored the feature/highscores-4 branch May 22, 2026 22:44
@manix84 manix84 review requested due to automatic review settings May 22, 2026 22:57
@manix84 manix84 deleted the feature/highscores-4 branch May 23, 2026 20:39
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