收口原生分享桥接边界

将 Expo 分享目标状态收口到 share 模块

将 Tauri 分享目标与剪贴板 fallback 响应收口到 share 模块

同步两端分享结构门禁和共享记忆
This commit is contained in:
2026-06-19 22:31:05 +08:00
parent b1c42885ba
commit d53bd66e99
7 changed files with 116 additions and 54 deletions
@@ -1285,12 +1285,23 @@ for (const snippet of [
'normalizeHostBridgeShareOpenPayload',
'const explicitPayload = normalizeHostBridgeShareOpenPayload(payload);',
'normalizeHostBridgeShareOpenPayload(currentShareTarget)',
'setMobileHostBridgeShareTarget',
'resetMobileHostBridgeShareTargetForTest',
]) {
if (!shareSource.includes(snippet)) {
throw new Error(`mobile shell share URL policy missing ${snippet}`);
}
}
if (
!dispatchSource.includes('setMobileHostBridgeShareTarget(request.payload)') ||
!dispatchSource.includes('openShare(request.payload)') ||
dispatchSource.includes('let currentShareTarget') ||
dispatchSource.includes('normalizeHostBridgeShareOpenPayload(currentShareTarget)')
) {
throw new Error('mobile shell share HostBridge methods must delegate to share module');
}
if (shareSource.includes("const WEB_APP_ORIGIN = 'https://app.genarrative.world'")) {
throw new Error('mobile shell share URL policy must reuse the shared web origin');
}