Skip to content

fix(tui): show original URL instead of slug when title fetch fails - #25626

Closed
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/tui-url-slug-fallback
Closed

fix(tui): show original URL instead of slug when title fetch fails#25626
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/tui-url-slug-fallback

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Problem

Issue #25606: When the async title fetch for a URL fails or returns no result, the TUI falls back to urlSlugTitleLabel() which parses the URL path and title-cases the last segment. This produces unintelligible single-word labels:

  • https://x.com/OpenAI/status/1234Status
  • https://github.com/NousResearch/hermes-agent/pull/2560625606

Fix

defaultLinkLabel() in markdown.tsx now returns the original URL as-is for http(s) links instead of passing it through urlSlugTitleLabel(). This means when title fetch fails, users see the full readable URL.

Also removed the now-unused urlSlugTitleLabel import.

Changed file

  • ui-tui/src/components/markdown.tsx — 2 lines changed (1 logic, 1 import cleanup)

Testing

  • All 548 existing vitest tests pass (16 pre-existing failures unrelated to this change — they require a built hermes-ink package)

PR #24013 introduced urlSlugTitleLabel() as fallback when async title
fetch fails or returns no result. This produces unintelligible single-word
labels for many real-world URLs (e.g. 'Status' for an X/Twitter post).

Fix: defaultLinkLabel() now returns the original URL as-is for http(s)
links, so users see the full readable URL instead of a mangled slug.

Removed unused urlSlugTitleLabel import.

Fixes #25606
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels May 14, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing fix: This PR is one of three open PRs addressing #25606:

Maintainer should pick one approach.

@alaamohanad169-ship-it
alaamohanad169-ship-it deleted the fix/tui-url-slug-fallback branch June 6, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants