Enable remote named permission profile selection in the TUI (#43340)

## Why

The permissions picker displayed profiles from the connected app server but disabled selection of remote custom profiles.

## What changed

- Enable named profile selection through `thread/settings/update` and track pending selections until server confirmation.
- Use pending or confirmed server permissions for subsequent turns, preserve profiles across forks and prompt edits, and reconcile pending selections on reconnect.
- Block conflicting permission changes and forks while selection is pending. Preserve input when selection fails and report unsupported app servers.
- Reject working directory changes while a remote named profile is active.

## Testing

Add regression coverage for profile selection, turn permissions, pending-selection guards, prompt-edit profile preservation, reconnect reconciliation, and profile inheritance in forks and side conversations.

GitOrigin-RevId: 76e9bb7b4d631b1066974da013d9915a89dc54a7
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-07 03:19:57 +00:00
1 parent 1fb5158b34
commit 121f91fd5d
24 files changed
+914 -50

No files matched your search

+3
View File
@@ -131,6 +131,7 @@ use codex_app_server_protocol::SkillsListResponse;
use codex_app_server_protocol::ThreadItem;
use codex_app_server_protocol::ThreadLoadedListParams;
use codex_app_server_protocol::ThreadMemoryMode;
use codex_app_server_protocol::ThreadSettingsUpdateParams;
use codex_app_server_protocol::ThreadStartSource;
use codex_app_server_protocol::Turn;
use codex_app_server_protocol::TurnError as AppServerTurnError;
@@ -559,6 +560,8 @@ pub(crate) struct App {
cloud_config_bundle: CloudConfigBundleLoader,
runtime_approval_policy_override: Option<RuntimeApprovalPolicyOverride>,
runtime_permission_profile_override: Option<RuntimePermissionProfileOverride>,
/// In-flight remote selections; confirmed settings live in each task's server snapshot.
pending_server_profiles: HashMap<ThreadId, PermissionProfileSelection>,
pub(crate) file_search: FileSearchManager,