hunk.code_window:   return null;
   }
   /**
    * subscribe LiveData and return the value.
    */
   export function useLiveData<Input extends LiveData<any> | null | undefined>(
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit: function undefinedGetSnapshot() {
     return undefined;
   }
  
hunk.file_path: packages/common/infra/src/livedata/react.ts
hunk.type: add
file: import { patchDataEnhancement } from '@affine-test/kit/e2e-enhance/initializer';
  import { SnapshotStorage } from '@affine-test/kit/e2e-enhance/snapshot';
  import { test } from '@affine-test/kit/playwright';
  import {
    clickNewPageButton,
    waitForEditorLoad,
  } from '@affine-test/kit/utils/page-logic';
  
  test.beforeEach(async ({ page }) => {
    await patchDataEnhancement(page);
  });
  
  test('record 0.7.0-canary.18 legacy data', async ({ page }) => {
    await page.goto('http://localhost:8081/');
    await waitForEditorLoad(page);
    await clickNewPageButton(page);
    const locator = page.locator('v-line').nth(0);
    await locator.fill('hello');
  
    const localStorageData = await page.evaluate(() =>
      window.readAffineLocalStorage()
    );
    const { idbData, binaries } = await page.evaluate(() =>
      window.readAffineDatabase()
    );
  
    const snapshotStorage = new SnapshotStorage('0.7.0-canary.18');
    await snapshotStorage.write({
      idbData,
      localStorageData,
      binaries,
    });
  });
  