Skip to content

feat: Add mouse-based text selection in TUI logs#765

Merged
coffee-cup merged 4 commits intomasterfrom
jr/tui-text-selection
Jan 15, 2026
Merged

feat: Add mouse-based text selection in TUI logs#765
coffee-cup merged 4 commits intomasterfrom
jr/tui-text-selection

Conversation

@coffee-cup
Copy link
Copy Markdown
Contributor

Summary

Implement custom mouse-based text selection in the railway dev TUI with visual highlighting and auto-copy to clipboard.

Features

  • Click and drag to select log text with visual inverted highlight
  • Auto-copy selected text to clipboard on mouse release
  • Auto-follow mode when scrolling back to bottom while paused
  • Prevent screen flicker when scrolling down in follow mode
  • Full log buffer support (100k lines) for better selection and scroll experience

Testing

Run railway dev and test:

  • Click and drag to select text - verify highlight appears and copies to clipboard
  • Scroll with j/k and mouse wheel - verify no flicker in follow mode
  • Switch tabs and verify logs display correctly

Implement custom text selection with mouse drag support in the `railway dev` TUI:
- Click and drag to select log text with visual highlighting
- Auto-copy selected text to clipboard on mouse release
- Auto-follow when scrolling back to bottom while paused
- Prevent screen flicker when scrolling down in follow mode
- Restore log buffering for better selection and scroll support
@coffee-cup coffee-cup added the release/patch Author patch release label Jan 15, 2026
- Consolidate LogRef enum to log_store.rs (was duplicated)
- Add clipboard failure feedback to user
- Fix prefix color logic when selection spans across prefix
- Make convert_color private
- Add comment explaining .take(2) limit in info pane
- Add LogRef::parts() to reduce duplication in log extraction
- Only collect visible logs instead of all logs (skip/take)
- Simplify selection rendering with explicit span regions
- Fix magic number defaults for log area bounds
- Remove unused Selection::contains method
@coffee-cup coffee-cup merged commit 724ccf1 into master Jan 15, 2026
6 checks passed
@coffee-cup coffee-cup deleted the jr/tui-text-selection branch January 15, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Author patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant