tui/exec: show effective workspace roots in summaries (#22612)

## Why

This PR builds on [#22611](https://github.com/openai/codex/pull/22611).

After `runtimeWorkspaceRoots` moved onto thread state, the user-facing
summaries were still inconsistent about which roots they showed. In
particular, `/status` and the exec startup summary could under-report
extra workspace roots from `--add-dir` or from profile-defined
`workspace_roots`, which made the new model look incorrect even when the
permissions themselves were right.

## What Changed

- switched the TUI status surfaces to summarize against
`Config::effective_workspace_roots()`
- updated the exec human-output summary to render from the effective
permission profile instead of the raw constrained profile
- added focused regressions for both the TUI and exec code paths so
extra workspace roots stay visible in user-facing summaries

## Verification

Targeted coverage for this follow-up lives in:
- `codex-rs/tui/src/status/tests.rs`
- `codex-rs/exec/src/event_processor_with_human_output_tests.rs`

The added regressions verify that:
- status output includes profile-defined workspace roots in the
effective permissions summary
- exec startup output includes runtime workspace roots instead of
collapsing back to `cwd` only
This commit is contained in:
Michael Bolin authored and GitHub committed 2026-05-14 23:10:45 -07:00
1 parent 8a5306ff88
commit 8adb6032cc
5 files changed
+120 -11

No files matched your search

@@ -420,6 +420,7 @@ fn config_summary_entries(
config: &Config,
session_configured_event: &SessionConfiguredEvent,
) -> Vec<(&'static str, String)> {
let permission_profile = config.permissions.effective_permission_profile();
let mut entries = vec![
("workdir", config.cwd.display().to_string()),
("model", session_configured_event.model.clone()),
@@ -434,9 +435,9 @@ fn config_summary_entries(
(
"sandbox",
summarize_permission_profile(
&config.permissions.effective_permission_profile(),
&permission_profile,
&config.cwd,
config.permissions.user_visible_workspace_roots(),
config.effective_workspace_roots().as_slice(),
),
),
];