Skip to content

[3 of 4] tui: route feature and memory toggles through app server#22915

Merged
etraut-openai merged 9 commits into
mainfrom
etraut/tui-config-app-server-3-feature-toggles
May 21, 2026
Merged

[3 of 4] tui: route feature and memory toggles through app server#22915
etraut-openai merged 9 commits into
mainfrom
etraut/tui-config-app-server-3-feature-toggles

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 15, 2026

Why

Experimental feature toggles and memory settings can update several related config values in one interaction. Keeping those writes local in a remote TUI session is especially dangerous because the UI can diverge from the app-server config while also leaving behind partially stale supporting keys.

This is [3 of 4] in a stacked series that moves TUI-owned config mutations onto app-server APIs.

What changed

  • Routed feature flag persistence through app-server batch writes, including the supporting reviewer and permission updates used by guardian approval.
  • Routed Windows sandbox mode persistence and legacy Windows feature cleanup through app-server writes.
  • Routed memory settings through app-server batch writes and updated the TUI tests to exercise the embedded app-server path.

Config keys affected

  • features.<feature_key>
  • profiles.<profile>.features.<feature_key>
  • approval_policy
  • sandbox_mode
  • approvals_reviewer
  • windows.sandbox
  • features.experimental_windows_sandbox
  • features.elevated_windows_sandbox
  • features.enable_experimental_windows_sandbox
  • Profile-scoped Windows legacy feature variants under profiles.<profile>.features.*
  • memories.use_memories
  • memories.generate_memories
  • Profile-scoped memory variants under profiles.<profile>.memories.*

Suggested manual validation

  • Connect the TUI to a remote app server, toggle guardian approval on and off, and confirm the remote config updates features.guardian_approval, reviewer state, approval policy, and sandbox mode coherently.
  • Toggle a default-false experimental feature at the root level, disable it again, and confirm the key clears instead of lingering as an unnecessary explicit false.
  • Change memory settings and confirm the remote config updates both memory keys while the running TUI reflects the new state.
  • On Windows, switch sandbox mode through the TUI and confirm windows.sandbox is updated while the legacy Windows feature keys are cleared.

Stack

  1. #22913 [1 of 4] primary settings writes
  2. #22914 [2 of 4] app and skill enablement
  3. #22915 [3 of 4] feature and memory toggles
  4. #22916 [4 of 4] startup and onboarding bookkeeping

@etraut-openai etraut-openai marked this pull request as ready for review May 15, 2026 22:40
@etraut-openai etraut-openai force-pushed the etraut/tui-config-app-server-3-feature-toggles branch from 12fe1d5 to 15dc6d3 Compare May 15, 2026 22:45
@etraut-openai etraut-openai force-pushed the etraut/tui-config-app-server-2-catalog-state branch from ff17872 to 6a181fa Compare May 15, 2026 22:48
@etraut-openai etraut-openai force-pushed the etraut/tui-config-app-server-3-feature-toggles branch 2 times, most recently from d8375c8 to d5f9063 Compare May 15, 2026 22:50
etraut-openai added a commit that referenced this pull request May 16, 2026
## Why
The TUI can run against a remote app server, but several high-traffic
settings still persisted by editing the local config file. That sends
remote sessions' preference writes to the wrong machine and lets local
disk state drift from the app-server-owned config.

This is **[1 of 4]** in a stacked series that moves TUI-owned config
mutations onto app-server APIs.

## What changed
- Added a small TUI helper for typed app-server config writes.
- Routed primary interactive preference writes through
`config/batchWrite`.
- Preserved existing profile scoping for settings that already support
`profiles.<profile>.*` overrides.

## Config keys affected
- `model`
- `model_reasoning_effort`
- `personality`
- `service_tier`
- `plan_mode_reasoning_effort`
- `approvals_reviewer`
- `notice.fast_default_opt_out`
- Profile-scoped equivalents under `profiles.<profile>.*`

## Suggested manual validation
- Connect the TUI to a remote app server, change `model` and
`model_reasoning_effort`, reconnect, and confirm the remote config
retained both values while the local `config.toml` did not change.
- Change `personality`, `plan_mode_reasoning_effort`, and the explicit
auto-review selection, then reconnect and confirm those choices persist
through the app server.
- Clear the service tier back to default and confirm `service_tier` is
cleared while `notice.fast_default_opt_out = true` is persisted
remotely.
- Repeat one setting change with an active profile and confirm the write
lands under `profiles.<profile>.*`.

