yavsc/src
Paul Schneider bf82362f9b postIt: SettingsPage is a singleton, navigation is idempotent
Two related changes that close the loop on the SettingsPage
push semantics.

1. The SettingsPage used to be registered as Transient. Each
   click on the Paramètres button resolved a fresh instance,
   re-bound it to the Settings singleton, and pushed it onto
   the navigation stack. Repeated clicks accumulated stacked
   instances, each fully bound, and the user had to tap Back
   N times to leave. The fix is to register the page as a
   Singleton in the DI container. There is now one and only
   one SettingsPage ContentPage for the lifetime of the app:
     - its DataContext is wired once, at composition time
       (just after the ViewLocator is added to DataTemplates),
       not on every push;
     - the OpenSettingsRequested handler is a pure navigation
       concern, with no DI resolution and no rebinding;
     - the in-memory Settings state is preserved across visits
       (any in-flight edit stays in the same instance).

2. The OpenSettingsRequested handler is guarded so that if the
   SettingsPage is already at the top of NavigationStack, the
   push is a no-op. NavigationPage.PushAsync does not
   deduplicate; without the guard, calling it twice with the
   same instance pushes it a second time, and the user has to
   tap Back twice to leave. The guard is a reference comparison
   on NavigationStack[Count - 1] against the singleton
   instance, which is correct precisely because the page is
   a singleton.

doc/architecture/postit.md is updated to match: the DI table
reflects the new lifetime, and the 'Garde anti-empilement'
section is rewritten from 'to be implemented' to the actual
implementation, including the rationale for reference
comparison and the cross-dependency between the singleton
lifetime and the guard.

The Settings-singleton invariant (in the same doc) is
unchanged: Settings is still a singleton, and adding a
transient override would still be the bug it always was.
The new SettingsPage singleton sits alongside it cleanly.

Build: 0 errors. Tests: 3/3 SettingsLoadTests green.
2026-07-09 22:00:00 +01:00
..
cli Exploiting GitVersion 2026-06-28 14:11:26 +01:00
PostIt postIt: SettingsPage is a singleton, navigation is idempotent 2026-07-09 22:00:00 +01:00
PostIt.Tests simpler 2026-07-08 23:16:16 +01:00
Yavsc.Abstract tests 2026-07-06 00:47:35 +01:00
Yavsc.Api Potential fix for pull request finding 'CodeQL / Missing cross-site request forgery token validation' 2026-07-06 00:57:47 +01:00
Yavsc.Blogs GET posts [dev] 200 2026-07-08 22:46:46 +01:00
Yavsc.Blogs.Tests test(blogs): real JwtBearer in fixture, drop X-Test-Role bypass 2026-07-06 23:29:51 +01:00
Yavsc.Org test(yavsc.org): cover the kid derivation in ComputeKid 2026-07-09 20:28:58 +01:00
Yavsc.Org.Tests test(yavsc.org): cover the kid derivation in ComputeKid 2026-07-09 20:28:58 +01:00
Yavsc.Server GET posts [dev] 200 2026-07-08 22:46:46 +01:00
Yavsc.Tests.Shared test(blogs): real JwtBearer in fixture, drop X-Test-Role bypass 2026-07-06 23:29:51 +01:00