Matrix chat in Element mode: the hidden warm-up frame's SSO fallback still creates an account for a user who never opens chat

Problem and intended result

Found in the pre-promote review of #1506 (closed) on session/denser-simple, and stated in its commit (f3267437) and in stack/matrix/README.md. #1506 (closed) makes the login-token route create a missing Matrix account only for {"createAccount": true}, which only an opened drawer sends. In the native client (the default) a warm-up therefore creates no account. In Element mode, though, a warm-up for a user with no account gets a 404 from the token route and then falls back to Element's SSO inside the hidden warm-up frame. That SSO flow creates the account as before, so a user who never opens chat still gets an account and a #general membership on deployments that use the Element client.

Intended: in Element mode too, nothing creates an account until the drawer is opened.

Required behavior

  • While the drawer is closed, the Element widget's warm-up must not start the SSO fallback for a user without an account. Leave the frame unsigned (or stop the warm-up) and sign in when the drawer opens, with createAccount.
  • Update the README note.

Verification

  • Fixture spec in Element mode (like CHAT-NATIVE-21 for the native client): the token route answers 404 until asked to create; the idle warm-up makes no SSO redirect, and opening the drawer signs in.

Integration points

  • apps/blog/components/matrix-chat-widget.tsx / apps/blog/components/hooks/use-matrix-login-token-answer.ts: no SSO fallback while closed
  • stack/matrix/README.md: the known-limitation note

Acceptance criteria

  • With the Element (iframe) chat client configured, a signed-in, chat-eligible user without a Matrix account who never opens the chat drawer gets no Matrix account and no #general membership (no admin v2/users PUT, no join)
  • Opening the drawer in Element mode still creates the account and signs in, as today
  • The native client (the default) is unchanged

Related-To: #1506 (closed)