Composant `<VersionToast/>` monté au root de la SPA qui s'affiche quand l'utilisateur ouvre l'app sur une version plus récente que la dernière qu'il a vue. Mécanique : - Source de vérité = `apps/web/src/version.ts` (constante semver, à bumper manuellement à chaque release, en même temps que l'ajout du .md correspondant dans `apps/landing/src/content/changelog/`). - Comparaison à `localStorage["rubis:last-seen-version"]` au mount. - 1re visite (clé absente) → on enregistre la version courante en silence, pas de toast (sinon spam d'onboarding). - Version identique à la dernière vue → rien. - Version différente → toast Sonner persistant (`duration: Infinity`) avec icône Sparkles rubis et action "Voir les nouveautés ↗" qui ouvre `rubis.pro/changelog#<version>` dans un nouvel onglet. Au moment de l'affichage on enregistre la version comme vue — donc même si l'user ferme sans cliquer, plus de toast pour cette version (il a été informé). - localStorage indisponible (private mode) → fail silent. Version initiale : `1.10.0` (remerciement automatique au client, dernière entrée du changelog). Co-Authored-By: Claude Opus 4.7 <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 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...
},
},
])