Live topology edits fired one mutation per canvas action. That coupled each edit to an immediate enqueue+apply, which (post-serialization) raced the SSE refetch and duplicated optimistic placeholders, and gave the user no chance to assemble a coherent changeset (add a net AND bridge it) before any of it landed. Live edits now STAGE: each editor primitive records its op and returns immediately; the optimistic placeholders callers already draw are the staged preview. The action button reads UPDATE (n) when live (DEPLOY when pending) and flushes the batch through the slice-1 submit queue — sequential, version-cursored, each awaited to a terminal state, stopping loudly on the first failure with the unapplied remainder kept for retry. REFRESH becomes DISCARD (n) to drop the batch. SSE refetch is paused during a commit so per-mutation applied events don't wipe still-staged placeholders mid-batch; one refetch reconciles at the end. Also fix _dropArchetype, which bailed without an optimistic node on the staged path, leaving a decky added to an uncommitted LAN invisible until UPDATE.
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 Oxc
- @vitejs/plugin-react-swc uses SWC
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...
},
},
])