-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Open
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestNew feature or request
Description
I have a working implementation ready that modifies app_backtrack.rs in both codex-tui and codex-tui2.
Currently, the backtrack feature (Esc → Esc → Enter) only rolls back the conversation history but does not revert file changes made by the agent. This means users have to manually undo file modifications after backtracking, which breaks the workflow.
I propose adding a new keybinding Ctrl+Enter in backtrack preview mode that:
- Rolls back the conversation history (existing behavior)
- Also reverts file changes by triggering
Op::Undo(using the existing ghost commit/undo infrastructure)
This gives users two options when backtracking:
Enter- Rollback conversation only (keep file changes)Ctrl+Enter- Rollback conversation AND revert file changes
This feature leverages the existing undo feature (ghost commits) that's already implemented in codex-core, making the implementation minimal and non-invasive.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestNew feature or request