Repository navigation
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks for the contribution, and apologies for the slow response. We had a big PR backlog, and it's taking us a while to get through them all. I checked out your PR (after merging the latest changes from main) and compiled it locally. It doesn't appear to fix the bug. When I press If you still want to pursue this PR, please review it and revise as necessary. If you'd prefer not to pursue it, please close so we can have someone else work on a fix for this bug. |
|
Hi, thanks for taking a look at this. I just tested it locally and it is working correctly for me, so I'm not sure why it doesn't seem to be working on yours? I made sure I was using the latest remote branch then ran |
|
I tried it again, and it works. Must have been user error on my part the first time I tried it. |
|
No worries, thanks again for looking through the PR. |
Fixes openai#4722 Supersedes openai#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
Fixes openai#4722 Supersedes openai#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
Fixes openai#4722 Supersedes openai#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
Fixes openai/codex#4722 Supersedes openai/codex#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
Fixes openai#4722 Supersedes openai#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
Fixes openai/codex#4722 Supersedes openai/codex#5058 Ideally we'd have a clearer way of separating history per-session than by detecting a specific history cell type, but this is a fairly minimal fix for now.
This PR addresses #4722.
Summary
Pressing Esc to navigate back through previous messages would stop at the first
/statusoutput. Messages sent before/statusbecame unreachable. This happened because/statusoutput is represented as aCompositeHistoryCell, and the backtrack logic treated all composites as headers.This PR introduces a clear distinction between header composites (true session starts) and general composites (like
/status), then updates navigation to skip only real headers.Root Cause
The backtrack function skipped everything before the last composite in the transcript, assuming all composites were headers. Because
/statusalso created a composite, it was mistakenly treated as a boundary, preventing access to earlier user messages.Fix Overview
CompositeHistoryCellKindenum (HeadervsGeneral) stored insideCompositeHistoryCell.new_header()andis_header()helpers to mark and identify true headers.new_header(...)./status.Files Changed
tui/src/history_cell.rsCompositeHistoryCellKindflag and helper methods.Header.tui/src/app_backtrack.rsTests
user_positions_skip_only_leading_composites– ensures/statusno longer hides earlier user messages.user_positions_reset_after_empty_composite_boundary– ensures true session headers still reset navigation.All existing tests pass successfully.
Behavior Change
Before: backtracking stopped at
/status, hiding older messages.After: backtracking continues past
/status, stopping only at real session headers.