Skip to content

Improve TUI and add ability to select and copy text - #12

Merged
kamilc merged 14 commits into
mainfrom
tui-selectable-log
Dec 27, 2025
Merged

Improve TUI and add ability to select and copy text#12
kamilc merged 14 commits into
mainfrom
tui-selectable-log

Conversation

@kamilc

@kamilc kamilc commented Dec 27, 2025

Copy link
Copy Markdown
Owner

Added SelectableLog widget that replaces RichLog with proper text selection, clipboard support, and vim-like search.

Changes:

  • Text selection via mouse drag in log and status panel
  • Right-click context menu with Copy
  • Ctrl+C / Cmd+C to copy selected text
  • Vim-style search (/, n, N) with match highlighting
  • Status panel values now copyable via right-click or keyboard

Resolves: #10

- Implements a RichLog replacement supporting mouse selection, Ctrl+A,
  and Ctrl+C to copy selected text to clipboard.
- Preserves ANSI color codes, strips control sequences, and trims buffer
  to max_lines.
- Adds Selection dataclass for text range representation.
- Includes integration and unit tests for SelectableLog behavior.
- Adds pyperclip as a dependency for clipboard support.
- Implement ContextMenu widget for right-click actions in TUI
- Add WidgetID constants for widget identifiers
- Integrate ContextMenu into widgets module
- Add integration tests and feature scenarios for context menu behavior
- Fix minor formatting in test and widget files
- Implement SearchInput widget for log searching
- Add search state, highlighting, and navigation to SelectableLog
- Support opening search with /, Ctrl+F, or context menu
- Highlight matches (current in orange, others in yellow)
- Enable navigation with n/N, F3/Shift+F3, and wrap-around
- Add integration and unit tests for search behavior
- Add layers to Screen in TUI_CSS
- Remove Ctrl+C binding and key handler from SelectableLog
- Change context menu mouse button from 3 to 2
Add LabeledValue widget for aligned label/value display and value
copying. Update CampersTUI to use LabeledValue for status panel fields.
Refactor widget updates to set the value property. Update tests for new
widget interface.
@kamilc
kamilc marked this pull request as ready for review December 27, 2025 12:07
@kamilc
kamilc merged commit 3de57b1 into main Dec 27, 2025
2 checks passed
@kamilc
kamilc deleted the tui-selectable-log branch December 27, 2025 16:29
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.

Handle terminal sequences in the TUI better - they can bork the Textual UI

1 participant