feat(webui): polish sidebar and session transitions (#5393)

This commit is contained in:
chengyongru
2026-08-14 17:03:11 +08:00
committed by GitHub
parent 057c5e849b
commit 221e8a4e4a
17 changed files with 1152 additions and 560 deletions
+25
View File
@@ -120,6 +120,31 @@ describe("ThreadMotionCoordinator", () => {
});
});
it("reconciles observed layout growth before the next paint", () => {
const {
camera,
coordinator,
frames,
scheduler,
advanceFrame,
setGeometry,
} = motionHarness();
coordinator.resumeAutoFollow();
advanceFrame();
camera.jumpTo.mockClear();
scheduler.cancel.mockClear();
setGeometry({ scrollTop: 1_400, scrollHeight: 2_054 });
coordinator.invalidateGeometry();
coordinator.reconcileObservedGeometry();
expect(camera.jumpTo).toHaveBeenCalledWith(1_554);
expect(scheduler.cancel).toHaveBeenCalledTimes(1);
expect(frames).toHaveLength(0);
expect(coordinator.snapshot()).toMatchObject({ measurementPending: false });
});
it("pins repeated output growth on each authoritative geometry frame", () => {
const {
camera,