Skip to content

TUI config cleanup: trusted projects#24255

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/tui-trust-app-server-config
May 25, 2026
Merged

TUI config cleanup: trusted projects#24255
etraut-openai merged 2 commits into
mainfrom
etraut/tui-trust-app-server-config

Conversation

@etraut-openai

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

Copy link
Copy Markdown
Collaborator

Why

TUI onboarding trusted-project persistence should go through the same app-server config write path as other config mutations. Writing config.toml directly from the trust widget bypasses that layer and can let onboarding proceed even when the trust decision was not actually persisted.

What changed

  • Added a TUI config helper that writes the existing project trust structure through config/batchWrite.
  • Persists trust decisions as projects.<project>.trust_level = "trusted" using the existing project trust key helper.
  • Changed the trust directory widget to only record the user selection; onboarding performs the app-server write before reporting success.
  • Keeps the user on the trust screen and shows an error if app-server persistence fails.

Verification

  • cargo test -p codex-tui --lib trust_persistence_failure_keeps_trust_step_in_progress
  • cargo test -p codex-tui --lib trusted_project_edit_targets_project_trust_level
  • Manual: built the local codex-cli, accepted the trust prompt in a temp project, confirmed projects.<project>.trust_level = "trusted", and simulated an unwritable config to verify onboarding stays on the trust screen without writing trust.

@etraut-openai etraut-openai force-pushed the etraut/tui-trust-app-server-config branch from 28ac7ec to f7b2407 Compare May 23, 2026 18:38
@etraut-openai etraut-openai changed the title Route TUI trust persistence through app server TUI config cleanup: trusted projects May 24, 2026

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Smoke test pass and code looks good, approved.

@etraut-openai etraut-openai merged commit bb55736 into main May 25, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-trust-app-server-config branch May 25, 2026 16:54
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 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