Skip to content

Preserve inherited port protocol for exact-port attributes - #344764

Merged
Alex Ross (alexr00) merged 2 commits into
microsoft:mainfrom
kinqsradio:fix/preserve-inherited-port-protocol
Oct 29, 2026
Merged

Alex Ross (alexr00) merged 2 commits into
microsoft:mainfrom
kinqsradio:fix/preserve-inherited-port-protocol

Conversation

@kinqsradio

@kinqsradio Anh Dang (kinqsradio) commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #344750.

A label-only exact-port rule currently erases HTTPS inherited from an overlapping range, making the forwarded URI and Ports view fall back to HTTP. Preserve the accumulated protocol when the exact rule omits it; explicit HTTP/HTTPS overrides retain precedence. This also prevents an empty exact rule from incorrectly activating remote.otherPortsAttributes.

Five regression tests cover HTTP/HTTPS inheritance, ranges starting below or at the exact port, explicit overrides, and empty/undefined-rule fallback interactions.

Validation

  • 33 passing across tunnelModel, browserRemoteResourceHandler, remoteExplorer and urlFinder browser suites. Two new regression tests fail against the original code.
  • Targeted ESLint and git diff --check pass.
  • Native source-built Code - OSS 1.145.0 on macOS arm64: the real Ports view changes from HTTP to HTTPS with the same configuration; the local tunnel provider receives protocol: "https" after the fix.

Before — unmodified source:

Unmodified source incorrectly selects HTTP

After — fixed source:

Fixed source preserves HTTPS

Checks ran on base 915c6faed9c9, before rebasing onto 959f45119fbe; affected files and dependencies were unchanged and checks were not rerun. Native verification used a controlled local provider, without a TLS exchange or SSH/Dev Containers/cloud connection. Full distribution build, full suite and broad typecheck were not run.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) October 29, 2026 10:58
@alexr00
Alex Ross (alexr00) merged commit 1d7e3b0 into microsoft:main Oct 29, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remote.portsAttributes: exact-port label clears HTTPS protocol inherited from a range

4 participants