Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(mobile): 对齐共享写入入口的路由设备参数

Dash08dea1c7fa6b
diff --git a/apps/mobile/src/__tests__/sessionSwipe.test.ts b/apps/mobile/src/__tests__/sessionSwipe.test.ts
index c17e3b4cc2..29c4264822 100644
--- a/apps/mobile/src/__tests__/sessionSwipe.test.ts
+++ b/apps/mobile/src/__tests__/sessionSwipe.test.ts
@@ -498,7 +498,9 @@ describe('会话元数据写的设备解析(首页与会话页同口径)', () =>
it('首页 / 设备页写路径共用同一解析,回滚同样先释放在途登记', () => {
const source = read('src/session/useSessionListActions.ts');
- expect(source).toContain('resolveSessionWriteDevices(session.id, session)');
+ // PR #6863:详情归档也复用此入口,必须保留路由 RPC 设备覆盖,
+ // 乐观写与回滚仍使用解析出的物理 shard(跨文件设备路由 guard)。
+ expect(source).toContain('resolveSessionWriteDevices(session.id, session, preferredRpcDeviceId)');
expect(source.indexOf('releasePending();')).toBeLessThan(source.indexOf('upsertDeviceSession(shardId'));
});
});