mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 14:19:04 +00:00
fix: settle live editor frames deterministically
Issue: #460 User-Visible: yes
This commit is contained in:
@@ -115,8 +115,16 @@ export const LOW_HEADROOM_WARNING_BYTES = 15_000;
|
||||
* состояние после pan/resize. После исправления initial-граф занимает
|
||||
* 296 717 Б gzip: 1 283 Б сверху и 717 Б до нижней границы полосы. Общий
|
||||
* бюджет 300 000 Б не меняется; долг ленивого выноса #367 остаётся видимым.
|
||||
*
|
||||
* 2026-09-05, #460: полоса перецентрирована 298 000 → 298 500 без изменения
|
||||
* общего бюджета. Продуктовый код задачи находится в ленивом editor-графе,
|
||||
* однако новые content hash и имя динамического чанка сдвинули initial gzip
|
||||
* 297 496 → 297 503 Б. Старый факт уже оставлял всего 504 Б до верхней границы,
|
||||
* то есть следующий семибайтный шум нарушил обязательный запас >500 Б.
|
||||
* Новый центр оставляет 997 Б сверху и 1 003 Б снизу; бюджет 300 000 Б и
|
||||
* предупреждение о малом запасе не меняются.
|
||||
*/
|
||||
export const INITIAL_VIEW_GZIP_CEILING = 298_000;
|
||||
export const INITIAL_VIEW_GZIP_CEILING = 298_500;
|
||||
export const INITIAL_VIEW_CEILING_BAND = 2_000;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5981,6 +5981,28 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: '',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'live-editor-settlement-runs-ahead-of-paint',
|
||||
guard: 'node --test --test-name-pattern="live editor settlement waits" test/live-editor.test.mjs',
|
||||
because: 'the explicit live-editor barrier must resolve only after the scheduled DOM paint; '
|
||||
+ 'an eager promise recreates the nondeterministic preview snapshot from #460',
|
||||
patches: [{
|
||||
file: 'src/live-editor.ts',
|
||||
find: ' return new Promise((resolve) => state.waiters.push({ revision, resolve }));',
|
||||
replace: ' return Promise.resolve();',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'live-editor-smoke-falls-back-to-double-raf',
|
||||
guard: 'node --test --test-name-pattern="browser smokes use the explicit" test/live-editor.test.mjs',
|
||||
because: 'a fixed number of animation frames is a timing guess, not evidence that the live '
|
||||
+ 'editor applied its latest projection (#460)',
|
||||
patches: [{
|
||||
file: 'demo/smoke_furniture.mjs',
|
||||
find: ' const settleLive = () => c._editorRuntime?._whenLiveEditorSettled() ?? c.updateComplete;',
|
||||
replace: ' const settleLive = () => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'pointer-move-queue-keeps-first-move',
|
||||
guard: 'node --test test/live-editor.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user