You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(client-runtime): open Linear issue links with an explicit HTTPS default port in the issue panel - #44693
A bound Linear issue link in a web or Electron chat message opens externally instead of in the issue panel when the URL spells out the default HTTPS port (:443). parseLinearIssueUrl normalizes the default port away via URL, but mayContainStandaloneIssueLink required / immediately after linear.app, causing ChatMarkdown to skip fetching the tracker bindings needed to resolve the link.
Deterministic repro on origin/main (a91808a108efa4ff121d29c80ddab72c4699d980):
With Linear workspace acme connected and project p bound to team WEB, evaluate [issue](https://linear.app:443/acme/issue/WEB-17) through mayContainStandaloneIssueLink and resolveIssueLinkTarget (gating trackers on the hint, as ChatMarkdown does):
Observed:mayContainStandaloneIssueLink("[issue](https://linear.app:443/acme/issue/WEB-17)") returned false (even though isStandaloneIssueLink returned true and resolveIssueLinkTarget with bindings returned { projectId: "p", key: "WEB-17" }), so the gated ChatMarkdown path passed no bindings and resolved null.
Expected:mayContainStandaloneIssueLink returns true, bindings are fetched, and the explicit :443 link resolves to project p and WEB-17 just like https://linear.app/acme/issue/WEB-17.
Change
Allow an optional port ((?::\d*)?) between LINEAR_HOST and / in LINEAR_LINK_HINT_PATTERN in packages/client-runtime/src/issueLinks.ts, leaving authority validation to parseLinearIssueUrl. Added :443 (and non-default :8443 rejection) assertions to packages/client-runtime/src/issueLinks.test.ts. This covers web and Electron chat markdown (both share ChatMarkdown and mayContainStandaloneIssueLink); mobile already calls isStandaloneIssueLink directly and was unaffected.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
Base failure (a91808a108efa4ff121d29c80ddab72c4699d980):vp test run packages/client-runtime/src/issueLinks.test.ts -t "mayContainStandaloneIssueLink" failed with AssertionError: expected false to be true on [issue](https://linear.app:443/acme/issue/WEB-17).
Head pass (2/2 consecutive runs):vp test run packages/client-runtime/src/issueLinks.test.ts passed 12/12 tests on both runs.
Changed checks:vp run check:changed exited 0 (format, lint, knip 1/2 & 2/2, typecheck across 7 packages, and affected tests all passed).
Not shown: Interactive browser/Electron click-through with a live Linear binding was not run in this checkout; verified at the client-runtime hint/resolver boundary that gates ChatMarkdown's tracker query.
Authored by Gemini 4 Neon (Antigravity); reviewed by Kimi K3.1 Pro (Model Hub).
Reviewing files that changed from the base of the PR and between 00b1298 and a61fbf9.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The Linear URL pre-check now accepts an optional port suffix. Tests cover resolution and standalone-link classification for an explicit HTTPS port, and null resolution for a nondefault port.
Changes: Linear URL Port Handling
Layer / File(s)
Summary
Port matching and tests packages/client-runtime/src/issueLinks.ts, packages/client-runtime/src/issueLinks.test.ts
The Linear URL pre-check accepts an optional port suffix. Tests expect a URL with :443 to resolve to the bound project and classify as containing an issue link. A URL with :8443 is expected to return null.
Linear issue links with an explicit :443 port will now open in the issue panel instead of externally. Nondefault ports are still rejected by the parser. The change is small, tested at the resolver and hint boundary, and easy to revert.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: Linear issue links with an explicit default HTTPS port (:443) now open in the issue panel. It matches the raw summary and the PR objectives, which both describe the LINEAR_…
Description check
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the expected behavior, and a deterministic repro on a name…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: Linear issue links with an explicit default HTTPS port (:443) now open in the issue panel. It matches the raw summary and the PR objectives, which both describe the LINEAR_LINK_HINT_PATTERN change that allows an optional port. The title is specific and follows conventional commit style. It is 99 characters, which is longer than ideal, but it stays within a reasonable range.
Full details: Description check
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the expected behavior, and a deterministic repro on a named base commit. The Change section names the file and the regex change. The Scope section explains why no issue is linked, as the template asks. The Verification section gives focused test commands, base and head results, and a note on what was not checked (no interactive browser or Electron click-through). The description does not include a screenshot, but the template requires before/after screenshots only for UI changes, and this fix is at the markdown link-resolution layer. The author also states the model and harness used, as the template asks for agent-driven work.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between ddcd048 and 00b1298.
Files selected for processing: 2
packages/client-runtime/src/issueLinks.test.ts
packages/client-runtime/src/issueLinks.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
…tches the regression
The resolveIssueLinkTarget assertions for :443 and :8443 already pass on
main, since URL parsing drops the default port before resolution.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Real web app, Chromium 156 on Linux, 1280×800, light theme, fresh state and real Linear integration on both commits.
Steps: connect Linear and bind project server to T3CF; click a Replay assistant link containing :443; send and click the equivalent no-port link; close the panel and click the original :443 link again.
Proven: scenarios:prove exited 0. Both :443 clicks opened external tabs on base and the issue panel on head. The no-port control opened the panel on both.
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
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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
A bound Linear issue link in a web or Electron chat message opens externally instead of in the issue panel when the URL spells out the default HTTPS port (
:443).parseLinearIssueUrlnormalizes the default port away viaURL, butmayContainStandaloneIssueLinkrequired/immediately afterlinear.app, causingChatMarkdownto skip fetching the tracker bindings needed to resolve the link.Deterministic repro on
origin/main(a91808a108efa4ff121d29c80ddab72c4699d980):With Linear workspace
acmeconnected and projectpbound to teamWEB, evaluate[issue](https://linear.app:443/acme/issue/WEB-17)throughmayContainStandaloneIssueLinkandresolveIssueLinkTarget(gatingtrackerson the hint, asChatMarkdowndoes):mayContainStandaloneIssueLink("[issue](https://linear.app:443/acme/issue/WEB-17)")returnedfalse(even thoughisStandaloneIssueLinkreturnedtrueandresolveIssueLinkTargetwith bindings returned{ projectId: "p", key: "WEB-17" }), so the gatedChatMarkdownpath passed no bindings and resolvednull.mayContainStandaloneIssueLinkreturnstrue, bindings are fetched, and the explicit:443link resolves to projectpandWEB-17just likehttps://linear.app/acme/issue/WEB-17.Change
Allow an optional port (
(?::\d*)?) betweenLINEAR_HOSTand/inLINEAR_LINK_HINT_PATTERNinpackages/client-runtime/src/issueLinks.ts, leaving authority validation toparseLinearIssueUrl. Added:443(and non-default:8443rejection) assertions topackages/client-runtime/src/issueLinks.test.ts. This covers web and Electron chat markdown (both shareChatMarkdownandmayContainStandaloneIssueLink); mobile already callsisStandaloneIssueLinkdirectly and was unaffected.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
a91808a108efa4ff121d29c80ddab72c4699d980):vp test run packages/client-runtime/src/issueLinks.test.ts -t "mayContainStandaloneIssueLink"failed withAssertionError: expected false to be trueon[issue](https://linear.app:443/acme/issue/WEB-17).vp test run packages/client-runtime/src/issueLinks.test.tspassed 12/12 tests on both runs.vp run check:changedexited0(format, lint, knip 1/2 & 2/2, typecheck across 7 packages, and affected tests all passed).client-runtimehint/resolver boundary that gatesChatMarkdown's tracker query.Authored by Gemini 4 Neon (Antigravity); reviewed by Kimi K3.1 Pro (Model Hub).