refactor(home): 校正面 15 个状态从 Home 下沉
Home() useState 66->52, useRef 41->39. Shell-facing fields merge into one object; subtree state lives in useRectificationSurface. Chat props 20->7. Growth contract rebaselined. Zero behavior/copy change.
This commit is contained in:
@@ -35,7 +35,10 @@ test("the rectification surface is revealed once: Case hydration precedes the sw
|
||||
// Panel: one key per binding, snapshot and turns as initial state, later turns as a prop update.
|
||||
assert.match(page, /key=\{`\$\{rectificationSessionId\}-\$\{rectificationCaseId\}`\}/);
|
||||
assert.doesNotMatch(page, /"ready" : "loading"/);
|
||||
assert.match(page, /initialSnapshot=\{rectificationSnapshot\}/);
|
||||
// 原值:initialSnapshot={rectificationSnapshot} 写在 page.tsx JSX
|
||||
// 新值:initialSnapshot: rectificationSnapshot 写在 hook 的 panel
|
||||
// 原因:snapshot 只服务子树,随 panel 下沉
|
||||
assert.match(page, /initialSnapshot: rectificationSnapshot/);
|
||||
assert.match(page, /declaredTime=\{rectificationDeclaredTime\}/);
|
||||
assert.match(wrapper, /initialSnapshot: RectificationCaseSnapshotPayload \| null;/);
|
||||
assert.match(chat, /useState\(initialSnapshot !== null\)/);
|
||||
|
||||
Reference in New Issue
Block a user