From f276ee342c18268f4f46403c386b3f9e5da18e40 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 6 Nov 2026 20:11:37 +0100 Subject: [PATCH] swarm-ui: linking a matrix account starts on the password login and warns before a pasted token The form's credential choice now starts on 'log in with a password', listed first, with a note that the swarm's own login gives the account a device of its own. Choosing 'paste a token' shows a warning: a token from Element or another client belongs to a device that is already logged in, so the agent cannot use its encryption keys and the account will not decrypt encrypted rooms. --- docs/2-handbook/swarm/ui.md | 9 +++++++-- .../swarm-ui/src/pages/LinkMatrixAccountForm.tsx | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/2-handbook/swarm/ui.md b/docs/2-handbook/swarm/ui.md index 0bdb65f3..647ceafa 100644 --- a/docs/2-handbook/swarm/ui.md +++ b/docs/2-handbook/swarm/ui.md @@ -870,8 +870,13 @@ it carries an **own account** badge. The card requests the list again when a link dialog closes. - **link a matrix account** — `PUT /api/hives/{hive}/agents/{agent}/matrix-accounts/{account}`, - either a pasted bearer token or a user id + password that - swarm-controller logs in with, storing the token it gets back. + either a user id + password that swarm-controller logs in with, storing the + token it gets back, or a pasted bearer token. The form starts on the password + login: the account gets a device of its own, and the form notes that an + operator who also logs in to it appears to the agent as a second device. Choosing + **paste a token** shows a warning: a token from Element or another client + belongs to a device that's already logged in, so the agent can't use that + device's encryption keys and the account won't decrypt encrypted rooms. - **link a forge account** — `PUT /api/hives/{hive}/agents/{agent}/forge-accounts/{label}` with a forge URL and an access token, stored at `swarm/agents//forge/