Skip to content

Conversation

@danielsanchezaran
Copy link

@danielsanchezaran danielsanchezaran commented Oct 21, 2025

Summary

This PR adds an optional preview pane feature that displays the full command of the currently selected history entry, solving the issue where long commands are truncated in the table view.

Example:

image

Disclaimer

I have little Go experience, and this feature was developed with AI assistance. I welcome any feedback on code style, best practices, or improvements to the implementation.

Features

  • Toggle preview pane with Ctrl+O keybinding
  • Preview pane displays below the results table
  • Long commands automatically wrap for full visibility
  • Persistent setting via config (show-preview-pane)
  • New CLI commands: hishtory config-set/config-get show-preview-pane

Implementation

  • Added ShowPreviewPane field to ClientConfig
  • Added TogglePreviewPane keybinding (Ctrl+O by default)
  • Added renderPreviewPane() and wrapText() helper functions
  • Table height dynamically adjusts when preview is enabled
  • Added config-set/config-get commands for the setting
  • Added integration test for the feature

Testing

  • Manually tested the feature extensively
  • Added integration test testTui_previewPane
  • Feature is disabled by default, so existing behavior is unchanged

Screenshots

The preview pane displays below the table showing the full command without truncation.

This adds an optional preview pane that displays the full command
of the currently selected history entry, solving the issue where
long commands are truncated in the table view.

Features:
- Toggle preview pane with Ctrl+O keybinding
- Preview pane displays below the results table
- Long commands automatically wrap for full visibility
- Persistent setting via config (show-preview-pane)
- New CLI commands for configuration

Implementation:
- Added ShowPreviewPane field to ClientConfig
- Added TogglePreviewPane keybinding (Ctrl+O by default)
- Added renderPreviewPane() and wrapText() helper functions
- Table height dynamically adjusts when preview is enabled
- Added config-set/config-get commands for show-preview-pane

Signed-off-by: Daniel <danielsanchezaran@gmail.com>
Signed-off-by: Daniel <danielsanchezaran@gmail.com>
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.

1 participant