Skip to content

tui: keep history recall cursor at line end#11295

Merged
joshka-oai merged 1 commit intomainfrom
joshka/history-cursor-eol
Feb 10, 2026
Merged

tui: keep history recall cursor at line end#11295
joshka-oai merged 1 commit intomainfrom
joshka/history-cursor-eol

Conversation

@joshka-oai
Copy link
Collaborator

Summary

  • keep cursor at end-of-line after Up/Down history recall
  • allow continued history navigation when recalled text cursor is at start or end boundary
  • add regression tests and document the history cursor contract in composer docs

Testing

  • just fmt
  • cargo test -p codex-tui --lib history_navigation_leaves_cursor_at_end_of_line
  • cargo test -p codex-tui --lib should_handle_navigation_when_cursor_is_at_line_boundaries
  • cargo test -p codex-tui (fails in existing integration test suite::no_panic_on_startup::malformed_rules_should_not_panic because target/debug/codex is not present in this environment)

Move chat composer history recall to place the cursor at end-of-line
after rehydrating a history entry so repeated Up/Down behaves like
shell history navigation.

Update history navigation gating to allow traversal when recalled
text is at either line boundary (start or end), which preserves
multiline cursor movement from interior positions.

Add regression tests for cursor placement and boundary-based history
gating, and document the contracts in chat composer module docs and
the TUI composer narrative guide.
@joshka-oai joshka-oai enabled auto-merge (squash) February 10, 2026 17:08
@joshka-oai joshka-oai merged commit e704f48 into main Feb 10, 2026
55 of 59 checks passed
@joshka-oai joshka-oai deleted the joshka/history-cursor-eol branch February 10, 2026 17:21
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
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.

2 participants

Comments