feat(last): open the newest reply without the picker - #74
Merged
Merged
Conversation
`herdr last --newest` and `last --newest` open the agent's newest reply straight away. The launcher passes PLANNOTATOR_TUI_NEWEST=1 to the pane, which reads it as the flag. All candidates are kept, so `p` opens the picker on them exactly as escaping it would have. `herdr open` has no picker to skip and rejects the flag. Without it nothing changes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mshddev
marked this pull request as draft
September 16, 2026 15:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
prefix+shift+oalways stops on the picker. The newest reply is already highlighted and open behind it, so I press Enter or Esc on every review just to get to it.What changed
herdr last --newestandlast --newestopen the newest reply straight away.PLANNOTATOR_TUI_NEWEST=1, next to the otherPLANNOTATOR_TUI_*values.open_messageskipsMode::Pickbut keeps every candidate, sopstill opens the picker.herdr openrejects--newest, since it has no picker to skip.docs/spec-last-message.mdcover the flag.Opt-in only. Without
--newest,herdr lastandlastbehave exactly as before.Not included
Herdr Annotate's
annotate.laststill runsherdr lastwithout the flag, so the key doesn't change yet. That needs a second action there, which I can send once this lands. If you'd rather have a config setting, the existing key would pick it up with no new action. Say so and I'll switch it.Tests
One per invariant, next to the existing ones:
newest_opens_the_newest_reply_and_leaves_the_picker_on_pnewest_reaches_the_pane_only_when_last_was_asked_for_itonly_an_exact_newest_flag_skips_the_pickerThe first also presses
p,j, Esc and checks it lands back on the newest, because here the picker was never shown beforep.On macOS with Rust 1.98.1,
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandpython3 herdr/test-manifest.pyare clean, andcargo test --workspacepasses 235 tests. I also tried it in a live Herdr session.