Skip to content

Commit 0667bd8

Browse files
fix(connection): a not-linked host also covers the reinstall case
A listed host that fails with not_linked keeps the relink steps and adds a conditional one for a reinstalled host, since the client cannot tell a superseded identity from a separate host with the same label. AI-assisted; verified with the tests and tools listed above.
1 parent d57aafc commit 0667bd8

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎packages/client-runtime/src/connection/diagnosis.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ describe("presentConnectionDiagnosis", () => {
146146
via: "relay",
147147
relayRegistration,
148148
});
149-
expect(withRegistration("registered")?.headline).toBe(
150-
"Mac mini is not linked to your T3 Connect account",
151-
);
149+
const listed = withRegistration("registered");
150+
expect(listed?.headline).toBe("Mac mini is not linked to your T3 Connect account");
151+
expect(listed?.steps[1]).toContain("turn T3 Connect on");
152+
expect(listed?.steps[2]).toMatch(/^If T3 Code was reinstalled on Mac mini, remove this entry/);
152153
const diagnosis = withRegistration("unregistered");
153154
expect(diagnosis?.headline).toContain("no longer on your T3 Connect account");
154155
expect(diagnosis?.steps[0]).toContain("turn T3 Connect on");

‎packages/client-runtime/src/connection/diagnosis.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ function steps(host: string, located: Located, failure: ConnectionAttemptError |
185185
return [
186186
"Check that this device is signed in to the same T3 Connect account as the host.",
187187
`On ${host}, open Settings > Sharing & access and turn T3 Connect on.`,
188+
`If T3 Code was reinstalled on ${host}, remove this entry from this device and add ${host} again from the T3 Connect list.`,
188189
];
189190
case "unregistered":
190191
return [

0 commit comments

Comments
 (0)