feat(sidebar): make listening ports clickable to open in browser (#1844)

* feat(sidebar): make listening ports clickable to open in browser

Wrap each sidebar port in a Button that opens http://localhost:{port}
in the cmux built-in browser (or system browser as fallback), matching
the existing PR link click behavior.

Fixes #1602

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address bot review feedback on port clickability

- Localize port label text with String(localized:) instead of bare literal
- Add sidebar.port.label and sidebar.port.openTooltip keys to
  Localizable.xcstrings with English and Japanese translations
- Respect openSidebarPullRequestLinksInCmuxBrowser user preference in
  openPortLink, matching the openPullRequestLink pattern exactly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn 2026-03-26 15:49:38 -07:00 committed by GitHub
parent 9d8e6a8d05
commit 819ceb8ebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 67 additions and 5 deletions

View file

@ -64785,6 +64785,40 @@
}
}
},
"sidebar.port.label": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": ":%lld"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": ":%lld"
}
}
}
},
"sidebar.port.openTooltip": {
"extractionState": "manual",
"localizations": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Open localhost:%lld"
}
},
"ja": {
"stringUnit": {
"state": "translated",
"value": "localhost:%lldを開く"
}
}
}
},
"sidebar.pullRequest.openTooltip": {
"extractionState": "manual",
"localizations": {