From 876f4a351f859201ca68fbf8d585c86905571686 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 10 Oct 2026 09:57:17 +0200 Subject: fix(client): say when the account's node is elsewhere, and let go of it Signing in on a desktop links this machine's node to the account, but never over a key already linked (that would cut off the user's other machine) nor a node set up for another account. On a real install both left the node reading "Running" while the hub refused it in a loop, and nothing said why. And the only way to unlink was the linked machine's own Node page, of no use once that machine is gone. - The Node page works out, from the node and the hub each time it looks, whether this node can serve the signed-in account (nodeLinkProblem), and says why not: "Link this node instead" (asked first) puts this node's key on the account; "Use this node for my account" switches a node set up for another account through node:start, which takeOver now lets past a node that answers "running". The first version went through node:start for both, and clicking it on a real install did nothing: a node signed in before the account was linked elsewhere answers "running". - The Profile page unlinks the account's node (DELETE /v1/users/me/node_key), from any machine. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_node_page_pairing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/meshbay-hub/tests/test_node_page_pairing.py') diff --git a/packages/meshbay-hub/tests/test_node_page_pairing.py b/packages/meshbay-hub/tests/test_node_page_pairing.py index c716e0a..ac77356 100644 --- a/packages/meshbay-hub/tests/test_node_page_pairing.py +++ b/packages/meshbay-hub/tests/test_node_page_pairing.py @@ -56,7 +56,7 @@ def test_pair_this_browser_queues_the_code_instead_of_claiming_success(): pair = src.split("const doPairOperator = useCallback(", 1)[1].split("}, [refresh]);", 1)[0] assert "session.pendingJoinCode = result.code;" in pair assert "setOperatorPaired(true)" not in pair - assert "import { HUB, session } from './hub-client.js';" in src + assert re.search(r"import \{ HUB, session(, \w+)* \} from './hub-client.js';", src) def test_no_pairing_banner_for_a_node_with_no_group_yet(): -- cgit v1.2.3