Skip to content

Add quit_if_one_screen for dynamic paging with explicit end-of-output signalling#1

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/enable-auto-quit-dynamic-paging
Open

Add quit_if_one_screen for dynamic paging with explicit end-of-output signalling#1
Copilot wants to merge 3 commits into
mainfrom
copilot/enable-auto-quit-dynamic-paging

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 23, 2026

  • Understand the existing drop-based AliveGuard / CheckQuitIfOneScreen mechanism
  • Add Pager::end_of_output() method (gated on dynamic_output) that sends Command::CheckQuitIfOneScreen directly
  • Update set_quit_if_one_screen docs to describe both the explicit (end_of_output) and implicit (drop) signalling mechanisms
  • Add emit_events::set_quit_if_one_screen and emit_events::end_of_output unit tests
  • Fix clippy::format_collect lint in check_quit_if_one_screen_noop_when_overflow test (replace map(|i| format!(...)).collect::<String>() with fold + writeln!)
  • All tests pass, zero clippy warnings with --features=dynamic_output,search --tests --examples -- -D warnings

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: keith-hall <11882719+keith-hall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/forkeith/minus/sessions/4a0e60ce-db58-455e-b6b1-815f7f4b411b
Copilot AI changed the title Implementing auto-quit functionality for dynamic paging Add quit_if_one_screen for dynamic paging with explicit end-of-output signalling Mar 23, 2026
Copilot AI requested a review from keith-hall March 23, 2026 18:19
@keith-hall keith-hall marked this pull request as ready for review March 24, 2026 04:37
@keith-hall keith-hall closed this Mar 26, 2026
@keith-hall keith-hall reopened this Mar 26, 2026
@keith-hall
Copy link
Copy Markdown

@copilot I see some lint issues in CI, unrelated to our changes but might make the maintainers not be able to merge... Let's try fixing them.
You can see the failures by running

cargo clippy --features=dynamic_output,search --tests --examples -- -D warnings

Co-authored-by: keith-hall <11882719+keith-hall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/forkeith/minus/sessions/82e3065c-4b6e-4bcc-bce1-d43c6658b9da
Copy link
Copy Markdown
Author

Copilot AI commented Mar 26, 2026

@copilot I see some lint issues in CI, unrelated to our changes but might make the maintainers not be able to merge... Let's try fixing them.
You can see the failures by running
...

Fixed in 0f69549. The clippy::format_collect lint in check_quit_if_one_screen_noop_when_overflow was firing because (0..20).map(|i| format!("line {i}\n")).collect::<String>() builds a string via format-in-map; replaced with fold + writeln! as clippy suggests. cargo clippy --features=dynamic_output,search --tests --examples -- -D warnings now passes cleanly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants