Skip to content

[Bug]: TUI shows slug text instead of original URL #25606

@a-lang

Description

@a-lang

Bug Description

PR #24013 (feat(ui-tui): resolve markdown links to readable page titles) introduced ResolvedLink + useLinkTitle() to replace bare URLs with fetched page titles in the TUI.

When the async title fetch fails or returns no result, the display falls back to urlSlugTitleLabel() — a function that parses the URL path and title-cases the last meaningful segment. This produces unintelligible single-word labels for many real-world URLs:

  • https://x.com/OpenAI/status/12345"Status"
  • https://accounts.google.com/o/oauth2/auth?client_id=..."Auth" or similar generic slug
  • Any URL where the path ends in a common generic word produces a label that hides the actual destination

The same session content in the Web UI correctly shows the full clickable hyperlink.

Steps to Reproduce

  1. Start a TUI session (hermes in terminal).
  2. Ask the agent to summarize an X/Twitter timeline or include any tweet links in its response.
  3. Observe that every https://x.com/.../status/... link is rendered as: 🔗 Status
  4. Open the same session in Web UI — the full URL is visible and clickable.

Expected Behavior

When title resolution fails or produces a generic slug, the TUI should fall back to the original URL string (e.g. https://x.com/OpenAI/status/1234567890) rather than a single ambiguous word.

Image

Actual Behavior

The link is displayed as the literal text "Status". The numeric tweet ID is filtered out by the slug parser (\d+ regex in urlSlugTitleLabel), leaving only the preceding path segment.

Image

Affected Component

Other, CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Not a runtime crash — this is a rendering / UX regression in URL display logic.

Operating System

Ubuntu 24.04.4 LTS

Python Version

3.11.15

Hermes Version

0.13.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

  1. Blacklist common generic path segments in urlSlugTitleLabel() — e.g. status, page, id, item, post, home. When the resolved slug matches one of these, fall back to the raw URL instead of the slug.
  2. Prefer raw URL over short/generic slug when the slug is ≤ 3 characters or is a known generic term.
  3. Optional: Expose a config toggle (tui.resolve_link_titles) to disable title fetching entirely for users who prefer raw URLs.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/tuiTerminal UI (ui-tui/ + tui_gateway/)type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions