Skip to content

fix: tell a teammate's browser whose host it opened instead of reconnecting forever - #660

Merged
iamnbutler merged 2 commits into
mainfrom
fix-teammate-browser
Oct 22, 2026
Merged

iamnbutler merged 2 commits into
mainfrom
fix-teammate-browser

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

A browser signed in as someone other than the host's owner now reads "This is 's host. Open Ace from your own host." instead of "Disconnected from your host. Reconnecting…" forever.

The app already asks the host over plain HTTP why its socket was refused (a browser hides a WebSocket's status). On the team listener that request has no Origin and no upgrade, so it was treated as a peer socket and got 400 Upgrade failed — the 400 seen in the pair study's console. Now a non-upgrade request to /ws is answered as a browser: a teammate gets the 403, which names the host's owner, and the app shows its text.

Fixes #630

Map: ^798 (https://ace-map.iamnbutler.pages.nexthub.sh/devices.html#798)

Smoke: own ACE_HOME host on port 4951 run with ACE_USER=teammate-w5, opened from headless Chrome over the tailnet name. The banner reads "This is teammate-w5's host. Open Ace from your own host." The same host run as the real owner still connects and shows Welcome to Ace.

Built in Ace

No. Made from Claude Code (fix-train worker), with headless Chrome for the browser smoke. Dogfooding gaps are tracked in #5.

…ecting forever

Why: apps/host/src/gateway.ts#function team | a plain GET to /ws without an upgrade is the app asking why its socket was refused; it must get the browser's answer (403 naming the owner for a teammate), never be treated as a peer
@iamnbutler
iamnbutler merged commit 2f7d489 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-teammate-browser branch October 22, 2026 21:31
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.

A teammate's browser on another person's host shows Reconnecting… forever

1 participant