Repository navigation
feat(web): confirm server updates when work is running - #451
Merged
Merged
Conversation
incognitojam
force-pushed
the
styal/server-update-activity-confirm
branch
from
September 25, 2026 09:57
fde2e46 to
76aa5ec
Compare
incognitojam
marked this pull request as ready for review
September 25, 2026 10:08
This was referenced Sep 25, 2026
incognitojam
added a commit
that referenced
this pull request
Sep 25, 2026
Some messages still called this app T3 Code, such as "Update the T3 Code desktop app that runs the server?" and "T3 Code could not add the project." They now say styal. This covers the desktop app update, desktop app activation, OpenCode, and theme file messages, and the **Open links in** setting. Messages about importing T3 Code data keep the name. #451 moves the desktop app update prompt to `ServerUpdateAction.logic.ts`, so whichever merges second needs the wording applied there. Focused tests pass for desktop app updates, desktop app activation, and theme files. --- Written by an agent (Claude Code, claude-opus-5-5).
The Update button now reads the server's host activity before restarting it. Idle servers update without a dialog; running or waiting threads, running terminal commands, or a failed check require confirmation. The dialog text is shared with the desktop quit and restart guard.
…ations Thread continuation resumes only turns that are still running, not background work such as a monitor left by a finished turn, so the dialog does not promise that any thread continues.
The activity check now reports how many active threads the continuation step would resume, using the same selection. With continuation requested, the update confirmation lists those threads as continuing and the rest as interrupted.
incognitojam
force-pushed
the
styal/server-update-activity-confirm
branch
from
September 25, 2026 11:44
22fc58d to
1a5cdb8
Compare
incognitojam
pushed a commit
that referenced
this pull request
Sep 25, 2026
(cherry picked from commit 15193df) Fork adaptation: Single and batch updates share one path that runs the fork's host-activity check (fork #451) before asking, so updating several machines together also warns about running work on any of them, with continuation counted per machine. canUpdateFromApp also excludes the fork's service-migration capability, which needs manual steps, and success toasts name @styal/cli. The batch confirmation test uses the fork's mocked confirm dialog. Upstream-PR: 10596
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The in-app Update server action now checks the server for running work before restarting it, using the same activity check and dialog wording as desktop quit and restart. Idle servers update without a dialog.
The Update server action restarted a connected server without checking what was running on it. The only confirmation was a fixed prompt for desktop-hosted servers, so updating a CLI or service-hosted server could interrupt an agent turn, a background task such as a Claude monitor, or a terminal command, including work started from another device. Desktop quit and restart already check this through the server's host activity (#362), but that check was limited to backends the desktop app hosts.
Behavior
pingdotgg/t3code#13400, tracked in Continue threads with background work after a server restart #454).Implementation
listContinuableThreadsinserverRuntimeStartup.tsis now the one place that selects threads for continuation. The self-update marking step uses it, and the activity check reports how many active threads it selects ascontinuableSessions. If upstream widens the selection, the dialog changes with it.server.getHostActivityis a new WebSocket RPC (orchestration read scope) that returns the existinginspectHostActivityresult. It uses the WebSocket rather than the existing/api/environment/activityHTTP endpoint so it works over relay and tunnel connections as well as direct ones.describeHostActivityin@t3tools/shared/hostActivityturns one or more activity results into the dialog lines and the kind of confirmation needed. The desktop shutdown guard and the web update action both use it, so their wording stays in sync, and a multi-server update action can pass several results in and get combined counts. Desktop quit and restart output is unchanged.Screenshots
The same thread, with a Codex turn and a terminal command both running. Before this change, Update restarted the server immediately. It now asks first.
With Continue threads after restarts on, a running turn that continuation will resume is listed as continuing:
Validation
Real client: a web dev server on isolated synthetic state, with the client forced to see the server as behind and supporting in-app updates. The server update RPCs were stubbed to fail, so confirming did not install anything. None of that is part of this diff.
sleep 600running in a thread terminal, Update from the chat banner: "Update the server with running work? 1 terminal session will be interrupted." Cancel sent no update request.sleep 120plus the terminal: "1 thread will be interrupted." and "1 terminal session will be interrupted."server.getHostActivityagainst the app under test with a running provider session and mocked terminal inspection, and receives those counts.Not exercised in a real client: a thread waiting for approval, a thread with only background work, a remote desktop-app update, and a real install after Confirm. These are covered by the automated tests above, except the real install, which this change does not touch.
Written by an agent (Claude Code, claude-opus-5-5).