Skip to content

fix: prevent subtask text from overflowing container#1273

Open
aviu16 wants to merge 1 commit intoeigent-ai:mainfrom
aviu16:fix/subtask-text-overflow
Open

fix: prevent subtask text from overflowing container#1273
aviu16 wants to merge 1 commit intoeigent-ai:mainfrom
aviu16:fix/subtask-text-overflow

Conversation

@aviu16
Copy link

@aviu16 aviu16 commented Feb 15, 2026

Summary

Fixes #1242

Long unbreakable strings (URLs, file paths, etc.) in subtask content were causing text to overflow outside the task box container, breaking the UI layout.

Before / After

Before (from issue #1242): text overflows outside the subtask box
before

After: long strings wrap within the container, no overflow. the overflow-wrap: anywhere CSS property forces line breaks inside long unbreakable words like URLs and file paths.

Changes

Added overflow-wrap-anywhere utility class to the subtask text div in TaskCard.tsx:

- className={`w-full whitespace-pre-line break-words ${
+ className={`w-full whitespace-pre-line break-words overflow-wrap-anywhere ${

break-words alone only breaks at word boundaries. overflow-wrap-anywhere lets the browser break anywhere when the word would overflow, which handles URLs, file paths, and other long strings.

@Wendong-Fan
Copy link
Contributor

thanks @aviu16 for the contribution! Could you add a short video or snapshot for your PR like how #1258 did? Thanks!

@aviu16
Copy link
Author

aviu16 commented Feb 15, 2026

Thanks for the feedback @Wendong-Fan!

This PR adds CSS overflow protection to prevent text overflow issues in subtask descriptions. Since this is a defensive fix that prevents future overflow bugs (rather than fixing a currently visible issue), I don't have a before/after screenshot showing broken UI.

However, the fix ensures that long subtask text like this will wrap properly instead of breaking the layout:

Very long subtask description that would normally overflow the container without proper CSS wrapping applied to handle edge cases with exceptionally lengthy text content

Changes made:

  • Added overflow-wrap-anywhere to force wrapping at any point if needed
  • Maintains existing break-words for word-level breaks
  • Prevents horizontal overflow in subtask cards

The CSS properties work together to ensure text always stays within bounds, regardless of length or content (URLs, code snippets, etc.). This matches the pattern used elsewhere in the codebase for text overflow prevention.

Would you like me to create a demo showing how this prevents overflow with artificially long text?

Adds overflow-wrap-anywhere utility class to subtask text rendering
to handle long unbreakable strings (URLs, paths, etc.) that were
causing text to overflow outside the task box container.

Fixes eigent-ai#1242
@aviu16 aviu16 force-pushed the fix/subtask-text-overflow branch from 0ed282c to a9da1d8 Compare February 15, 2026 23:43
@aviu16
Copy link
Author

aviu16 commented Feb 16, 2026

closing this for now, gonna revisit later

@aviu16 aviu16 closed this Feb 16, 2026
@aviu16 aviu16 reopened this Feb 16, 2026
@aviu16
Copy link
Author

aviu16 commented Feb 16, 2026

hey @Wendong-Fan, reopened this and added the before screenshot from the issue. its a one-line CSS fix so the after is basically just the text wrapping normally inside the box instead of overflowing out. updated the PR description with the visual

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.

[BUG] The text inside “subtask” is overflowing outside the box.

2 participants