Skip to content

fix: show port numbers without a thousands separator - #455

Merged
arzafran merged 1 commit into
mainfrom
fix/sidebar-port-locale
Oct 20, 2026
Merged

arzafran merged 1 commit into
mainfrom
fix/sidebar-port-locale

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

In the sidebar, a workspace listening on port 3000 showed :3.000 (or :3,000, depending on your region settings). The stop-port dialog had the same problem: "Stop node on port 3.000?", and process IDs in it read like "12.345". Ports and process IDs now always show as plain digits.

Summary

  • Interpolating an Int into String(localized:) formats it with the user's locale, so %lld picks up grouping separators.
  • The sidebar port label is now Text(verbatim:), matching PortsHubView, and its string entry is gone, since a port number has nothing to translate.
  • The port tooltip and the stop-port dialog interpolate String(port) / String(pid), and their en/ja entries switch from %lld to %@.

No regression test: what's wrong here is the rendered SwiftUI text under a non-English locale. The repo's test policy rules out tests that assert on string-catalog contents, and no runtime seam reads the rendered label.

Test Plan

  • CI green.
  • With macOS region set to Germany or Spain, run python3 -m http.server 3000 in a workspace: the sidebar shows :3000.
  • Hover the port: the tooltip reads "Open localhost:3000".
  • Ports panel, stop the server: the dialog reads "Stop … on port 3000?" with the PID as plain digits.

@arzafran
arzafran merged commit 8f7a739 into main Oct 20, 2026
12 checks passed
@arzafran
arzafran deleted the fix/sidebar-port-locale branch October 20, 2026 18:17
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.

1 participant