Route built-in permission selections through the app server (#46008)

## Why

Built-in permission selections in connected TUI threads previously applied local settings directly. Use server-confirmed settings so the TUI adopts the authoritative permissions and refreshes cached network configuration.

## What changed

- Send built-in permission selections through the existing app-server settings API, including selections after Windows sandbox setup. Allow built-in selections during a running turn.
- Block task creation and switching while permission updates are pending, restoring submitted text to the composer when necessary.
- Refresh local permissions, approval settings, runtime overrides, and network configuration when the server confirms a built-in selection.
- Submit a pending initial prompt when the selected permissions already match the current settings.

## Testing

Add regression tests for server-confirmed built-in selection during a running turn, blocked task switches, stale proxy removal, and pending prompt submission when permissions already match. Update background-task tests to wait for settings confirmation.

GitOrigin-RevId: 76e71a8c278c37c0a7ce7c0246da7d185e12ee7a
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-16 19:15:53 +00:00
1 parent 39a99a6c36
commit 2b59d92dbd
11 files changed
+267 -9

No files matched your search

+3
View File
@@ -335,6 +335,9 @@ impl App {
self.chat_widget.pre_draw_tick();
return Ok(AppRunControl::Continue);
}
if self.reject_pending_permission_root_switch() {
return Ok(AppRunControl::Continue);
}
loading::draw(tui)?;
if self.primary_thread_id != Some(root_thread_id) {
let previous_displayed_thread_id = self.current_displayed_thread_id();