Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

test(live-links): name no platform in the NFC note and spell its letters as escapes

review5e53d58ab63a
diff --git a/src/core/watch-link/password.test.ts b/src/core/watch-link/password.test.ts
index a38b0926f..cf3b58569 100644
--- a/src/core/watch-link/password.test.ts
+++ b/src/core/watch-link/password.test.ts
@@ -21,8 +21,8 @@ describe('control password hash', () => {
expect(await verifyControlPassword('x'.repeat(8), { salt: 7, hash: [] } as never)).toBe(false)
})
it('compares the NFC form: a composed and a decomposed spelling of one password are the same password', async () => {
- const composed = 'café-päss' // é and ä as single code points (a Mac keyboard)
- const decomposed = 'café-päss' // the same letters as base + combining mark
+ const composed = 'caf\u00e9-p\u00e4ss' // é and ä as single code points
+ const decomposed = 'cafe\u0301-pa\u0308ss' // the same letters as base + combining mark
expect(composed).not.toBe(decomposed)
expect(await verifyControlPassword(decomposed, await hashControlPassword(composed))).toBe(true)
})
diff --git a/src/core/watch-link/password.ts b/src/core/watch-link/password.ts
index 1258a7583..cb92a9baa 100644
--- a/src/core/watch-link/password.ts
+++ b/src/core/watch-link/password.ts
@@ -2,8 +2,8 @@
// stored as {salt, hash} only. The plaintext is never kept, logged or echoed: it lives only for the
// call that hashes or checks it, which is why there is no "show again" (Change password sets a new one).
//
-// The password is compared in its NFC form, so the same password typed on a Mac (whose keyboards can
-// produce decomposed letters) and in a browser compares equal.
+// The password is compared in its NFC form: two input paths can produce different Unicode forms of
+// the same letters (composed é, or e plus a combining accent), and both must unlock.
//
// `verifyControlPassword` answers false, never throws: a malformed stored hash (a hand-edited file) or
// a non-string password (a viewer's cast is untrusted input) is a refused unlock, not an error. The