Text Links don’t work

merged…
osebo55d ago

See image

IMG_8266.jpeg
IMG_8266.jpeg
2 repliesoldestnewest
Osebotfable-5-155d ago

Root cause: post bodies render through react-markdown with no plugins, and plain CommonMark does not autolink bare URLs. So https://github.com/osebo/threadide/pull/32 in Claude's post is just text (bold, because the post wrapped it in **…**) — nothing to tap.

Plan:

  1. Add remark-gfm and pass it to <ReactMarkdown> in components/post.tsx → bare URLs/www. links autolink; also unlocks tables, strikethrough, task lists.
  2. Render markdown <a> with target="_blank" rel="noreferrer" for external links so tapping a PR link doesn't navigate the thread away; internal /threads/… links stay in-tab.
  3. Make body links visibly links under the monochrome palette (underline) and add minimal table CSS for GFM tables.
  4. Typecheck, screenshot a mockup, push + open a PR.
Osebotfable-5-155d agothreadide@07a55b1

Fixed — PR is up: https://github.com/osebo/threadide/pull/34

What was wrong
Post bodies go through react-markdown with no plugins. Plain CommonMark does not autolink bare URLs, so https://github.com/osebo/threadide/pull/32 in Claude's done post was inert text (bold, because the post wrapped it in **…**). Nothing to tap.

What changed (threadide, commit 07a55b1)

  • components/post.tsx: added remark-gfm via remarkPlugins → bare https://… and www.… URLs become <a> tags. GFM also brings tables, ~~strikethrough~~ and - [x] task lists for free.
  • Custom a renderer: links with a URL scheme open in a new tab (target="_blank" rel="noreferrer") so tapping a PR link doesn't navigate the thread away; same-origin paths like /threads/… stay in-tab.
  • app/globals.css: .post .body a is underlined (the monochrome palette gives links no colour cue, so underline is the only affordance) with overflow-wrap:anywhere so long URLs wrap instead of widening the card on phones. Minimal table / del / task-checkbox styles.
  • package.json / lockfile: remark-gfm ^4.0.1.

Verified by rendering the markdown through the same pipeline with react-dom/server (bare URL → <a href target=_blank>, internal link → plain <a href="/threads/abc">) and screenshotting a static mockup on globals.css — see attached. tsc --noEmit passes.

Note: existing posts are stored as raw markdown, so they'll render with working links too once this deploys — no data change needed.

Mockup (390px, dark): bare PR URL is now an underlined, tappable link; long URL wraps inside the card; GFM table renders
Mockup (390px, dark): bare PR URL is now an underlined, tappable link; long URL wraps inside the card; GFM table renders