Skip to content

Implement local version check for updates - #928

Open
azayrahmad wants to merge 1 commit into
mainfrom
feat/local-version-check-10048426452564394857
Open

azayrahmad wants to merge 1 commit into
mainfrom
feat/local-version-check-10048426452564394857

Conversation

@azayrahmad

Copy link
Copy Markdown
Owner

This PR implements a local versioning system to reliably detect new deployments without hitting GitHub API rate limits.

Key changes:

  1. Automated version generation: A new script scripts/generate_version.js extracts the version from package.json and creates public/version.json during the build process.
  2. Reliable fetching: src/system/version-utils.js implements getLatestVersion with cache: 'no-store' and timestamp query parameters to bypass any caching layers (browser, CDN, or Service Worker).
  3. Boot-time notification: The system now displays the current version and checks for updates during the boot sequence (before mouse detection). If a new version is found, it notifies the user to use the "Windows Update" tool.
  4. Improved About dialog: The About application now uses the same local version check, providing a consistent and rate-limit-free experience.
  5. CI/CD alignment: The version.json is generated during the build, ensuring it always reflects the version from package.json in the deployed environment.

PR created automatically by Jules for task 10048426452564394857 started by @azayrahmad

- Added `scripts/generate_version.js` to create `public/version.json` from `package.json`.
- Updated `package.json` to generate `version.json` during `dev` and `build`.
- Added `src/system/version-utils.js` for reliable, cache-busting version fetching.
- Integrated version check into `src/system/os-init.js` boot sequence.
- Updated `AboutApp` to use the new local version check instead of GitHub API.
- Added `writeBootMessage` to `src/system/boot-screen.js`.
- Ignored `public/version.json` in `.gitignore`.

This change avoids GitHub API rate limits and ensures users are notified of new deployments immediately on boot.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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