统一宿主壳目录边界

移动端壳拆分为 host-bridge 与 shell 目录

桌面端 Tauri 拆分为 host_bridge 与 shell Rust 模块

更新三端桥接层结构门禁与配置检查

同步宿主壳方案文档和项目共享决策
This commit is contained in:
2026-06-18 16:02:55 +08:00
parent e92e016549
commit 00b41b6a29
32 changed files with 130 additions and 72 deletions
@@ -0,0 +1,28 @@
import { describe, expect, test } from 'vitest';
import { lifecyclePayloadFromAppState } from './mobileShellLifecycle';
describe('mobileShellLifecycle', () => {
test('把 React Native AppState 映射为统一 HostBridge 生命周期状态', () => {
expect(lifecyclePayloadFromAppState('active')).toEqual({
state: 'active',
focused: true,
nativeState: 'active',
});
expect(lifecyclePayloadFromAppState('background')).toEqual({
state: 'background',
focused: false,
nativeState: 'background',
});
expect(lifecyclePayloadFromAppState('inactive')).toEqual({
state: 'inactive',
focused: false,
nativeState: 'inactive',
});
expect(lifecyclePayloadFromAppState('unknown')).toEqual({
state: 'inactive',
focused: false,
nativeState: 'unknown',
});
});
});