Commit Graph

15744 Commits

Author SHA1 Message Date
Michael Bolin
3d553d768b merge commit for archive created by Sapling 2026-05-14 23:56:09 -07:00
Michael Bolin
b73497072c app-server: stop returning thread permission profiles 2026-05-14 23:55:48 -07:00
Michael Bolin
1aeac9cee3 telemetry: tag sandboxes from permission profiles 2026-05-14 23:55:48 -07:00
Michael Bolin
b51004878c context: remove legacy permissions instructions helper 2026-05-14 23:55:48 -07:00
Michael Bolin
719879a8f9 guardian: use permission profile for review sandbox 2026-05-14 23:55:48 -07:00
Michael Bolin
48218c3f9c Merge 6dcb834fd5 into sapling-pr-archive-bolinfest 2026-05-14 23:53:01 -07:00
Michael Bolin
6dcb834fd5 app-server: stop returning thread permission profiles 2026-05-14 23:52:50 -07:00
Michael Bolin
f74b0e3378 Merge 8e7e4c06bf into sapling-pr-archive-bolinfest 2026-05-14 23:51:01 -07:00
Michael Bolin
8e7e4c06bf app-server: stop returning thread permission profiles 2026-05-14 23:50:19 -07:00
Michael Bolin
1ea78ab0b8 telemetry: tag sandboxes from permission profiles 2026-05-14 23:50:10 -07:00
Michael Bolin
9c42aa0c6e context: remove legacy permissions instructions helper 2026-05-14 23:50:10 -07:00
Michael Bolin
76f8e0136b guardian: use permission profile for review sandbox 2026-05-14 23:50:09 -07:00
Michael Bolin
8adb6032cc 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
2026-05-14 23:10:45 -07:00
Michael Bolin
d1b912cb18 Merge 8f872c042a into sapling-pr-archive-bolinfest 2026-05-14 23:00:41 -07:00
Michael Bolin
8f872c042a tui/exec: show effective workspace roots in summaries 2026-05-14 23:00:23 -07:00
Michael Bolin
8a5306ff88 app-server: use permission ids and runtime workspace roots (#22611)
## Why

This PR builds on [#22610](https://github.com/openai/codex/pull/22610)
and is the app-server side of the migration from mutable per-turn
`SandboxPolicy` replacement toward selecting immutable permission
profiles by id plus mutable runtime workspace roots.

Once permission profiles can carry their own immutable
`workspace_roots`, app-server no longer needs to mutate the selected
`PermissionProfile` just to represent thread-specific filesystem
context. The mutable part now lives on the thread as explicit
`runtimeWorkspaceRoots`, while `:workspace_roots` remains symbolic until
the sandbox is realized for a turn.

## What Changed

- Replaced the v2 permission-selection wrapper surface with plain
profile ids for `thread/start`, `thread/resume`, `thread/fork`, and
`turn/start`.
- Removed the API surface for profile modifications
(`PermissionProfileSelectionParams`,
`PermissionProfileModificationParams`,
`ActivePermissionProfileModification`).
- Added experimental `runtimeWorkspaceRoots` fields to the thread
lifecycle and turn-start APIs.
- Threaded runtime workspace roots through core session/thread
snapshots, turn overrides, app-server request handling, and command
execution permission resolution.
- Kept session permission state symbolic so later runtime root updates
and cwd-only implicit-root retargeting rebind `:workspace_roots`
correctly.
- Updated the embedded clients just enough to send and restore the new
thread state.
- Refreshed the generated schema/TypeScript artifacts and the app-server
README to match the new contract.

## Verification

Targeted coverage for this layer lives in:

- `codex-rs/app-server-protocol/src/protocol/v2/tests.rs`
- `codex-rs/app-server/tests/suite/v2/thread_start.rs`
- `codex-rs/app-server/tests/suite/v2/thread_resume.rs`
- `codex-rs/app-server/tests/suite/v2/turn_start.rs`
- `codex-rs/core/src/session/tests.rs`

The key regression checks exercise that:

- `runtimeWorkspaceRoots` resolve against the effective cwd on thread
start.
- Profile-declared workspace roots are excluded from the runtime
workspace roots returned by app-server.
- A turn-level runtime workspace-root update persists onto the thread
and is returned by `thread/resume`.
- A named permission profile selected on one turn remains symbolic so a
later runtime-root-only turn update changes the actual sandbox writes.
- A cwd-only turn update retargets the implicit runtime cwd root while
preserving additional runtime roots.
- The protocol fixtures and generated client artifacts stay in sync with
the string-based permission selection contract.











---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/22611).
* #22612
* __->__ #22611
2026-05-14 23:00:05 -07:00
Michael Bolin
d444c2a093 merge commit for archive created by Sapling 2026-05-14 21:24:08 -07:00
Michael Bolin
f2007663ff tui/exec: show effective workspace roots in summaries 2026-05-14 21:23:21 -07:00
Michael Bolin
1f1cffb1d4 app-server: use permission ids and runtime workspace roots 2026-05-14 21:23:21 -07:00
Eric Traut
e6a7368810 TUI: split history cells into focused modules (#22704)
## Why

`codex-rs/tui/src/history_cell.rs` had become the dumping ground for
transcript rendering: the shared trait, common helpers, and the concrete
cells for messages, plans, MCP/search, notices, patches, approvals,
session chrome, and separators all lived together. That made small
transcript changes require reopening a very large file and made
ownership less obvious.

## What changed

- Replaced the monolithic `history_cell.rs` with a `history_cell/`
module tree organized by concern.
- Kept the existing `crate::history_cell::*` surface stable through
re-exports in `history_cell/mod.rs`.
- Moved the existing render coverage into `history_cell/tests.rs`.

## Reviewer notes

- This PR is intentionally mechanical in mature — existing code and
tests moving into files that match their concern.
- The snapshot files under `codex-rs/tui/src/history_cell/snapshots/`
moved with the extracted test module. `insta` resolves these unnamed
snapshots relative to the source file that declares them, so this is
path churn only; snapshot contents were not updated.
- The small non-mechanical seam edits are limited to split fallout:
sibling-module visibility for shared cell containers, moving
approval-specific exec-snippet helpers beside approvals, fixing the
separator module path, and keeping a couple of existing test helpers
reachable after extraction.
2026-05-14 21:19:06 -07:00
Michael Bolin
d7e0135030 merge commit for archive created by Sapling 2026-05-14 21:14:27 -07:00
Michael Bolin
459198c2b4 tui/exec: show effective workspace roots in summaries 2026-05-14 21:14:17 -07:00
Michael Bolin
e4b24d987d app-server: use permission ids and runtime workspace roots 2026-05-14 21:14:17 -07:00
Michael Bolin
57e56fab6f merge commit for archive created by Sapling 2026-05-14 21:08:41 -07:00
Michael Bolin
b2d2a837fd tui/exec: show effective workspace roots in summaries 2026-05-14 21:08:33 -07:00
Michael Bolin
2391b44b3d app-server: use permission ids and runtime workspace roots 2026-05-14 21:08:33 -07:00
Michael Bolin
397c7ee4d8 merge commit for archive created by Sapling 2026-05-14 20:57:53 -07:00
Michael Bolin
25fb4bea5a tui/exec: show effective workspace roots in summaries 2026-05-14 20:57:42 -07:00
Michael Bolin
3d2cc251b2 app-server: use permission ids and runtime workspace roots 2026-05-14 20:57:42 -07:00
Eric Traut
d1235a0a78 Prevent Esc from dismissing or rewinding /side (#22710)
Addresses #22599

## Why
`/side` currently lets `Esc` return to the parent thread. Multiple users
reported that this collides with queued-steer UI that also advertises
`Esc`, so a timing-sensitive keypress can dismiss an ephemeral side chat
instead of sending the queued prompt.

After removing that dismissal shortcut, the same `Esc` path could fall
through to main-thread backtrack/edit-previous handling, which is not
valid for ephemeral side conversations. This keeps `/side` out of both
global `Esc` behaviors.

## What changed
- Remove `Esc` from the `/side` return shortcut matcher while keeping
the existing `Ctrl+C` and `Ctrl+D` behavior.
- Update side-conversation hints and blocked-command copy to advertise
`Ctrl+C` as the return shortcut.
- Rename the reserved `Esc` keymap label to describe backtracking only.
- Block backtrack/edit-previous handling while a side conversation is
active and report `Editing previous prompts is unavailable in side
conversations.` when that path would have fired.
- Keep composer-owned `Esc` behavior, such as Vim insert-mode escape,
routed locally.
- Refresh focused shortcut assertions and TUI snapshots for the updated
footer and new side-conversation error message.

## Verification
Manually tested `/side` use cases and `Esc`, `Ctrl+C`, `Ctrl+D`.
2026-05-14 20:51:08 -07:00
Michael Bolin
4b6dcdecc1 merge commit for archive created by Sapling 2026-05-14 20:46:37 -07:00
Michael Bolin
ea052f458d tui/exec: show effective workspace roots in summaries 2026-05-14 20:46:23 -07:00
Michael Bolin
98c9b9914b app-server: use permission ids and runtime workspace roots 2026-05-14 20:46:23 -07:00
Michael Bolin
1a80f332b2 merge commit for archive created by Sapling 2026-05-14 20:34:20 -07:00
Michael Bolin
e87d7c6e0c tui/exec: show effective workspace roots in summaries 2026-05-14 20:34:05 -07:00
Michael Bolin
7bdbbd80b1 app-server: use permission ids and runtime workspace roots 2026-05-14 20:34:05 -07:00
Michael Bolin
7dc538b407 merge commit for archive created by Sapling 2026-05-14 20:21:02 -07:00
Michael Bolin
b4e18af8be tui/exec: show effective workspace roots in summaries 2026-05-14 20:20:38 -07:00
Michael Bolin
fd1cc16bc5 app-server: use permission ids and runtime workspace roots 2026-05-14 20:20:31 -07:00
Michael Bolin
b3ecb3d9f6 Merge 4be47409e4 into sapling-pr-archive-bolinfest 2026-05-14 20:07:42 -07:00
Michael Bolin
4be47409e4 tui/exec: show effective workspace roots in summaries 2026-05-14 20:07:35 -07:00
Michael Bolin
49e6f6187a app-server: use permission ids and runtime workspace roots 2026-05-14 20:07:35 -07:00
Michael Bolin
25e75a4ed0 Merge 92b9e73f80 into sapling-pr-archive-bolinfest 2026-05-14 19:55:04 -07:00
Michael Bolin
92b9e73f80 tui/exec: show effective workspace roots in summaries 2026-05-14 19:51:29 -07:00
Michael Bolin
bc34cfa2c8 app-server: use permission ids and runtime workspace roots 2026-05-14 19:51:29 -07:00
Michael Bolin
94446fb2cd merge commit for archive created by Sapling 2026-05-14 19:44:00 -07:00
Michael Bolin
7d2eb93419 tui/exec: show effective workspace roots in summaries 2026-05-14 19:43:51 -07:00
Michael Bolin
1d605444d3 app-server: use permission ids and runtime workspace roots 2026-05-14 19:43:51 -07:00
Michael Bolin
0c6de5c438 merge commit for archive created by Sapling 2026-05-14 19:34:51 -07:00
Michael Bolin
1b90490673 tui/exec: show effective workspace roots in summaries 2026-05-14 19:34:40 -07:00