feat: gate the language world behind number verification

This commit is contained in:
冰朔 2026-08-19 22:52:10 +08:00
commit f8c8db4d48
39 changed files with 1445 additions and 129 deletions

View file

@ -19,27 +19,30 @@ test('public routing starts from five domains and lets the number select the ver
assert.equal(contract.registries.ENTERPRISE_FOUR_DOMAINS.ownership, 'TCS_0002_ENTERPRISE_REALITY_BODY')
})
test('the public shell shows five domains and login is domain-routed', () => {
test('the public shell keeps five domains behind number resolution and login is domain-routed', () => {
const frontend = read('src/main.tsx')
const login = read('src-tauri/src/code_repo_login.rs')
const router = read('src-tauri/src/zero_point.rs')
for (const name of ['光湖主域', '光湖分域', '光湖零域', '光湖零感域', '第五域 · 光湖本源域']) {
assert.match(frontend, new RegExp(name.replace('·', '\\·')))
}
assert.match(frontend, /输入编号进入所属域/)
assert.match(frontend, /语言世界尚未展开/)
assert.match(frontend, /编号验证/)
assert.match(frontend, /gateRising \|\| gateStage === 'key'/)
assert.match(frontend, /TCS-GL-/)
assert.match(frontend, /肥猫 · TCS-GL-0007∞/)
assert.match(frontend, /桔子 · TCS-GL-0008∞/)
assert.match(frontend, /烬舟 · PER-JZ001 · AGE/)
assert.match(frontend, /熹微 · PER-JZ-ARCH-001 · AGE/)
assert.match(frontend, /.*/s)
assert.match(frontend, /.*/s)
assert.doesNotMatch(frontend, /肥猫 · TCS-GL-0007∞/)
assert.doesNotMatch(frontend, /桔子 · TCS-GL-0008∞/)
assert.doesNotMatch(frontend, /烬舟 · PER-JZ001 · AGE/)
assert.doesNotMatch(frontend, /熹微 · PER-JZ-ARCH-001 · AGE/)
assert.doesNotMatch(frontend, /肥猫 \+ 烬舟/)
assert.match(frontend, /className="gate-close"/)
assert.match(frontend, /className="domain-info-scrim"/)
assert.match(frontend, /setActiveDomainInfo\(gate\.domain\)/)
assert.match(frontend, /onDomain=\{\(domain\) => \{ if \(worldRevealed\) openPublicDomain\(domain\) \}\}/)
assert.match(frontend, /event\.key !== 'Escape'/)
assert.match(frontend, /编号 \{zeroPoint\?\.userNumber \|\| gateNumber\} · 欢迎登入光湖语言世界/)
assert.match(frontend, /编号 \{gateNumber\} · 语言世界正在展开/)
assert.match(frontend, /createWorldWelcome\(snapshot\)/)
assert.match(frontend, /className="world-impression"/)
assert.match(frontend, /index === previous/)
assert.match(frontend, /核对人格关系/)
assert.match(frontend, /确认关系并签署/)
@ -66,7 +69,8 @@ test('the locked Qoder world template is the running client structure, not a ski
assert.equal(contract.desktop_install_acceptance.mac_x86_64, 'NOT_BUILT')
assert.equal(contract.desktop_install_acceptance.windows, 'NOT_BUILT')
assert.equal(contract.desktop_install_acceptance.automatic_update_channel, 'PUBLIC_CHECK_PASS_NO_ACTIVE_RELEASE')
assert.match(frontend, /number-nucleus/)
assert.match(frontend, /star-abyss-dialog/)
assert.match(frontend, /worldRevealed/)
assert.match(frontend, /worldStage === 'domain'/)
assert.match(frontend, /worldStage === 'channel'/)
assert.match(frontend, /worldStage === 'tool'/)