Skip to content

feat(markdown): show the GitHub mark for github.com links - #10324

Merged
juliusmarminge merged 3 commits into
mainfrom
t3code/22a4012d
Sep 6, 2026
Merged

feat(markdown): show the GitHub mark for github.com links#10324
juliusmarminge merged 3 commits into
mainfrom
t3code/22a4012d

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 6, 2026

Copy link
Copy Markdown
Member

Every external link in assistant markdown gets the same generic ring, so a paragraph full of PR references reads as noise. GitHub links are by far the most common kind an agent emits, and the ring gives no hint which of them are GitHub.

Links whose host is github.com or gist.github.com (subdomains included) now show the GitHub mark instead. The mark follows the link color, so it stays correct across themes and in both light and dark mode. Other hosts keep the ring.

  • web / desktop: ChatMarkdown swaps the ring for the existing GitHubIcon, currentColor.
  • mobile, iOS native: a t3-link: attachment carries a tint flag through the shadow node, and the Obj-C side tints the PNG with the run's foreground color. The attachment string keeps NSForegroundColorAttributeName, so the async icon-load re-apply tints with the link color instead of falling back to labelColor.
  • mobile, Android / JS fallback: an <Image tintColor> inline with the link text.
  • Detection lives in markdownLinks.ts and is unit-tested (www.github.com, gist.github.com, github.com.evil.com rejected, non-http schemes ignored).

Before / after

Same seeded thread, iPhone 17 Pro sim, iOS 26.5. Left is main, right is this branch.

Light

Light mode before/after: generic ring glyphs on the left, link-colored GitHub marks on the right; knip.dev keeps the ring

Dark

Dark mode before/after: GitHub marks tinted with the lighter dark-theme link color

Verification

  • apps/mobile/src/lib/markdownLinks.test.ts (49 tests), mobile tsc, web tsgo, lint, format.
  • iOS: Debug build on the simulator, both appearances; the dark capture is from the rebuilt binary with the re-tint fix.
  • Not exercised on-device: Android emulator and the web swap. Both are plain JS and typecheck.

Model: Claude Fable 5. Harness: Claude Code in T3 Code.

Note

Render GitHub mark for github.com links in markdown

  • Adds a host resolver matching github.com and subdomains to return a bundled GitHub icon for markdown links on mobile and web
  • iOS passes the icon through a native attachment pipeline that tints the loaded image with the surrounding text color; Android renders it directly as a tinted image
  • Web renders a theme-following GitHub SVG component instead of requesting a favicon for GitHub links
  • Other external hosts retain the existing favicon request and globe fallback
  • Behavioral Change: web MarkdownLinkFavicon skips favicon fetching for GitHub hosts; iOS T3MarkdownTextAttachmentRange gains a tint flag consumed by T3MarkdownTextApplyAttachments

Macroscope summarized a37d1c1.

juliusmarminge and others added 2 commits September 5, 2026 22:08
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Sep 6, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 6, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a37d1c1

Macroscope's review found this PR approvable — This is a localized Markdown UI enhancement: GitHub links use a bundled, theme-tinted mark and no longer fetch a favicon, while other links retain their existing behavior. The native attachment changes and tests stay within the existing Markdown rendering path, with no schema, deployment, security, or static-analysis impact.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.6 KiB +41 B (+0.3%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −2 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +43 B (+0.6%) 7.8 KiB
Codex Live turn WebSocket decoded 57.0 KiB 57.1 KiB +88 B (+0.2%) 66.4 KiB
Codex Live turn messages 8 10 +2 (+25.0%) 21
Claude Total thread wire 13.6 KiB 13.5 KiB −70 B (−0.5%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB −9 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.5 KiB −61 B (−0.9%) 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 57.8 KiB −88 B (−0.1%) 66.4 KiB
Claude Live turn messages 10 8 −2 (−20.0%) 21

Baseline: a495385 · PR result: a37d1c1 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 6, 2026 06:16

Dismissing prior approval to re-evaluate a37d1c1

@juliusmarminge
juliusmarminge merged commit 272d6d7 into main Sep 6, 2026
35 of 36 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/22a4012d branch September 6, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant