Skip to content

Client: ask before updating, wait for running work; reopen this computer's AI session - #364

Merged
shadowbrok3r merged 2 commits into
mainfrom
feat/client-update-prompt
Oct 9, 2026
Merged

shadowbrok3r merged 2 commits into
mainfrom
feat/client-update-prompt

Conversation

@shadowbrok3r

Copy link
Copy Markdown
Owner

Two client changes, so that updates and restarts stop interrupting agent sessions.

Updates ask first and wait for running work

Before this PR, MasterTech downloaded a newer release at login and relaunched as soon as the download finished. It didn't ask, and it didn't check for running work. On 2026-10-09 that relaunched DESKTOP-VRT0DTD mid-QC and wiped its data copy and two other remote jobs.

  • Background download: the update still downloads in the background. When it finishes, it waits.

  • Prompt (default): a toast offers Update now or Later, and the taskbar flashes. Later holds the next prompt for an hour. Do Not Disturb holds the toast until it's off.

  • Install updates automatically: a new checkbox in the user menu, under Update. It installs without asking.

  • Waiting for work: either way, the restart waits while any of these is running on the computer:

    • a RemoteExec job;
    • a remote script run (a new guard counts them);
    • a stress test;
    • a remote-control lease that hasn't expired;
    • an AI session working on this computer (checked every 30 s).

    Clicking Update now while busy shows a toast saying it will update once nothing is running.

  • Menu Update button: it counts as accepting, so the update installs without a prompt once the computer is idle.

  • Where the setting lives: C:\ProgramData\Mastertech\update_settings.json. eframe storage is keyed by version, so it starts empty after every update.

  • Fix: the release scan skips drafts and prereleases, matching the /releases/latest the downloader installs.

The admin console's Deploy MasterTech Update push is unchanged. It's an explicit admin action and still restarts at once.

This computer's AI session reopens at login

When MasterTech starts and someone signs in, it looks up this computer's open session (AgentThread::reopen_for_connection, REOPEN_SQL), then opens it in the Ai tab. A session qualifies when it is:

  • not closed or failed;
  • changed in the last three days;
  • not archived by the signed-in user.

It goes through the same path as a toast's Open button.

Tests

  • cargo test -p database --test agent_thread_reopen: the newest open session; closed, failed or stale sessions stay shut; a per-user archive.
  • cargo test -p displays --lib … update_toast: the toast stays until answered, a click is handed out once, and nothing is posted under Do Not Disturb.
  • cargo test -p MasterTech --bin MasterTech update_policy: the decision table, the busy reasons, the script-run guard, and the setting's round trip and defaults.

🤖 Generated with Claude Code

shadowbrok3r and others added 2 commits October 9, 2026 17:37
A downloaded release no longer relaunches MasterTech on its own. A toast
offers Update now or Later, and "Install updates automatically" under the
Update menu skips the question. Either way the restart waits while remote
jobs, remote script runs, a stress test, an armed remote-control lease or
an AI session on this computer are running. The setting lives in
ProgramData, since eframe storage starts empty after every update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At sign-in, MasterTech opens this computer's newest open AI session in the
Ai tab, when it changed in the last three days and the signed-in user has
not archived it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shadowbrok3r
shadowbrok3r merged commit cf51f8b into main Oct 9, 2026
10 of 16 checks passed
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