Start TUI on embedded app server#14512
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Lines 1755 to 1756 in db84242
App::run can return here when the model-migration prompt exits, but the only embedded_app_server.client.shutdown() call is later (line ~2070). That leaves the in-process client worker/runtime detached for this path. In long-lived hosts/tests this is a resource leak and can interfere with subsequent runs.
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Line 2019 in 73c1773
App::run starts an embedded server but this ? can return early from the loop on handler errors, bypassing the shutdown call at the end of the function. That leaves the in-process worker/task running until runtime teardown. Use a guard/finally-style path so embedded_app_server.client.shutdown() runs on both success and error exits.
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Lines 1996 to 2002 in c13e55b
App::run returns from this update-notification exit path without calling embedded_app_server.client.shutdown(). InProcessAppServerClient has no Drop-based shutdown, so this leaves the in-process server worker/background tasks running until process exit. The shutdown call only exists in other exit paths, making this branch leak runtime resources.
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6bb10d2559
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f423a82226
ℹ️ 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".
This reverts commit b1a837c.
…-startup # Conflicts: # codex-rs/app-server/src/message_processor.rs
| } | ||
| } | ||
|
|
||
| pub fn clear_external_auth_refresher(&self) { |
|
It seems like I can't formally approve it but I reviewed and only had the nitpick above, so LGTM. |
This PR is part of the effort to move the TUI on top of the app server. In a previous PR, we introduced an in-process app server and moved
execon top of it.For the TUI, we want to do the migration in stages. The app server doesn't currently expose all of the functionality required by the TUI, so we're going to need to support a hybrid approach as we make the transition.
This PR changes the TUI initialization to instantiate an in-process app server and access its
AuthManagerandThreadManagerrather than constructing its own copies. It also adds a placeholder TUI event handler that will eventually translate app server events into TUI events. App server notifications are accepted but ignored for now. It also adds proper shutdown of the app server when the TUI terminates.