Skip to content

Revert the current thread when editing an earlier TUI prompt - #45845

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d3f0342539392bdbfec925d0c3d6f67369937f1b
Sep 16, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d3f0342539392bdbfec925d0c3d6f67369937f1b

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Revert the current thread when editing an earlier TUI prompt

What changed

Use thread/revert to remove the selected turn and subsequent history, then restore the selected prompt in the composer. Keep the thread identity, settings, goal, and unrelated thread channels intact. Show a notice that conversation history was reverted and file changes are unchanged.

Resolve selections against persisted history, accounting for partially loaded transcripts and hidden review prompts. Reject stale selections and mid-turn steers. Refresh replay state and pagination after a revert, clear queued input and obsolete actions, and require a session reload when the revert cannot be confirmed.

Testing

Add regression coverage for reverting earlier and first visible prompts in place, preserving unloaded history and thread state, rejecting steers in clipped history, and clearing streaming output, queued input, and stale approval actions.

## What changed

Use `thread/revert` to remove the selected turn and subsequent history, then restore the selected prompt in the composer. Keep the thread identity, settings, goal, and unrelated thread channels intact. Show a notice that conversation history was reverted and file changes are unchanged.

Resolve selections against persisted history, accounting for partially loaded transcripts and hidden review prompts. Reject stale selections and mid-turn steers. Refresh replay state and pagination after a revert, clear queued input and obsolete actions, and require a session reload when the revert cannot be confirmed.

## Testing

Add regression coverage for reverting earlier and first visible prompts in place, preserving unloaded history and thread state, rejecting steers in clipped history, and clearing streaming output, queued input, and stale approval actions.

GitOrigin-RevId: d3f0342539392bdbfec925d0c3d6f67369937f1b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/d3f0342539392bdbfec925d0c3d6f67369937f1b branch from 792307b to ffae979 Compare September 16, 2026 02:57
@copyberry
copyberry Bot merged commit ffae979 into main Sep 16, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/d3f0342539392bdbfec925d0c3d6f67369937f1b branch September 16, 2026 02:57
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 2026

This branch was successfully deployed

1 active deployment
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.

3 participants