Two things the documentation section stored and never showed. **History.** Up to 50 revisions per document have been written since the section shipped — on every save, restore, regenerate, scaffold and the notes migration — and nothing reached them. RegenerateDocModal went as far as telling the user the old body "is in its history", which was true and useless: there was no way there. The header now carries a history button; the rail lists each version by what caused it, selecting one replaces the body in place, and Changes turns it into a line diff against the current body. Restore snapshots the body it replaces first, so a restore is itself undoable. A revision's body is fetched only when it is opened — the list carries a size, not the text, which is what RevisionSummary was shaped for. The diff is a plain LCS over lines after the common head and tail are trimmed, with unchanged runs collapsed to gaps: no library, and a pathological pair of long unrelated bodies degrades to "replaced wholesale" rather than building a quarter-million-cell matrix. **Backlinks.** A wiki-link only says where it goes. Every document now lists what points at it, with the line the link was written on and the label it was written as; repeated links from one document collapse into a count. The inversion is answered by the server, because the browser holds no body but the open one — the list endpoint is metadata-only so the tree can badge without downloading the space. doc_backlinks.py therefore mirrors the resolution rules in wikilinks.ts, the way the generator's service_url mirrors serviceUrl.ts, and its tests pin them. The inventory is loaded only when a body actually carries a [[device:…]]. The client-side backlinkIndex goes with it. It was written, tested and never rendered; keeping a second copy of the resolution rules on the side that cannot see every body is only drift. ha-relevant: no
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 (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])