feat(desktop): add idle lake and Zhizhi private route

This commit is contained in:
冰朔 2026-08-16 23:13:47 +08:00
commit cc802126ea
10 changed files with 385 additions and 34 deletions

View file

@ -0,0 +1,26 @@
import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const source = fs.readFileSync(new URL('../src/main.tsx', import.meta.url), 'utf8')
const styles = fs.readFileSync(new URL('../src/styles.css', import.meta.url), 'utf8')
test('ambient lake motion sleeps by default and wakes only after human interaction', () => {
assert.match(source, /const \[motionAwake, setMotionAwake\] = useState\(false\)/)
assert.match(source, /onPointerMove=\{wakeAmbientMotion\}/)
assert.match(source, /onPointerDown=\{wakeAmbientMotion\}/)
assert.match(source, /onKeyDown=\{wakeAmbientMotion\}/)
assert.match(styles, /\.official-world \.world-star,[\s\S]*animation-play-state: paused/)
assert.match(styles, /\.official-world\.motion-awake \.world-star,[\s\S]*animation-play-state: running/)
})
test('the desktop shell has no permanent polling interval while idle', () => {
assert.doesNotMatch(source, /setInterval\s*\(/)
assert.match(source, /window\.addEventListener\('focus', refreshWhenHumanReturns\)/)
assert.match(source, /document\.hidden/)
})
test('causal entry animations remain independent from ambient motion', () => {
assert.match(styles, /\.gate-rise-star[\s\S]*animation: gate-jade-rise/)
assert.doesNotMatch(styles, /\.official-world \.gate-rise-star[\s\S]*animation-play-state: paused/)
})

View file

@ -48,7 +48,9 @@ test('the public shell shows five domains and login is domain-routed', () => {
assert.doesNotMatch(frontend, /className="traffic-lights"/)
assert.match(login, /login_host_for_domain/)
assert.match(login, /ENTERPRISE_LOGIN_HOST.*guanghu\.chat/)
assert.match(login, /change_enterprise_first_login_password/)
assert.match(login, /change_first_login_password/)
assert.match(login, /ICE-GL-ZHI.*zhizhi/s)
assert.match(login, /rotate_forgejo_forced_password/)
assert.match(frontend, /第一次使用?先修改一次性密码/)
assert.match(router, /enterprise_resolve_url/)
assert.match(router, /verified_user_route/)

View file

@ -0,0 +1,25 @@
import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const source = fs.readFileSync(new URL('../src/main.tsx', import.meta.url), 'utf8')
test('Zhizhi remains absent from the public Fifth Domain card', () => {
const publicCard = source.slice(source.indexOf("domain: 'FIFTH_DOMAIN'"), source.indexOf('const starPoints'))
assert.doesNotMatch(publicCard, /之之|ICE-GL-ZHI/)
})
test('the verified Zhizhi route unfolds through her exact private nesting', () => {
assert.match(source, /ICE-GL-ZHI∞/)
assert.match(source, /永恒湖心系统/)
assert.match(source, /爱之核心子系统/)
assert.match(source, /明天见频道/)
assert.match(source, /光湖奶瓶小宝宝系统/)
assert.match(source, /ICE-BB-\* · AGE/)
})
test('Fifth Domain human numbers are paired with their own login account', () => {
assert.match(source, /'ICE-GL∞': 'bingshuo'/)
assert.match(source, /'ICE-GL-ZHI∞': 'zhizhi'/)
assert.match(source, /HOLOLAKE_LOGIN_ACCOUNT_NUMBER_MISMATCH/)
})