Sign-up: a name with capitals ends signed in, not on "Connecting…" #88

Merged
ann merged 1 commit from ryoitsu69/anotherim-js:fix/sign-up-capitals into develop 2026-11-06 18:30:08 +00:00
Contributor

After a sign-up with capitals in the name, the screen stays on "Connecting…" over an account that is already connected. This is what is left of #86, which I closed because 0.8.0-rc5 fixes the rest.

Cause

Registration.registeredJid builds the address from the form's username answer as typed. <aim-signin-card> keeps that in pending and looks it up in connState, an exact Map.get. Since rc5 Store.signIn normalises its own copy (59ccee91) and libtacky 1.2.0-rc4 names the account in lower case, so conn <State> comes under rc5_signup_test@chat.test while the card waits for Rc5_Signup_Test@chat.test. signed-in never comes, and the shell keeps the screen up on pendingSignIn. A restart opens the account normally.

Fix

registeredJid goes through normJid, the rule addressTarget and jidOf follow since ecce2f19. The name in the form still goes to the server as typed.

Testing

  • registration.test.ts and signin-card.test.ts each gain a test with a name with capitals, which no sign-up test had. Both fail on 5f1ef7e8.
  • make test-ui check: 5130 passed, 8 skipped, check clean. On Node 26 it needs NODE_OPTIONS=--no-webstorage: without it jid-case.test.ts fails on clean develop too, because localStorage is undefined under happy-dom.
  • On a local ejabberd 26.09 (anotherim-server b9e675dd), with a name with capitals:
    • The released rc5 AppImage stays on "Connecting…" on the welcome screen. The server's log shows the session opened a second after the registration.
    • A build of this branch opens at once, from the welcome screen and from Settings, Accounts, Add an account. Messages pass between the two accounts.

Not run: the Add account sheet in the released rc5, Android.

🤖 Generated with Claude Code

After a sign-up with capitals in the name, the screen stays on "Connecting…" over an account that is already connected. This is what is left of #86, which I closed because 0.8.0-rc5 fixes the rest. ## Cause `Registration.registeredJid` builds the address from the form's `username` answer as typed. `<aim-signin-card>` keeps that in `pending` and looks it up in `connState`, an exact `Map.get`. Since rc5 `Store.signIn` normalises its own copy (59ccee91) and libtacky 1.2.0-rc4 names the account in lower case, so `conn <State>` comes under `rc5_signup_test@chat.test` while the card waits for `Rc5_Signup_Test@chat.test`. `signed-in` never comes, and the shell keeps the screen up on `pendingSignIn`. A restart opens the account normally. ## Fix `registeredJid` goes through `normJid`, the rule `addressTarget` and `jidOf` follow since ecce2f19. The name in the form still goes to the server as typed. ## Testing - `registration.test.ts` and `signin-card.test.ts` each gain a test with a name with capitals, which no sign-up test had. Both fail on 5f1ef7e8. - `make test-ui check`: 5130 passed, 8 skipped, `check` clean. On Node 26 it needs `NODE_OPTIONS=--no-webstorage`: without it `jid-case.test.ts` fails on clean develop too, because `localStorage` is undefined under happy-dom. - On a local ejabberd 26.09 (anotherim-server b9e675dd), with a name with capitals: - The released rc5 AppImage stays on "Connecting…" on the welcome screen. The server's log shows the session opened a second after the registration. - A build of this branch opens at once, from the welcome screen and from Settings, Accounts, Add an account. Messages pass between the two accounts. Not run: the Add account sheet in the released rc5, Android. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ann merged commit d618bd2081 into develop 2026-11-06 18:30:08 +00:00
Sign in to join this conversation.
No description provided.