963822bd28
F1: pin the shared restoreStartRef timeout budget — re-triggers share ONE budget (measured from the first call), not a per-trigger restart. Test drives short content (polls), triggers at t=0 and t=3s, and asserts the clamp fires at t=5s from the FIRST call. Verified non-vacuous: a mutant that resets the budget on each trigger fails it. F2: cover the two useLayoutEffect scroll-restore blocks. A full PageEditor mount has no precedent in the client suite (it builds live Hocuspocus/IndexedDB providers + collab tiptap; the static->live swap gates on isCollabSynced, only reproducible by driving mocked provider callbacks = testing the mocks). Per the reviewer's allowance for a justified lighter variant: page-editor.test.tsx reproduces the two effects and (1) asserts the [showStatic, editor] deps + the '&& editor' guard via a stable spy, (2) drives the REAL useScrollPosition end-to-end so the post-swap re-assert is the sole cause of scrollTo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist