Skip to content

Display qualifier key binding help in text style header#474

Open
bcc32 wants to merge 1 commit intoxenodium:mainfrom
bcc32:text-header-key-binding-help
Open

Display qualifier key binding help in text style header#474
bcc32 wants to merge 1 commit intoxenodium:mainfrom
bcc32:text-header-key-binding-help

Conversation

@bcc32
Copy link
Copy Markdown
Contributor

@bcc32 bcc32 commented Mar 27, 2026

Previously, the qualifier (e.g., "[1/5][Edit]") and key binding hints
(e.g., "C-c C-c Submit") were only rendered in graphical-style headers.
This meant that users with agent-shell-header-style set to 'text would
not see any key documentation in the header line.

Checklist

  • I agree to communicate (PR description and comments) with the author myself (not AI-generated).
  • I've reviewed all code in PR myself and will vouch for its quality.
  • I've read and followed the Contributing guidelines.
  • I've filed a feature request/discussion for a new feature.
  • I've added tests where applicable.
  • I've updated documentation where necessary.
  • I've run M-x checkdoc and M-x byte-compile-file.

Previously, the qualifier (e.g., "[1/5][Edit]") and key binding hints
(e.g., "C-c C-c Submit") were only rendered in graphical-style headers.
This meant that users with agent-shell-header-style set to 'text would
not see any key documentation in the header line.
@xenodium
Copy link
Copy Markdown
Owner

xenodium commented Mar 27, 2026

Thanks for the PR!

I'm a viewport and graphical header user myself. Been trialing the text header to see if I'd swap more permanently and also noticed it needs to catch up with graphical. Thanks for kicking this off.

AFAIK, the text header has a single-line rendering limitation, or do you have additional settings? In most instances, a large chunk of the single-line text header is likely going to be hidden unless the window is large enough. The proposal currently looks as follows for me:

header-text

I'm thinking we may need to get a little creative with the text header line to compact things in. Here are some ideas.

1. States

For example:

[2/2][View] Claude ➤ Default (recommended) ➤ Default @ project ➤ 23k/1m (2%) ➤ [?] Help

pressing [h] switches header to:

[2/2][View] Claude ➤ [n] Next [p] Previous [r] Reply [h] Next [h] Next

2. Transient

[2/2][View] Claude ➤ Default (recommended) ➤ Default @ project ➤ 23k/1m (2%) ➤ [?] Help

pressing [h] opens agent-shell-viewport-help-menu.

3. Split between header and mode line

See if we can potentially split information and render some of it in the header and remaining in mode line.

It's hard to tell which one of these would work out best in practice unless we try them out. I understand this may be more than you had originally signed up for in the PR, so I'm happy to play with the alternatives if you prefer to defer the work.

ps. Kinda glad you ran into this bug ;) It tells me there are folks out there using the viewport interaction. I have a feeling there are only a few of us.

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