Skip to content

Fix #43 (#45) Fix macOS single-instance port collision with Zed#45

Merged
naaiyy merged 1 commit into
Glass-HQ:mainfrom
Max-109:fix/macos-single-instance-port
Apr 6, 2026
Merged

Fix #43 (#45) Fix macOS single-instance port collision with Zed#45
naaiyy merged 1 commit into
Glass-HQ:mainfrom
Max-109:fix/macos-single-instance-port

Conversation

@Max-109
Copy link
Copy Markdown

@Max-109 Max-109 commented Apr 6, 2026

Context

Fixes #43

Glass inherited Zed's macOS single-instance port range (base 43737) and handshake check. Both apps bind the same per-channel localhost port on startup to enforce "only one instance running." When Zed already holds that port, Glass sees the handshake, concludes it is already running, and exits immediately (and vice versa) a.k.a crashes.

This changes Glass to use its own base port (44737) so the two apps no longer collide.

How to Review

One file: crates/zed/src/zed/mac_only_instance.rs. The only functional change is the port base constant and the four match arms that reference it. The comment block above the match was updated to reflect the new example port numbers.

Self-Review Checklist

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fixed Glass exiting immediately when Zed is already running

@Max-109 Max-109 requested a review from naaiyy as a code owner April 6, 2026 02:22
@github-actions github-actions Bot added the first contribution Opened by a first-time contributor label Apr 6, 2026
@github-actions github-actions Bot added the Size S label Apr 6, 2026
@magicjaqk magicjaqk mentioned this pull request Apr 6, 2026
Copy link
Copy Markdown

@naaiyy naaiyy left a comment

Choose a reason for hiding this comment

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

Good to merge. I'll make a small cleanup follow-up for the inherited Zed naming in a separate PR.

@naaiyy naaiyy changed the title Fix #43 Fix #43 (#45) Fix macOS single-instance port collision with Zed Apr 6, 2026
@naaiyy naaiyy merged commit 8cc5d8d into Glass-HQ:main Apr 6, 2026
23 checks passed
@magicjaqk magicjaqk mentioned this pull request Apr 6, 2026
@Max-109 Max-109 deleted the fix/macos-single-instance-port branch April 6, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first contribution Opened by a first-time contributor Size S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instant crashing

2 participants