| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore(build): upgrade TypeScript to 7 TS 7's root package no longer exposes the compiler API, so the i18n AST scans move to @babel/parser. Remotion 4.0.537 is required for its TS 7-aware bundler; the WebCodecs pre-flight follows Mediabunny 1.61.6 rate control. | 10 天前 | |
perf(bundle): cut the first-load payload from ~900 KB to 247 KB gzip Two independent problems put ~650 KB gzip of JavaScript in front of the first frame that no first screen needs. 1. React shipped inside the Remotion chunk. codeSplitting.groups leaves includeDependenciesRecursively at its default of TRUE, which drags a group's whole dependency closure into it, and the highest-priority group wins. So remotion (priority 20) claimed react and react-dom before the react group (10) could — the react chunk came out empty and the entry chunk imported 2 MB of Remotion just to get React. The project list route has no player on it. Every group here matches the package it is named after and wants only its own modules, so they all opt out of recursive dependency inclusion, the way templates already did. 2. All four locale dictionaries were statically imported. ~560 kB of source across zh/en/it/ru, so each user downloaded and parsed three languages they cannot read. src/i18n/dictRegistry.ts fetches one locale on demand; t()/tData() stay synchronous, reading a snapshot that is replaced rather than mutated, and fall back to the Chinese original — which is also the dictionary key — so the "never go blank" contract holds while a fetch is in flight. main.tsx starts that fetch before the rest of boot so it overlaps, and gates the first render on it, so no frame renders untranslated copy. The remaining languages warm on idle after first paint, keeping the switcher instant. Eager entry payload: 3062 KB raw / ~900 KB gzip -> 847 KB / 247 KB. Behaviour is unchanged. src/i18n/dictRegistry.verify.ts pins the per-locale lookup rules that used to be inlined in locale.ts, including the two that are easy to lose: Italian falls back to English while Russian does NOT (untranslated Russian keys stay Chinese), and the in-flight fallback never yields an empty string. Validation: tsc --noEmit, oxlint, web build, the new verify, locale.verify and template-reference-localization.verify. Browser: cold boot with a Russian dictionary renders Russian at FCP (218 ms) with no Chinese flash, switching EN->IT->RU->ZH applies within one frame, zero console errors. npm test is 103/104; the failure is timeline-target-tools.verify, which fails identically on HEAD with these changes stashed. | 2 个月前 | |
perf(bundle): cut the first-load payload from ~900 KB to 247 KB gzip Two independent problems put ~650 KB gzip of JavaScript in front of the first frame that no first screen needs. 1. React shipped inside the Remotion chunk. codeSplitting.groups leaves includeDependenciesRecursively at its default of TRUE, which drags a group's whole dependency closure into it, and the highest-priority group wins. So remotion (priority 20) claimed react and react-dom before the react group (10) could — the react chunk came out empty and the entry chunk imported 2 MB of Remotion just to get React. The project list route has no player on it. Every group here matches the package it is named after and wants only its own modules, so they all opt out of recursive dependency inclusion, the way templates already did. 2. All four locale dictionaries were statically imported. ~560 kB of source across zh/en/it/ru, so each user downloaded and parsed three languages they cannot read. src/i18n/dictRegistry.ts fetches one locale on demand; t()/tData() stay synchronous, reading a snapshot that is replaced rather than mutated, and fall back to the Chinese original — which is also the dictionary key — so the "never go blank" contract holds while a fetch is in flight. main.tsx starts that fetch before the rest of boot so it overlaps, and gates the first render on it, so no frame renders untranslated copy. The remaining languages warm on idle after first paint, keeping the switcher instant. Eager entry payload: 3062 KB raw / ~900 KB gzip -> 847 KB / 247 KB. Behaviour is unchanged. src/i18n/dictRegistry.verify.ts pins the per-locale lookup rules that used to be inlined in locale.ts, including the two that are easy to lose: Italian falls back to English while Russian does NOT (untranslated Russian keys stay Chinese), and the in-flight fallback never yields an empty string. Validation: tsc --noEmit, oxlint, web build, the new verify, locale.verify and template-reference-localization.verify. Browser: cold boot with a Russian dictionary renders Russian at FCP (218 ms) with no Chinese flash, switching EN->IT->RU->ZH applies within one frame, zero console errors. npm test is 103/104; the failure is timeline-target-tools.verify, which fails identically on HEAD with these changes stashed. | 2 个月前 | |
fix(editor): harden font discovery and preserve text defaults | 26 天前 | |
fix(editor): harden font discovery and preserve text defaults | 26 天前 | |
feat(i18n): mirror the interface language into a server setting Server-authored text that the user reads directly was fixed Chinese (import remedies) or fixed English (the removed failure template), because the server has no navigator or localStorage. The browser now mirrors its locale switch into the non-secret UI_LOCALE setting — once at startup when the stored value differs, and on every switch — and server/ui-locale.ts exposes it with a localized() picker. The import remedies are the first consumer, in zh/en/ru/it; unset keeps the original Chinese so existing installs do not change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 26 天前 | ||
| 26 天前 | ||
| 1 个月前 |