Skip to content

fix: support finding ssh process by port on macos sequoia - #480

Merged
bcpeinhardt merged 4 commits into
mainfrom
ethan/fix-conn-indicator-sequoia
Apr 16, 2025
Merged

bcpeinhardt merged 4 commits into
mainfrom
ethan/fix-conn-indicator-sequoia

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Apr 15, 2025 •

Copy link
Copy Markdown
Member

Relates to #361.

This brings back the connection indicator, at least on macOS Sequoia.
image

The indicator is populated from a file named <sshPID>.json. The library we were using to find that PID, find-process hasn't been updated for Sequoia.

Full explanation of the necessary change can be found in an umerged PR for that library:
yibn2008/find-process#78

This change was never merged, so I've forked it into our org for now. When it gets upstreamed we can switch back.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson
ethanndickson force-pushed the ethan/fix-conn-indicator-sequoia branch from 7b1eda3 to facb2eb Compare April 15, 2025 03:38
@ethanndickson
ethanndickson marked this pull request as ready for review April 15, 2025 03:42

@matifali matifali 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.

LGTM. Thanks @ethanndickson

@ethanndickson
ethanndickson force-pushed the ethan/fix-conn-indicator-sequoia branch from 86f3458 to f6c1272 Compare April 15, 2025 08:17

@code-asher code-asher left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting that find-process execs netstat instead of reading /proc directly. Although, maybe that is not possible on macOS?

In any case, looks good to me. If we ever implement our own connection code we will be able to get the PID more easily. 🤞

@ethanndickson

Copy link
Copy Markdown
Member Author

Will need someone else to merge, as I don't have permission!

@bcpeinhardt
bcpeinhardt merged commit 1fb0f02 into main Apr 16, 2025
@bcpeinhardt
bcpeinhardt deleted the ethan/fix-conn-indicator-sequoia branch April 16, 2025 01:39
@matifali

Copy link
Copy Markdown
Contributor

If we ever implement our own connection code we will be able to get the PID more easily. 🤞

This is becoming more than a want now, and we may actually need this soon.

@matifali

Copy link
Copy Markdown
Contributor

@ethanndickson, I am noticing a better reconnection flow after this PR. When my device returns from sleep, VS Code auto-reconnects without me pressing the reload button.

This may probably solve #413.

@matifali

matifali commented Jul 6, 2025

Copy link
Copy Markdown
Contributor

The upstream library fixed the issue, so we may consider switching to that again.

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.

4 participants