Skip to content

fix(app): sign in from a link opened in the same tab, and say when the host refuses this browser - #614

Merged
iamnbutler merged 1 commit into
mainfrom
sign-in
Oct 22, 2026
Merged

iamnbutler merged 1 commit into
mainfrom
sign-in

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

Fixes #609 (map ^897). A tab already on the host's origin stayed on "Disconnected from your host. Reconnecting…" forever after its sign-in stopped working. Opening the sign-in link in that tab changed only the hash, so the app never read the new token. The socket's 401 showed only in the console.

  • host.ts reloads the page when the hash gains a token, so the normal startup reads it, strips it from the URL, and connects with it.
  • While disconnected, the served app checks /ws over HTTP every 5 s, sending the same token or cookie the socket would. A browser hides a WebSocket's 401, and this request doesn't. On a 401 the banner says: "This browser isn't signed in to your host. Run ace open on that Mac, or open its sign-in link again." A host that's down still reads "Reconnecting…". The desktop app and the deployed web app keep their own messages.

Smoke: isolated loopback host on port 4771 from this lane, rebuilt app, fresh headless Chromium:

  1. http://localhost:4771/#channels with no token showed the new sign-in banner instead of "Reconnecting…".
  2. In the same tab, going to http://localhost:4771/#token=<t> (a hash-only navigation) reloaded the page and connected. The token was stripped from the URL and the channel list loaded.

I didn't test a real Ace Helper restart. That path is the same 401 on reload.

Built in Ace

No. Built by Claude Code as a fix worker after the two-Mac pair study because the worker runs outside an Ace channel. Dogfooding gap tracked in #5.

@iamnbutler
iamnbutler merged commit d0311e8 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the sign-in branch October 22, 2026 17:57
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.

Reload after an Ace Helper restart sticks on Reconnecting… with no way to sign in

1 participant