Keep "? help" on the top bar while the shortcut bar is hidden - #533
Merged
Merged
Conversation
Pressing ? hid every shortcut, including the one that brings them back, and the choice survives a restart, so it was easy to end up with no way of knowing how to get help again. While help is hidden the top rule now opens with "? help". It takes no rows, so hiding help still gives the screen back, and it is left out when the terminal is too narrow to fit it beside HEY.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The hint remains visible during an error dialog, when its shortcut cannot be used.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR keeps the shortcut to restore hidden help visible in the TUI without giving up the screen space gained by hiding the shortcut bar.
Changes:
- Adds
? helpto the top rule when help is hidden and there is room. - Adds layout and toggle tests, and updates the TUI guide.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| internal/tui/tui_test.go | Tests the hint, centering, and narrow layouts. |
| internal/tui/nav.go | Renders the hint on the top rule. |
| docs/tui.md | Explains how to restore hidden help. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
An error box takes every key until it is dismissed, so ? did nothing while the header still offered it. canToggleHelp now says no while an error is showing, which keeps the hint and the key in step.
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.

Pressing
?hid every shortcut, including the?that brings them back. The choice is saved across restarts, so it was easy to end up with a clean screen and no hint of how to get help again.While help is hidden, the top rule now starts with
? help:It sits on a row that's already drawn, so hiding help still gives you back every row it did before. HEY stays centred, and on a terminal too narrow to fit the hint beside it, the hint is left out. I considered keeping one
? helpline in the bottom bar instead, but that brings back the divider and its spacing, about four rows, which undoes the point of hiding help.Basecamp card: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10357270119
Recorded against the local dev server. Each take opens the TUI, presses
?, quits, reopens (help is still hidden), and presses?again.Summary by cubic
Keeps
? helpvisible on the top bar while the shortcut bar is hidden, so users always have a way to bring help back.Bug Fixes
?previously hid every shortcut, including?itself, and the choice survived restarts, leaving no hint of how to get help again.Written for commit 6b5e6db. Summary will update on new commits.