fix(site): make links in chat prompts clickable - #28187
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87ed3260a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…prompt links and click-test activation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 498b1d9864
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 827410961f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
URLs typed into Agents chat prompts rendered as dead plain text. This makes bare http(s) URLs in sent prompt bubbles clickable: they render as safe anchors (
target="_blank",rel="noopener noreferrer") and honor the chat'surlTransform, so localhost URLs rewrite to port-forward links the same way assistant responses do. Assistant responses already render clickable links via Streamdown and are unchanged. The ticket's cmd/ctrl-press suggestion was not needed: sent bubbles have no competing click interaction (copy/edit are separate buttons).Closes CODAGT-478.
Changes
linkify.ts(splitTextForLinks): plain-text URL segmentation built onlinkifyjs(4.3.3, MIT), with avalidateoption requiring an explicit http(s) scheme so bare domains, emails, and filenames with TLD-like extensions (README.md,deploy.sh) are not linkified. Detection is best effort: known linkifyjs tokenizer limitations (trailing Markdown emphasis delimiters kept in the URL, no IPv6 literal hosts, URLs adjacent to ANSI escapes not detected) are accepted and documented in the unit tests.LinkifiedTextcomponent: renders text segments with inline anchors and applies the optionalurlTransformto hrefs while keeping the visible URL text.UserMessageContentrenders prompt text (inline blocks and the plain-markdown fallback) throughLinkifiedText;ConversationTimelinepassesurlTransformdown.UserPromptWithLinksstory (href, target, rel, localhost rewrite, and real click activation with intercepted navigation) and a link assertion inUserMessageWithInlineFileRefcovering linkification next to an inline file chip.Testing
splitTextForLinks; whole-file Storybook run forConversationTimeline.stories.tsx(63 tests).pnpm -C site checkandpnpm -C site lint:typespass.