refactor(settings): split monolithic page into /settings/{users,data,systems} (#190) #192
No reviewers
Labels
No labels
autopilot:pending-human
source:analyste
source:defenseur
source:human
source:medic
status:approved
status:blocked
status:in-progress
status:needs-clarification
status:needs-fix
status:ready
status:review
status:triage
type:bug
type:feature
type:infra
type:refactor
type:schema
type:security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: maximus/Simpl-Resultat#192
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-190-restructure-settings-pages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #190
Summary
Splits the monolithic 12-card SettingsPage into a hub plus 3 thematic sub-pages mounted via a shared SettingsLayout (
<Outlet/>):/settings->SettingsHomePage(3 cards-cluster + PageHelp)/settings/users-> Comptes, Licences, Guide d utilisation (DocsContent inline)/settings/data-> Categories, Sauvegarde, Confidentialite des prix/settings/systems-> Version, Mise a jour (UpdateCard), Historique des versions (ChangelogContent), Journaux + commentairesExtracts
DocsPageandChangelogPagebodies into reusableDocsContent/ChangelogContentcomponents ; the legacy/docsand/changelogroutes become<Navigate replace>redirects to preserve external bookmarks and release-note links.UpdateCardis extracted from the inline updater block for symmetry.TokenStoreFallbackBanneris mounted once at the top ofSettingsLayout(visible across the 4 main settings routes). The two/settings/categories/{standard,migrate}routes stay flat (siblings, not nested) to keep their focused flows free of the banner ; their internal back-links now point to/settings/data.i18n FR + EN gain
settings.{home, users, data, systems, backToHome};docs/architecture.mdtable updated ; CHANGELOG bilingual entry under[Unreleased] > Changed/Modifie.Pure presentation refactor : no new business logic, no Tauri commands, no SQL migrations, all features preserved.
Test plan
npm run build(tsc + vite) greennpm test(vitest) - 3720 tests passcargo checkgreencargo test --lib --tests- 71 tests pass (the doctest inreturn_calculator.rsis pre-existing on main, unrelated)/settings,/settings/users,/settings/data,/settings/systems; verify/docsand/changelogredirect ; verifyCategoriesV1DiscoveryBanner->/settings/categories/standardstill works ; verify the back-buttons on/settings/categories/{standard,migrate}reach/settings/dataThe single 12-card SettingsPage is replaced by a hub at /settings linking to three thematic sub-pages mounted via a shared SettingsLayout (Outlet): /settings SettingsHomePage (3 cards-cluster + PageHelp) /settings/users UsersSettingsPage (Account, License, DocsContent) /settings/data DataSettingsPage (Categories, DataManagement, PriceFetchConsentToggle) /settings/systems SystemsSettingsPage (Version, UpdateCard, ChangelogContent, LogViewer) DocsPage and ChangelogPage are extracted into reusable DocsContent / ChangelogContent components and the standalone /docs and /changelog routes become Navigate redirects to preserve external bookmarks and release-note links. UpdateCard is extracted from the inline updater block for symmetry and testability. TokenStoreFallbackBanner is mounted once in SettingsLayout, surfacing the OS-keychain-fallback warning across the four main routes only. The two existing /settings/categories/{standard,migrate} sub-routes stay flat (siblings of SettingsLayout) to keep their focused flows free of the banner — their internal back-links now point to /settings/data. i18n FR/EN gain settings.{home, users, data, systems, backToHome}; docs/architecture.md and CHANGELOG{,.fr}.md updated. Pure refactor of presentation: no new business logic, no Tauri commands, no SQL migrations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Verdict : APPROVE
Sommaire
Refactor propre de presentation : la
SettingsPagemonolithique de 12 cards est splittee en hub + 3 sous-pages thematiques viaSettingsLayout+<Outlet>. Aucun changement de logique metier, redirects preservant les bookmarks/docs+/changelog, i18n FR/EN a jour, CHANGELOG bilingue +docs/architecture.mda jour, build + 3720 tests vitest + 71 tests cargo verts.Points positifs
DocsContent/ChangelogContent/UpdateCarddeviennent reutilisables/settings/categories/{standard,migrate}volontairement horsSettingsLayout(banner non-desire sur ces flux focused) — bien justifie dans la PR bodyCategoriesMigrationPage,CategoriesStandardGuidePage,ErrorScreen) mis a jour vers/settings/datapartout/docsou/changelogdans le code (les redirects font le boulot pour les bookmarks externes)Suggestions (non bloquantes)
DocsContent.tsx— IntersectionObserver root : l'observer perdait sonroot: containeren passant de la sidebar dediee vers le scroll de<main>(AppShell). Avecroot: undefined, le viewport est utilise — le rootMargin-30% 0px -60% 0pxreste fonctionnel puisque<main>occupe le viewport entier (h-screen overflow-y-auto). A surveiller au smoke manuel : le scroll-spy doit highlighter la bonne section quand on defile dans/settings/users.DocsContent.tsx— TOC pas sticky : la nav TOC est desormais en haut du composant et defile avec le contenu (passticky). Le flux original avait une sidebar fixew-56avec TOC toujours visible. Si l'UX se degrade sur les sections du bas (Reglages, Bilan), envisagerclassName="sticky top-0 z-10 ..."sur le<nav>dans une PR de suivi.SystemsSettingsPage.tsx— version card inline : la version card duplique le pattern de carte directement inline (15 lignes) plutot que via unVersionCardextrait. Coherent avec la taille actuelle, mais a considerer si la carte grossit.Pas de test ajoute : aucun test n'a ete ajoute pour le hub/layout/sous-pages. Pour un refactor de presentation pur c'est defendable, mais un test minimal
renders three section cards with correct linkssurSettingsHomePagecouterait peu et verrouillerait la structure (utile contre les futures regressions de routing).Double padding :
<main>dansAppShellap-6,SettingsLayoutajoute aussip-6. C'est le meme pattern queSettingsPageprecedente (p-6 max-w-2xl mx-auto), donc pas un nouveau bug — mais c'est un total de 48px de padding horizontal sur les sous-pages settings (24+24). Pas bloquant, juste un point a noter.