Skip to content

MES-715: Check for updates in the background for faster bootup#34

Merged
markovejnovic merged 1 commit intomainfrom
marko/mes-715-update-in-the-background
Feb 11, 2026
Merged

MES-715: Check for updates in the background for faster bootup#34
markovejnovic merged 1 commit intomainfrom
marko/mes-715-update-in-the-background

Conversation

@markovejnovic
Copy link
Collaborator

No description provided.

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Feb 11, 2026

Mesa Description

This PR moves the software update check to a background task, allowing the application to start up faster.

Previously, the update check was a blocking operation in the main startup path. This could cause noticeable delays, especially on slow network connections. By making the check asynchronous and running it in a background task after the daemon has started, the application becomes responsive to the user much more quickly.

Changes

  • src/daemon.rs: Spawns a new tokio task on startup to run the update check asynchronously in the background.
  • src/updates.rs: Refactored check_for_updates to be an async function. The blocking network call is now wrapped in tokio::task::spawn_blocking to avoid stalling the async runtime.
  • src/main.rs: Removed the synchronous call to check_for_updates from the main application entry point.

Description generated by Mesa. Update settings

@markovejnovic markovejnovic changed the title Update check in the background MES-715: Check for updates in the background for faster bootup Feb 11, 2026
@markovejnovic markovejnovic force-pushed the marko/mes-715-update-in-the-background branch from 41c2d5f to a9f64c7 Compare February 11, 2026 18:04
@markovejnovic markovejnovic merged commit 0453e34 into main Feb 11, 2026
6 checks passed
Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

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

Performed full review of b6f03ac...41c2d5f

Analysis

  1. Update notifications are now limited to daemon startup only, potentially reducing visibility for operators who primarily use CLI management commands.
  2. The background update checking lacks observability hooks and proper testing infrastructure.
  3. The async implementation could benefit from dependency injection to improve testability of the background job.
  4. Consider implementing a lightweight signaling mechanism or cache system to restore update notification visibility across CLI commands.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 1 comments | Edit Agent SettingsRead Docs


updates::check_for_updates();

let args = Args::parse();
Copy link

Choose a reason for hiding this comment

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

Medium

Removing the synchronous updates::check_for_updates() call means only the daemon startup path will ever trigger an update warning. Commands such as git-fs reload (which talk to an already-running daemon but do not start it) used to surface the warning on every invocation, but now they will never emit it. If that isn’t intentional, we may need to keep a non-blocking check (or a stub that notifies the daemon) for those management commands as well.

Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: mesa-dot-dev/gitfs#34
File: src/main.rs#L61
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
Removing the synchronous `updates::check_for_updates()` call means only the daemon startup path will ever trigger an update warning. Commands such as `git-fs reload` (which talk to an already-running daemon but do not start it) used to surface the warning on every invocation, but now they will never emit it. If that isn’t intentional, we may need to keep a non-blocking check (or a stub that notifies the daemon) for those management commands as well.

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