feat: add column headers, exit code and directory to history browser#47
Merged
feat: add column headers, exit code and directory to history browser#47
Conversation
Add a column header row and two new columns to the history browser: - Exit code: right-aligned, shown in red for non-zero values - Directory (CWD): displayed between command and hostname The layout calculation now distributes available width across command, directory (~1/6 of screen), and hostname (~1/8 of screen) columns. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Address review findings from roborev job 57: - Remove intermediate base_part string that mixed ANSI-styled and plain text; print each styled segment directly instead - Simplify padding calculation by using known column widths (cmd_width, cwd_width) instead of calling display_width on each padded string - Add unit tests for calculate_layout at 50, 80, 120, and 200 columns Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add total width invariant checks for wide (200) and narrow (50) terminal tests, matching the pattern used in 80 and 120 column tests. Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Display only the directory basename instead of the full path, making the CWD column much more readable in limited width - Apply the same horizontal scroll animation to the CWD column when the cursor is on a row with a long directory name Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add unit test verifying CWD basename extraction for common cases (normal paths, root, empty, dotdot). Apply rustfmt formatting fixes. Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 tasks
eitsupi
added a commit
that referenced
this pull request
Feb 4, 2026
- Re-add empty [Unreleased] section for Keep a Changelog compliance - Fix inaccurate description of #47: column headers with exit code and working directory columns, not "index" Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
Summary
Test plan
cargo test)calculate_layoutfor 50/80/120/200 column widthscargo clippycleancargo fmtclean🤖 Generated with Claude Code