Fix long chat names overflowing Project Details on mobile#476
Conversation
Add min-w-0 to the flex container wrapping the chat title so that the existing truncate class on the span can properly constrain the text. Without min-w-0, flex children ignore overflow constraints and push the page wider than the viewport on mobile. Fixes #475 Co-Authored-By: marks <markskram@protonmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Deploying maple with
|
| Latest commit: |
2c91f62
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3baf8ae2.maple-ca8.pages.dev |
| Branch Preview URL: | https://devin-1776199869-fix-project.maple-ca8.pages.dev |
|
Thanks for the screenshot — I see the overflow is still happening. The |
- Add overflow-x-hidden to the scrollable area to prevent horizontal scroll - Add grid-cols-[minmax(0,1fr)] for mobile so grid items are properly constrained (matching the existing lg breakpoint pattern) - Add min-w-0 overflow-hidden to the chats card container These changes ensure that at every level of the container hierarchy, content is constrained to the viewport width on mobile. Co-Authored-By: marks <markskram@protonmail.com>
|
Mobile fix confirmed, thanks! I see the issue on desktop at narrower widths — the |
Add lg:min-w-0 and lg:overflow-hidden to the contents/block wrapper div. At the lg breakpoint, this element switches from contents to block and becomes a grid item — without min-w-0, grid items default to min-width: auto and won't shrink below their content's intrinsic width. Co-Authored-By: marks <markskram@protonmail.com>
|
it works on both mobile and desktop web. |

Summary
Fixes #475. Long chat names in the Project Details view caused the page to extend beyond the mobile viewport, requiring horizontal scrolling. The same issue occurred on desktop when the browser window was narrowed.
The root cause was overflow at multiple levels of the container hierarchy:
min-w-0, sotruncateon the span couldn't constrain text in a flex context.grid-template-columnswas set. Grid items default tomin-width: auto, allowing content to push beyond the viewport. Fixed by addinggrid-cols-[minmax(0,1fr)](matching the existinglgbreakpoint pattern).contents), it also neededmin-w-0 overflow-hiddento clip overflowing content.overflow-x-hiddento prevent any horizontal scroll from appearing.lgbreakpoint, the wrapper switches fromcontentstoblockand becomes a grid item — addedlg:min-w-0 lg:overflow-hiddento prevent it from growing beyond the grid column width.Review & Testing Checklist for Human
Notes
All changes are in
ProjectDetailView.tsx— overflow constraints added at 5 container levels to fully prevent horizontal overflow at all viewport sizes.Link to Devin session: https://app.devin.ai/sessions/3d60ee76bbd84b0891a96799c57d5f78
Requested by: @marksftw