Overflowing text on cards

merged…
osebo56d ago

Text should probably just go to the next line and / or truncate on mobile, send images to choose between options

6 repliesoldestnewest
Osebotfable-5-156d ago

Looked at app/globals.css and the card markup. The overflow comes from a few places, all visible at phone widths (~390px):

  1. Thread rows (/ and /workspaces/[id]): .thread-row .meta { white-space: nowrap } and no min-width: 0 on the flex children, so long titles / long "workspace · repo · repo · repo" lines push past the card edge.
  2. Post header (.post .who): a non-wrapping flex row (avatar, name, kind badge, model badge, time, repo@sha codes, Fork/Ask buttons) — overflows on mobile in agent posts.
  3. Post body: no overflow-wrap, so long URLs / unbroken tokens (sha, paths) stretch the card.
  4. Workspace cards: .repo-chip / memory <code> keys have the same unbroken-token problem.

Plan:

  • Build a static mockup with the real stylesheet and worst-case content, screenshot at 390px to show the current state.
  • Apply the fixes that are needed regardless of preference (min-width: 0, overflow-wrap: anywhere on bodies, .who wraps).
  • Produce screenshots of the options for titles/meta: A) wrap onto multiple lines, B) truncate to one line with ellipsis, C) hybrid (title clamps to 2 lines, meta truncates) — and let you pick.
Osebotfable-5-156d agothreadide@2b31adf

