fix: avoid history reclamation during structure-only upgrades
Ordinary database schema upgrades previously ran VACUUM on free pages and showed misleading history-cleanup progress. Separate structure upgrades from required legacy conversions, retaining reclamation intent only for retries within the same startup. Preserve released data without new schema versions or persistent migration markers; Agent and normal writes remain unchanged. Add real SQLite and Worker regressions, bilingual operation-specific startup copy, and migration documentation. Synchronize native Electron drag input with actual resize state without weakening layout assertions. Validation: 47 focused migration tests passed; typecheck, lint and diff checks passed. Final full suite: 5137 passed, 74 skipped, 2 unrelated Electron failures. Both failing Electron tests passed an isolated rerun; full CI remains unverified. Release note: 修复普通数据库结构升级再次整理历史和回收空间的问题;仅在需要转换旧数据时执行相关处理,启动页准确显示当前升级操作。
This commit is contained in:
@@ -48,14 +48,19 @@ it('resizes record columns with native Electron input and preserves desktop widt
|
||||
const click = async selector => { await js('document.querySelector(' + JSON.stringify(selector) + ').click()'); await settle(); };
|
||||
const rect = selector => js('(() => { const r = document.querySelector(' + JSON.stringify(selector) + ').getBoundingClientRect(); return { x: r.x, y: r.y, width: r.width, height: r.height }; })()');
|
||||
const drag = async (selector, delta) => {
|
||||
win.focus(); win.webContents.focus();
|
||||
await wait('document.hasFocus()');
|
||||
const r = await rect(selector); const x = Math.round(r.x + r.width / 2), y = Math.round(r.y + 80);
|
||||
const target = 'document.querySelector(' + JSON.stringify(selector) + ')';
|
||||
const before = await js(target + '.getAttribute("aria-valuenow")');
|
||||
win.webContents.sendInputEvent({ type: 'mouseMove', x, y });
|
||||
await settle();
|
||||
win.webContents.sendInputEvent({ type: 'mouseDown', x, y, button: 'left', clickCount: 1 });
|
||||
await settle();
|
||||
win.webContents.sendInputEvent({ type: 'mouseMove', x: x + delta, y, button: 'left' });
|
||||
await settle();
|
||||
await new Promise(resolve => setTimeout(resolve, 80));
|
||||
await wait('!!document.querySelector(".magic-notes-layout--resizing, .magic-todo-workspace--resizing")');
|
||||
win.webContents.sendInputEvent({ type: 'mouseMove', x: x + delta, y, button: 'left', modifiers: ['leftButtonDown'] });
|
||||
await wait(target + '.getAttribute("aria-valuenow") !== ' + JSON.stringify(before));
|
||||
win.webContents.sendInputEvent({ type: 'mouseUp', x: x + delta, y, button: 'left', clickCount: 1 });
|
||||
await wait('!document.querySelector(".magic-notes-layout--resizing, .magic-todo-workspace--resizing")');
|
||||
await settle();
|
||||
};
|
||||
const key = async (selector, keyCode) => {
|
||||
|
||||
Reference in New Issue
Block a user