You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surfaced by the PR #796 inspection (SSR pass); both issues predate that PR but its week-start derivation widens the blast radius from formatting to calendar layout.
createDatePlugin constructs createDate eagerly at plugin-factory time (useDate/index.ts:278-288). At that moment instanceExists() is false, so the watchEffect locale-sync branch never arms and useLocale() is unavailable — the documented "integration with useLocale for automatic locale sync" does not function through the plugin path at all; only the one-shot else branch runs.
Cross-request locale leakage under SSR. The idiomatic shape — export const datePlugin = createDatePlugin({ adapter: new V0DateAdapter() }) at module scope — shares one adapter instance across every request for the server's lifetime. Any write to adapter.locale (whose setter recomputes _firstDayOfWeek and _minimalDays) leaks into concurrent renders: after fix(useDate): derive week start from CLDR data when getWeekInfo is unavailable #796 that changes the calendar's first column and week numbers, not just formatting.
Suggested scope: lazy-construct the context at install time (or per-app), arm the locale sync there, and document "construct the adapter per request under SSR" on the use-date page. index.ssr.test.ts currently has zero firstDayOfWeek coverage — the missing assertions are listed in the inspection notes (Monday/Sunday/Saturday locales, firstDayOfWeek override, two adapters not sharing state, and a renderToString-vs-client grid comparison).
Surfaced by the PR #796 inspection (SSR pass); both issues predate that PR but its week-start derivation widens the blast radius from formatting to calendar layout.
createDatePluginconstructscreateDateeagerly at plugin-factory time (useDate/index.ts:278-288). At that momentinstanceExists()is false, so thewatchEffectlocale-sync branch never arms anduseLocale()is unavailable — the documented "integration with useLocale for automatic locale sync" does not function through the plugin path at all; only the one-shot else branch runs.Cross-request locale leakage under SSR. The idiomatic shape —
export const datePlugin = createDatePlugin({ adapter: new V0DateAdapter() })at module scope — shares one adapter instance across every request for the server's lifetime. Any write toadapter.locale(whose setter recomputes_firstDayOfWeekand_minimalDays) leaks into concurrent renders: after fix(useDate): derive week start from CLDR data when getWeekInfo is unavailable #796 that changes the calendar's first column and week numbers, not just formatting.Suggested scope: lazy-construct the context at install time (or per-app), arm the locale sync there, and document "construct the adapter per request under SSR" on the use-date page.
index.ssr.test.tscurrently has zerofirstDayOfWeekcoverage — the missing assertions are listed in the inspection notes (Monday/Sunday/Saturday locales,firstDayOfWeekoverride, two adapters not sharing state, and a renderToString-vs-client grid comparison).