## Stack
1. [#22913](#22913) `[1 of 4]`
primary settings writes
2. [#22914](#22914) `[2 of 4]` app
and skill enablement
3. [#22915](#22915) `[3 of 4]`
feature and memory toggles
4. [#22916](#22916) `[4 of 4]`
startup and onboarding bookkeeping
@etraut-openai etraut-openai force-pushed the etraut/tui-config-app-server-2-catalog-state branch from df4e122 to fd994c7 Compare May 16, 2026 21:31
etraut-openai added a commit that referenced this pull request May 16, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b37f46d600

ℹ️ 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".

Comment thread codex-rs/tui/src/app/config_persistence.rs Outdated
etraut-openai added a commit that referenced this pull request May 19, 2026
## Why
App and skill toggles are user config mutations too. When the TUI is
attached to a remote app server, writing those toggles into the local
`config.toml` makes the UI report success without updating the server
that actually owns the session.

This is **[2 of 4]** in a stacked series that moves TUI-owned config
mutations onto app-server APIs.

## What changed
- Routed app enable/disable persistence through app-server config batch
writes.
- Routed skill enable/disable persistence through `skills/config/write`.
- Avoided refreshing local config from disk after these writes when the
TUI is connected to a remote app server.

## Config keys affected
- `apps.<app_id>.enabled`
- `apps.<app_id>.disabled_reason`
- `[[skills.config]]` entries keyed by `path`, with `enabled = false`
used for persisted disables

## Suggested manual validation
- Connect the TUI to a remote app server, disable an app, reconnect, and
confirm the app remains disabled from remote config rather than local
disk state.
- Re-enable the same app and confirm both `apps.<app_id>.enabled` and
`apps.<app_id>.disabled_reason` are cleared remotely.
- Disable a skill in the manage-skills UI and confirm a remote
`[[skills.config]]` disable entry appears.
- Re-enable that skill and confirm the disable entry is removed and the
effective enabled state updates without relying on local config reloads.

## Stack
1. [#22913](#22913) `[1 of 4]`
primary settings writes
2. [#22914](#22914) `[2 of 4]` app
and skill enablement
3. [#22915](#22915) `[3 of 4]`
feature and memory toggles
4. [#22916](#22916) `[4 of 4]`
startup and onboarding bookkeeping
Base automatically changed from etraut/tui-config-app-server-2-catalog-state to main May 19, 2026 17:21
@etraut-openai etraut-openai force-pushed the etraut/tui-config-app-server-3-feature-toggles branch from f0e5a0e to 61beab3 Compare May 19, 2026 17:35
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61beab30bd

ℹ️ 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".

Comment thread codex-rs/tui/src/app/config_persistence.rs Outdated
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7513a9ceb7

ℹ️ 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".

Comment thread codex-rs/tui/src/app/config_persistence.rs
Comment thread codex-rs/tui/src/app/config_persistence.rs Outdated
Comment thread codex-rs/tui/src/app/event_dispatch.rs
Comment thread codex-rs/tui/src/app/config_persistence.rs
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 752339266a

ℹ️ 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".

Comment thread codex-rs/tui/src/app/config_persistence.rs Outdated
Comment thread codex-rs/tui/src/app/config_persistence.rs
Comment thread codex-rs/tui/src/app/config_persistence.rs
Comment thread codex-rs/tui/src/config_update.rs Outdated
…-server-3-feature-toggles

# Conflicts:
#	codex-rs/tui/src/app/config_persistence.rs
#	codex-rs/tui/src/config_update.rs
Copy link
Copy Markdown
Contributor

@canvrno-oai canvrno-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tasked Codex with testing this on a remote app-server, and it did encounter one issue that seems legitimate:

While testing this manually against a remote app-server, I found one remaining override edge case: the OkOverridden path resyncs the effective guardian_approval bit, but then still applies approvals_reviewer / approval_policy from the effective config unconditionally.

If a higher-priority layer forces guardian_approval = false while companion reviewer/policy writes remain effective, the TUI can show Auto-review disabled while approvals are still routed to the reviewer.

Other that that, everything looks good

@etraut-openai etraut-openai merged commit e8378c7 into main May 21, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-config-app-server-3-feature-toggles branch May 21, 2026 23:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants