fix(desktop): keep lone-surrogate scopes in distinct browser partitions

The partition digest hashed `TextEncoder().encode(scope)`, which replaces a
lone UTF-16 surrogate with U+FFFD — so two supported ids differing only by
such a unit (`"p\ud800"` vs `"p�"`) landed in the same partition and
shared every cookie and site storage. Lone surrogates are now escaped to
`\uXXXX` before hashing, with a literal backslash doubled so the escape
cannot be forged. Every well-formed scope passes through byte-for-byte
unchanged, so existing partitions — and the logins in them — stay put.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1a5aa85921Julius Marminge committed on 9/2/2026, 9:34:16 PMparentfe5a26f
2 files changedLine totals unavailable