Repository navigation
feat: give the commit message a bordered box that grows while writing - #1
Merged
Merged
Conversation
The box stays one line under the file list, bordered so it reads as a place to click. While writing, it takes the list's place, shows the subject's length, scrolls with the arrows and wheel, and Ctrl+E opens $EDITOR.
Merged
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.
This is the top layer of three and sits on the stage-all prompt layer. A long commit message, which Claude drafts often, was clamped to 8 rows showing only its tail. The subject scrolled out of view, and you couldn't scroll back to it. While unfocused, the message sat inline with no outline, so it didn't read as somewhere to click.
What changed
The commit message is now a bordered one-line box under the file list while unfocused, so it reads as a place to click. Its line shows the subject and
+N lines. While writing, the box takes the file list's place and shows the staged count and the subject length on its border (yellow past 50, red past 72). ↑ ↓, PgUp/PgDn and the wheel scroll it, typing jumps back to the cursor, and a new draft opens at the top.Ctrl+Eopens the message in$VISUAL/$EDITOR(falling back tovi).Evidence
Same scratch repo (one modified file, one untracked, nothing staged), same 47-column Rex pane, same 11-line message typed in. "Before" is
main, built in a separate worktree. The layers below don't change the box, apart from the hint text. These are realrex capturescreens; blank rows are trimmed.Writing a long message
Before: the subject is out of view and can't be scrolled back to.
After:
Unfocused
Before: the message stays inline as dimmed rows, with no outline.
After:
Also checked:
Ctrl+Ewith a stand-in$EDITORscript replaced the message, and the resulting commit had the editor's subject and body.Not checked:
rex send-keycan't send mouse events.rex send-keydidn't deliver it. I used Ctrl+J, which goes down the same path.cargo clippywarnings were there before this branch.cargo fmt --checkalready failed onmainbecause the repo uses wider lines, and I matched that style.Details
sh -c '$EDITOR "$1"', so values with arguments likecode -wwork. The message goes through a temp file that is deleted afterwards. On a non-zero exit, the message is left unchanged and the exit status is shown.Tab draftand^E editorfit in about 47 columns.ELI5
The box where you write the note for a save is now outlined so it's easy to spot. While you type, it grows big enough to show long notes, you can scroll through them, and you can open them in your own editor.