Four screenshots attached (all at 390px phone width, rendered from a static mockup of the real globals.css with worst-case content — the app itself needs Postgres + OAuth so I can't run it here).

BEFORE — the status/time column is pushed outside the card, the "workspace · repo · repo" line runs off the edge, long URLs stretch post bodies, and badges split mid-word ("ORIGINAL / POST", "sonnet- / 4-5").

What's fixed in every option (committed, 2b31adf)

  • .card { overflow-wrap: anywhere } — URLs, shas, file paths break instead of widening the card (post bodies, memory notes, refs, repo chips).
  • .thread-row: left column gets min-width: 0 / flex: 1; right column (badge + time) flex: none so it stays inside the card.
  • .badge { white-space: nowrap } — no more mid-word badge splits.
  • .post .who wraps onto a second line on narrow screens (commit codes and fork/ask buttons drop below the name/badges) instead of overflowing.

Pick one for thread-list titles

TitleSub-line (workspace · repos)Row height
A – wrapwraps fullywraps fullyunbounded (6+ lines for a long title)
B – truncate1 line + …1 line + …always 2 lines, but "Investigate why the ni…" loses most of the meaning
C – hybrid ✅ committed as defaultclamps to 2 lines + …1 line + …max 3 lines

I went with C as the default since it's the common list pattern (GitHub/Linear on mobile) and the full title is one tap away. Switching is a one-line CSS change (noted in a comment in the file) — say A or B and I'll swap it and push.

Two things I noticed but left alone, shout if you want them:

  1. The WAITING ON HUMAN badge eats ~40% of the row width on a phone; moving the badge under the title on max-width: 560px would give titles more room.
  2. The header nav ("W…") is horizontally scrollable by design (existing overflow-x: auto), not part of this bug.
BEFORE at 390px: badges/time pushed out of the card, meta line and URLs overflow, badges split mid-word
BEFORE at 390px: badges/time pushed out of the card, meta line and URLs overflow, badges split mid-word
Option A (wrap): title and repo sub-line wrap onto as many lines as needed
Option A (wrap): title and repo sub-line wrap onto as many lines as needed
Option B (truncate): title and sub-line each cut to one line with an ellipsis
Option B (truncate): title and sub-line each cut to one line with an ellipsis
Option C (hybrid, committed as default): title clamps to 2 lines, sub-line truncates
Option C (hybrid, committed as default): title clamps to 2 lines, sub-line truncates
Diff · 1 files
--- a/threadide/app/globals.css
+++ b/threadide/app/globals.css
@@ -44,10 +44,19 @@
 .card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
+/* Long URLs, shas and paths must never widen a card; break them anywhere rather than overflow. */
+.card { overflow-wrap: anywhere; }
 .thread-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
 .thread-row:last-child { border-bottom: 0; }
+/* Left column (title + sub-line) is the flexible one and must be allowed to shrink; the right column (status, time) never wraps or shrinks. */
+.thread-row > :first-child { flex: 1 1 auto; min-width: 0; }
+.thread-row > .meta { flex: none; }
 .thread-row .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
-.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
+/* Title clamps to two lines and the "workspace · repo · repo" sub-line truncates with an ellipsis, so a row never grows past ~3 lines on a phone.
+   To wrap everything instead: drop the two rules below and set `.thread-row > :first-child .meta { white-space: normal }`. */
+.thread-row > :first-child > div:first-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
+.thread-row > :first-child .meta { overflow: hidden; text-overflow: ellipsis; }
+.badge { display: inline-block; white-space: nowrap; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@@ -55,7 +64,9 @@
 .post.agent .card { background: var(--agent); border-color: var(--agent-border); }
-.post .who { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
+/* Header row wraps on narrow screens instead of overflowing; each item (name, badge, "3h ago", repo@sha) stays on one line. */
+.post .who { display: flex; flex-wrap: wrap; gap: 8px; row-gap: 4px; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
+.post .who > * { white-space: nowrap; }
 .post .who b { color: var(--text); }
oseboasked Osebot56d ago

What’s your recommended option, also I had just merged

Osebotfable-5-156d agothreadide@2b31adf

Recommendation: C (hybrid) — and that's exactly what you merged. 2b31adf is in main via PR #4, so no further change is needed.

Why C over the others:

  • A (wrap) is the most "honest" but a single verbose title can take 6+ lines on a phone, so the list stops being scannable — you see 2–3 threads per screen.
  • B (truncate) keeps rows uniform but one line at 390px is only ~30 characters, so most titles lose their meaning ("Investigate why the ni…").
  • C gives ~60 characters of title (enough to read the intent), a fixed max row height (3 lines), and the sub-line (workspace · repo · repo) truncates because it's low-value context you can see on the thread page anyway. It's the same pattern GitHub Issues and Linear use on mobile.

If titles still feel too clipped in real use, the tweak is -webkit-line-clamp: 2 → 3 on .thread-row .title in app/globals.css (there's a comment next to it).

Left open from before, if you want a follow-up thread: move the WAITING ON HUMAN badge under the title on phones so titles get the full card width.

oseboasked Osebot56d ago

I think still waiting for the merged change to land

Osebotfable-5-156d agothreadide@2b31adf

Checked from the repo side — the change is fully landed in git, nothing is pending from me:

  • PR #4 merged as 6796f91 at 00:07 UTC (2026-09-28); 2b31adf is an ancestor of origin/main.
  • origin/main:app/globals.css contains the fix (.card { overflow-wrap: anywhere }, .thread-row min-width: 0, -webkit-line-clamp: 2, .post .who { flex-wrap: wrap }).
  • The commit touches only app/globals.css (13 lines), which is imported from app/layout.tsx, so it can't have broken the build.

What I can't see from the sandbox: the Vercel deployment. The repo is private and there's no gh / Vercel token here, so if it's not showing on the site ~15 min after merge, it's one of these:

  1. Vercel build for 6796f91 failed or is queued — check the project's Deployments tab. If it's red, paste the log here and I'll fix it (though a CSS-only change failing would point to something environmental, e.g. env vars).
  2. Production not tracking main — Vercel's "Production Branch" setting; if it's something else, the merge only produced a preview deployment.
  3. Stale page on the phone — Next hashes the CSS filename so normal caching isn't the issue, but an iOS home-screen web app or a long-lived Safari tab keeps the old HTML (and therefore the old CSS URL) until it's killed and reopened. Force-close and reopen, or check the deployment's own URL (threadide-xxx.vercel.app) to bypass it.

If the deploy is green and you're still seeing overflow, send a screenshot of the specific card — it'd mean an element my worst-case mockup didn't cover, and I'll patch that one.