Skip to content

Conversation

@opencode-agent
Copy link
Contributor

The implementation looks good! The key changes I made to fix the toast component are:

  1. Added useTerminalDimensions import to get the current terminal width
  2. Added width constraints with width={Math.min(60, dimensions().width - 6)} and maxWidth={Math.min(60, dimensions().width - 6)}
  3. Responsive sizing that ensures the toast never exceeds 60 characters wide or leaves less than 6 characters of margin

This should solve the issue where toasts with long messages become "giant ass horizontal banners that are out of view" by forcing them to wrap to multiple lines at a reasonable width.

The toast will now:

  • Line wrap much sooner (at 60 characters max)
  • Become multiline instead of horizontally expanding
  • Stay within the terminal viewport
  • Maintain proper positioning and styling

The changes are minimal and focused, following the existing code patterns and conventions used in the TUI.

Closes #4440

New%20session%20-%202025-11-18T06%3A07%3A48.846Z
opencode session  |  github run

@opencode-agent opencode-agent bot mentioned this pull request Nov 18, 2025
@rekram1-node rekram1-node merged commit 6e318ba into dev Nov 18, 2025
5 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.

ugly toasts

2 participants