fix: terminal links open wrong URL for addresses with ports#11369
Open
shanevcantwell wants to merge 3 commits intocontinuedev:mainfrom
Open
fix: terminal links open wrong URL for addresses with ports#11369shanevcantwell wants to merge 3 commits intocontinuedev:mainfrom
shanevcantwell wants to merge 3 commits intocontinuedev:mainfrom
Conversation
…esses The link regex was designed for domain names and broke on IP:port URLs like http://192.168.137.1:8081, only linkifying up to the IP without the port. Simplified the http/https branch to match everything after the protocol until whitespace. Closes continuedev#11368 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="gui/src/components/UnifiedTerminal/UnifiedTerminal.test.tsx">
<violation number="1" location="gui/src/components/UnifiedTerminal/UnifiedTerminal.test.tsx:204">
P2: Regression test checks only raw text content and does not validate generated link href, so it may miss the port-truncation bug it is intended to catch.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The text-only assertion wouldn't catch a regression where the URL appears in output but the <a> href is truncated (e.g. missing port). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
http://192.168.137.1:8081)example.com) and broke on the multiple dots in IP addresses, dropping the:portsuffixhttp:///https://branch to match everything after the protocol until whitespaceCloses #11368
Test plan
npx http-server -p 8081and confirm the full URL (with port) is clickable🤖 Generated with Claude Code
Summary by cubic
Fixes terminal URL link detection so IP address URLs with ports are fully clickable (e.g., http://192.168.137.1:8081). Adds tests to ensure rendered link hrefs include the port.
http:///https://regex to match everything after the protocol until whitespace; keptwww.domain matching unchanged.UnifiedTerminaltests to include an IP:port and assert<a>hrefs contain the full URL; applied Prettier formatting to the regex.Written for commit 193f66d. Summary will update on new commits.