fix(tui): show original URL instead of slug when title fetch fails - #25626
Closed
alaamohanad169-ship-it wants to merge 1 commit into
Closed
fix(tui): show original URL instead of slug when title fetch fails#25626alaamohanad169-ship-it wants to merge 1 commit into
alaamohanad169-ship-it wants to merge 1 commit into
Conversation
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
Collaborator
|
Competing fix: This PR is one of three open PRs addressing #25606:
Maintainer should pick one approach. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/1234→Statushttps://github.com/NousResearch/hermes-agent/pull/25606→25606Fix
defaultLinkLabel()inmarkdown.tsxnow returns the original URL as-is forhttp(s)links instead of passing it throughurlSlugTitleLabel(). This means when title fetch fails, users see the full readable URL.Also removed the now-unused
urlSlugTitleLabelimport.Changed file
ui-tui/src/components/markdown.tsx— 2 lines changed (1 logic, 1 import cleanup)Testing
hermes-inkpackage)