Skip to content

[4 of 4] tui: route startup and onboarding config writes through app server#22916

Open
etraut-openai wants to merge 8 commits into
etraut/tui-config-app-server-3-feature-togglesfrom
etraut/tui-config-app-server-4-startup-bookkeeping
Open

[4 of 4] tui: route startup and onboarding config writes through app server#22916
etraut-openai wants to merge 8 commits into
etraut/tui-config-app-server-3-feature-togglesfrom
etraut/tui-config-app-server-4-startup-bookkeeping

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

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

Why

The remaining local writes happen during startup, onboarding, and prompt bookkeeping. They are less common than interactive settings changes, but they are still real config mutations and should follow the same app-server ownership model instead of reaching around it.

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

What changed

  • Deferred OSS provider persistence until the app server is available, then wrote it through config/batchWrite.
  • Moved onboarding project-trust persistence out of the TUI widget and into an app-server-backed config write after the trust decision is made.
  • Routed startup tooltip counts, warning dismissals, model-migration acknowledgements, and external-config-migration prompt bookkeeping through app-server config writes.

Config keys affected

  • oss_provider
  • projects.<project_key>.trust_level
  • tui.model_availability_nux.<model_slug>
  • notice.hide_full_access_warning
  • notice.hide_world_writable_warning
  • notice.hide_rate_limit_model_nudge
  • notice.model_migrations.<from_model>
  • notice.external_config_migration_prompts.home
  • notice.external_config_migration_prompts.home_last_prompted_at
  • notice.external_config_migration_prompts.projects.<project_key>
  • notice.external_config_migration_prompts.project_last_prompted_at.<project_key>

Suggested manual validation

  • Launch with --oss when no OSS provider is configured, pick a provider manually, and confirm oss_provider is persisted through the app-server path.
  • Run the trust-directory onboarding flow in embedded app-server mode and confirm the trusted project lands under projects.<project_key>.trust_level.
  • Exercise one startup bookkeeping flow, such as a model availability NUX tooltip or a model migration acknowledgement, and confirm the corresponding notice key updates remotely.
  • Dismiss one warning prompt and one external-config-migration prompt, then relaunch and confirm the app-server-owned prompt state suppresses the repeat prompt.

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-4-startup-bookkeeping branch from fb52e01 to 8cac60f Compare May 15, 2026 22:45
@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
…raut/tui-config-app-server-4-startup-bookkeeping

# Conflicts:
#	codex-rs/tui/src/config_rpc.rs
…raut/tui-config-app-server-4-startup-bookkeeping

# Conflicts:
#	codex-rs/tui/src/app/config_persistence.rs
#	codex-rs/tui/src/app/event_dispatch.rs
…raut/tui-config-app-server-4-startup-bookkeeping
…raut/tui-config-app-server-4-startup-bookkeeping
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
…raut/tui-config-app-server-4-startup-bookkeeping
…raut/tui-config-app-server-4-startup-bookkeeping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant