Skip to content

feat(last): open the newest reply without the picker - #74

Merged
backnotprop merged 2 commits into
plannotator:mainfrom
mshddev:feat/herdr-last-newest
Sep 16, 2026
Merged

backnotprop merged 2 commits into
plannotator:mainfrom
mshddev:feat/herdr-last-newest

Conversation

@mshddev

@mshddev mshddev commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Why?

prefix+shift+o always 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 --newest and last --newest open the newest reply straight away.
  • The launcher passes it to the pane as PLANNOTATOR_TUI_NEWEST=1, next to the other PLANNOTATOR_TUI_* values.
  • open_message skips Mode::Pick but keeps every candidate, so p still opens the picker.
  • herdr open rejects --newest, since it has no picker to skip.
  • USAGE, README and docs/spec-last-message.md cover the flag.

Opt-in only. Without --newest, herdr last and last behave exactly as before.

Not included

Herdr Annotate's annotate.last still runs herdr last without 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_p
  • newest_reaches_the_pane_only_when_last_was_asked_for_it
  • only_an_exact_newest_flag_skips_the_picker

The first also presses p, j, Esc and checks it lands back on the newest, because here the picker was never shown before p.

On macOS with Rust 1.98.1, cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and python3 herdr/test-manifest.py are clean, and cargo test --workspace passes 235 tests. I also tried it in a live Herdr session.

`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
mshddev marked this pull request as draft September 16, 2026 15:03
@backnotprop
backnotprop marked this pull request as ready for review September 16, 2026 15:59
@backnotprop
backnotprop added this pull request to the merge queue Sep 16, 2026
Merged via the queue into plannotator:main with commit 60aa488 Sep 16, 2026
2 of 4 checks passed
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