feat(tui): add sortable resume picker with created/updated timestamp toggle#10752
feat(tui): add sortable resume picker with created/updated timestamp toggle#10752etraut-openai merged 5 commits intoopenai:mainfrom
Conversation
- Add Tab key to toggle between creation time and last updated sorting - Default to creation time (CreatedAt) instead of last updated (UpdatedAt) - Display current sort key in picker header - Add keyboard hint for toggle functionality
Add comprehensive documentation for the resume picker's core mechanisms: - Module-level overview explaining table display, sort toggling, and pagination - Document the two-layer filtering approach (backend + picker) - Explain toggle_sort_key's full reload behavior - Add helper function and struct documentation for column metrics This is a documentation-only change with no functional modifications.
There was a problem hiding this comment.
Pull request overview
This PR adds sortable resume picker functionality with a toggle between creation time and last-updated time sorting. The feature allows users to press Tab to switch between sort modes, displays the current sort mode in the header, and intelligently hides the secondary timestamp column when the terminal is narrow.
Changes:
- Added
sort_keyfield to track current sort order (defaults toCreatedAt) - Added Tab key handler to toggle between
CreatedAtandUpdatedAtsorting - Modified UI to show both "Created at" and "Updated at" columns (hiding one on narrow terminals)
- Updated page load requests to pass the current sort key to the backend
- Added comprehensive unit tests and integration tests
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| codex-rs/tui/src/resume_picker.rs | Main implementation: added sort_key state field, Tab key handler, column visibility logic, and helper functions for sorting and display |
| codex-rs/tui/src/snapshots/codex_tui__resume_picker__tests__resume_picker_screen.snap | Updated snapshot to reflect new header format with sort indicator and new column layout |
| codex-rs/tui/src/snapshots/codex_tui__resume_picker__tests__resume_picker_table.snap | Updated snapshot showing both created/updated columns in table view |
| codex-rs/tui/src/snapshots/codex_tui__resume_picker__tests__resume_picker_thread_names.snap | Updated snapshot showing new column headers for named threads |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3aa9323 to
4e35b94
Compare
Display both "Created at" and "Updated at" columns in the resume picker, improving visibility of session history. When terminal width is limited, intelligently hide the inactive timestamp column (whichever doesn't match the current sort key) to preserve space for the conversation preview. Changes: - Add Created at column alongside Updated at - Implement ColumnVisibility logic to show/hide columns based on width - Update column labels from "Creation"/"Last updated" to "Created at"/"Updated at" - Add format_created_label() helper function - Add column_visibility_hides_extra_date_column_when_narrow() test - Update snapshots to reflect new column layout The picker now shows maximum information when space allows, while gracefully degrading to a single timestamp column on narrow terminals.
4e35b94 to
25b77c6
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25b77c6087
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ 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". |
Summary
Changes
sort_keyfield toPickerStateto track current sort orderRolloutRecorder::list_threads()for proper backend sortingCreatedAtandUpdatedAtsortingTest plan