Skip to content

Conversation

@joshka-oai
Copy link
Collaborator

Motivation

  • Ensure the resume picker shows a one-line filter hint when not run with --all so users see that results are filtered and how to show all sessions.
  • Normalize and surface the current working directory used in the hint so the path display is consistent between tui and tui2.
  • Reserve layout space for the extra hint row so previews, pagination, and hint rows do not overlap.
  • Add snapshot coverage for the filtered (non---all) rendering to prevent regressions.

Description

  • Add a display_cwd: Option<PathBuf> field to PickerState and pass std::env::current_dir() into PickerState::new via the run_resume_picker callers.
  • Implement render_filter_hint_line (shared pattern in both tui and tui2) to render the one-line filter/--all hint using display_cwd and existing styling.
  • Adjust layout constraints in draw_picker to add a Constraint::Length(1) for the new hint row and subtract the extra row from the list height calculations.
  • Add new snapshot tests and snapshot files resume_picker_screen_filtered for both tui and tui2 to exercise the filtered hint rendering.

Testing

  • Ran just fmt and it completed successfully.
  • Ran just fix -p codex-tui and just fix -p codex-tui2 (Clippy autofixes) and they completed successfully.
  • Ran cargo test -p codex-tui and cargo test -p codex-tui2 and all tests passed after updating/adding the new snapshots.
  • Committed the new snapshot files for the filtered resume picker screens so CI will exercise them going forward.

Codex Task

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e775b31d37

ℹ️ 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".

@joshka-oai
Copy link
Collaborator Author

image

When std::env::current_dir() fails, disable CWD filtering and render a hint
that filtering is unavailable instead of implying an "unknown" filter.
Also treat the view as unfiltered for column layout and add snapshot
coverage.

Rename show_all to show_all_flag to clarify it reflects the --all flag.
Insta expects OS-specific snapshots to be named `@windows.snap`; rename the resume picker snapshots accordingly so Windows CI finds them.
@joshka-oai joshka-oai force-pushed the codex/add-user-message-on-resume-screen branch from 8b9b558 to 083bbbc Compare January 4, 2026 23:29
@nornagon-openai
Copy link
Collaborator

I think the --all hint is worse than having a keyboard shortcut that toggles the filter

@joshka-oai
Copy link
Collaborator Author

I think the --all hint is worse than having a keyboard shortcut that toggles the filter

I agree - this is a small stop gap solution until we change that.
I didn't have a huge amount of time to test / dig into a more detailed behavior fix like that, so figured a messaging change was the simplest thing to help reduce the confusion about this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants