Skip to content

Conversation

@clcollins
Copy link
Owner

Summary

  • Long lines in the incident view now wrap to fit within the viewport width instead of extending off the right edge of the screen
  • The glamour markdown renderer adds its own internal padding/margins, so the width is adjusted to account for this to ensure proper wrapping

Changes

  • Modified renderIncidentMarkdown to accept a width parameter (pkg/tui/views.go:497)
  • Pass viewport width from renderIncident to glamour renderer (pkg/tui/commands.go:218)
  • Calculate adjusted width by subtracting 4 characters to account for glamour's internal padding (pkg/tui/views.go:500)
  • Added minimum width safeguard of 40 characters to prevent issues with very narrow viewports (pkg/tui/views.go:501-503)
  • Configure glamour with WithWordWrap(adjustedWidth) instead of WithWordWrap(0) (pkg/tui/views.go:507)

Test plan

  • Run the application and view incidents with long lines
  • Verify text wraps appropriately within the viewport
  • Verify no horizontal scrolling is required
  • Test with various terminal widths

🤖 Generated with Claude Code

Long lines in the incident view now wrap to fit within the viewport
width instead of extending off the right edge of the screen.

Changes:
- Modified renderIncidentMarkdown to accept a width parameter
- Pass viewport width from renderIncident to glamour renderer
- Configure glamour with adjusted width to account for internal padding
- Added minimum width safeguard (40 characters)

The glamour markdown renderer adds its own internal padding/margins,
so we subtract 4 characters from the viewport width to ensure content
wraps properly without extending beyond the viewport boundaries.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@clcollins clcollins merged commit b198ba7 into main Nov 20, 2025
2 checks passed
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.

2 participants