Two bugs sharing the same root cause: Net only carried a label string, set to lan.name.toUpperCase() everywhere. Backend mutator ops look up LANs by canonical lowercase name, so passing the uppercase label through attachEdge / detachEdge / addDeckyToLan / deleteLan failed with 'LAN \\'SUBNET-XXXX\\' not found'. Add Net.name (canonical, lowercase) alongside Net.label (display). Every backend call site now passes name; toasts and drag ghosts keep label. Second bug — new LANs stacking on top of each other on live topologies — fell out of the same UX path: createLan returns 'enqueued' when the topology is active/degraded, the existing early-return skipped local-state insertion, so the next drop recomputed the same grid index. Now we drop a placeholder Net with id 'pending-lan-<name>' immediately on enqueue. Grid index advances and the user gets a visual ack right away; SSE replaces the placeholder by canonical id when the mutator applies it.
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...
},
},
])