app-server: notify clients of remote-control status changes#19919
Merged
euroelessar merged 7 commits intomainfrom Apr 28, 2026
Merged
app-server: notify clients of remote-control status changes#19919euroelessar merged 7 commits intomainfrom
euroelessar merged 7 commits intomainfrom
Conversation
euroelessar
added a commit
that referenced
this pull request
Apr 28, 2026
euroelessar
added a commit
that referenced
this pull request
Apr 28, 2026
c91d450 to
57e804b
Compare
euroelessar
added a commit
that referenced
this pull request
Apr 28, 2026
453c5eb to
a6576d5
Compare
38507f2 to
8ff72d0
Compare
euroelessar
added a commit
that referenced
this pull request
Apr 28, 2026
a6576d5 to
97b944a
Compare
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97b944a76b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
owenlin0
approved these changes
Apr 28, 2026
Collaborator
owenlin0
left a comment
There was a problem hiding this comment.
focused mostly on the API and skimmed the impl given that it is isolated to remote_control. codex flagged some comments though, worth addressing?
Base automatically changed from
ruslan/app-server-disable-remote-control-without-sqlite
to
main
April 28, 2026 20:49
97b944a to
6414787
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
Remote-control app-server enrollments have both an internal server id and the environment id exposed to remote-control clients. App-server clients need one current status snapshot that says whether remote control is usable and which environment id, if any, is exposed.
A temporary websocket disconnect is not itself an identity change. Account changes, stale enrollment invalidation, successful re-enrollment, and missing ChatGPT auth are meaningful status changes. Disabled remote control remains
disabledregardless of auth or SQLite state. SQLite startup failure disablement and enrollment persistence failures are handled in #20068; this PR reports the resulting effective status to clients.What changed
remoteControl/status/changedcarryingstateandenvironmentId.RemoteControlConnectionStatevalues:disabled,connecting,connected, anderrored.RemoteControlHandleusing a Tokio watch channel.erroredstatus while leaving it retryable because auth can change at runtime.environmentIdwhen enrollment is cleared for account changes, auth loss, stale backend invalidation, or disabled remote control.Stack
Verification
just write-app-server-schemacargo test -p codex-app-server-protocolcargo test -p codex-app-server transport::remote_control --libcargo check -p codex-tuijust fix -p codex-app-server-protocoljust fix -p codex-app-serverjust fix -p codex-tui