Skip to content

feat: add mock update server#1180

Open
nmggithub wants to merge 4 commits intopingdotgg:mainfrom
nmggithub:mock-update-server
Open

feat: add mock update server#1180
nmggithub wants to merge 4 commits intopingdotgg:mainfrom
nmggithub:mock-update-server

Conversation

@nmggithub
Copy link
Contributor

@nmggithub nmggithub commented Mar 18, 2026

What Changed

cc @juliusmarminge

This adds a simple mock update server to our setup. There are several ways to use it, docs can be added if desired.

Here are the basics:

  1. bun run start:mock-update-server starts the mock update server. By default, it serves on localhost:3000 and out of ./release-mock at the project root. Both are configurable.
  2. build-desktop-artifact.ts has two more options: (a) wether or not to build with mock updates, and (b) if so, which port to use. These options control two things: (c) wether or not to output to ./release-mock over ./release (the default) and (d) the manifest URL built into the built Electron app.
  3. The same two options above are configurable at runtime on any Electron build.

When used normally, this functionality should work fine. However, users should be aware of the manifest URL's they cause to be built into the app and/or use runtime options to ensure they spin up the mock update server on the right port.

Why

This will help us when testing the update mechanisms.

UI Changes

N/A

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add mock update server for local desktop auto-update testing

  • Adds scripts/mock-update-server.ts, a Bun-based static file server that serves update artifacts from release-mock/ at localhost:3000 (configurable via T3CODE_DESKTOP_MOCK_UPDATE_SERVER_PORT).
  • When T3CODE_DESKTOP_MOCK_UPDATES is set, configureAutoUpdater in src/main.ts points electron-updater at the local server instead of GitHub.
  • Extends scripts/build-desktop-artifact.ts with --mock-updates and --mock-update-server-port flags; mock builds output to release-mock/ and publish config targets the local server.
  • Adds a start:mock-update-server npm script to launch the server.

Macroscope summarized 7f0c421.

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e6eec879-8cd5-4f14-b352-7ca6c826d5cb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 18, 2026
@nmggithub nmggithub force-pushed the mock-update-server branch from 214bf71 to 7f0c421 Compare March 18, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant