Skip to content

Comments

dev: update handling of dev and beta modes#1400

Merged
DayKev merged 3 commits intobetafrom
dev/is_dev-and-start-commands
Feb 14, 2026
Merged

dev: update handling of dev and beta modes#1400
DayKev merged 3 commits intobetafrom
dev/is_dev-and-start-commands

Conversation

@DayKev
Copy link
Contributor

@DayKev DayKev commented Dec 11, 2025

What are the changes the user will see?

The title of the webpage and the version string displayed on the title screen will have " (Beta)" appended to them when running in "beta" (e.g. some sort of beta website) or "development" mode (e.g. locally).

Why am I making these changes?

General code simplification and cleanup.

What are the changes from a developer perspective?

  • Replaced the start command in package.json with start:prod and start:beta, which run the game in "production" and "beta" mode respectively.
    Previously, start would run the game in "development" mode just like start:dev due to the vite command running in "development" mode by default if no --mode arg is passed.

  • Added IS_DEV global constant that checks for "development" mode.

  • Removed Api#isLocal and replace its uses with BYPASS_LOGIN.

  • Added " (Beta)" to window title and game version displayed on the title screen when in "development" or "beta" mode.

  • Replaced .then() pattern with await in main.ts.

  • Removed obsolete commented code in game-data.ts.

  • Added return types to api methods.

  • Updated deploy-beta.yml workflow to use "beta" mode when building (though the workflow is currently disabled anyway).

Checklist

  • Otherwise: I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?

@DayKev DayKev self-assigned this Dec 11, 2025
@DayKev DayKev added Refactor For refactoring code Development Changes designed to improve the development process labels Dec 11, 2025
@DayKev DayKev force-pushed the dev/is_dev-and-start-commands branch from 444b4c8 to 6698e3e Compare December 28, 2025 09:32
- Replace the `start` command in `package.json`
with `start:prod` and `start:beta`, which run the game
in "production" and "beta" mode respectively

Previously, `start` would run the game in "development" mode
just like `start:dev` due to the `vite` command running in
"development" mode by default if no `--mode` arg was passed

- Add `IS_DEV` global constant that checks for "development" mode

- Remove `Api#isLocal` and replace its uses with `BYPASS_LOGIN`

- Add " (Beta)" to window title and game version displayed
on the title screen when in "development" or "beta" mode

- Replace `.then()` pattern with `await` in `main.ts`

- Remove obsolete commented code in `game-data.ts`
@DayKev DayKev force-pushed the dev/is_dev-and-start-commands branch from 6698e3e to 559192e Compare January 17, 2026 00:04
Copy link
Contributor

@flx-sta flx-sta left a comment

Choose a reason for hiding this comment

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

LGTM.
A bit polluted with style fixes but easy

"version": "0.1.0",
"type": "module",
"scripts": {
"start": "vite",
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add a start that give you a selection of which mode you wanna launch via prompter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need an extra layer of indirection for something so simple.

@DayKev DayKev merged commit bc9532b into beta Feb 14, 2026
9 checks passed
@DayKev DayKev deleted the dev/is_dev-and-start-commands branch February 14, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development Changes designed to improve the development process Refactor For refactoring code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants