Repository navigation
fix(client): links in agent questions open when clicked - #19214
Closed
SunkenInTime wants to merge 2 commits into
Closed
SunkenInTime wants to merge 2 commits into
SunkenInTime wants to merge 2 commits into
Conversation
Question text from an agent rendered as plain text on web, desktop and mobile, so a URL in it could not be opened. Bare http(s) URLs in the question now render as links that open the way links in chat messages do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A URL wrapped in curly quotes kept the closing quote, and a markdown link whose label is the URL swallowed the whole `](...)` tail, so both opened the wrong address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a focused fix that makes bare URLs in active agent questions clickable across web and mobile using existing link-routing behavior. Human review is required because the production UI changes add line-level lint suppressions for array-index keys. You can add or adjust custom eligibility rules. Learn more. |
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
When an agent asks a question (Claude's AskUserQuestion, Codex's request_user_input), the question card prints the text as plain text. Agents often put a link in the question, like "mocks are at https://... which one should I build?", and there was no way to open it short of copying the URL by hand. This happened on web, desktop and mobile.
Change
A small helper in
@t3tools/shared/plainTextLinkssplits text into prose and barehttp(s)URLs. It drops trailing sentence punctuation and markdown emphasis the way GitHub's autolinker does, keeps brackets the URL opened itself (Wikipedia paths), and stops at quotes and at the](of a markdown link whose label is the URL.Each client renders the URL pieces as links and opens them the same way it already opens links next to the chat:
ComposerPendingUserInputPanel) useuseOpenPrLink. A pull request link opens in the PR panel, other links follow the "Open links in" setting, and a modifier-click still goes to the system browser.PendingUserInputCard) usesuseOpenPullRequest, the same fallback chat markdown links take forhttp(s)URLs. Links are nestedTextwithaccessibilityRole="link", so VoiceOver reads them as links.Only the expanded question paragraph gets links. The collapsed web header stays plain because the whole header is the expand button, and option labels and descriptions stay plain because they sit inside the answer buttons. Linking those, and the answered-question history in the timeline, would need its own interaction design.
Scope and approval
Small fix for an obvious bug: text that looks like a link but can't be opened. No new setting or behavior beyond making the URL open the way other links in the app already do. Filed by a maintainer.
Verification
All on one dev server with a live Claude thread asking a question that contains a GitHub PR link and
https://t3.codes. Each "before" is the same build with only the card component swapped back tomain.https://t3.codesopened a new tab. Clicking the PR link opened PR fix(desktop): stop unsolicited Messages code autofill #19118 in the side panel. screenshothttps://t3.codesopened Safari on t3.codes. screenshothttps://t3.codesopened Chrome on t3.codes. screenshotvp test run packages/shared/src/plainTextLinks.test.ts(6 cases) and the existingComposerPendingUserInputPaneltests pass; typecheck is clean for web, mobile and shared.Desktop wasn't run separately. It renders the same web component, and its
_blankhandling is the path chat links already use.Made with Claude Opus 5.5 in Claude Code, running inside T3 Code.
🤖 Generated with Claude Code