Notechondria
Version: 0.1.56 Build Date: 2026-04-22T17:49
What's Changed
Cross-app dedup — AppShellOAuthMixin + shared url_strategy (step 3 of 8)
-
Third shared mixin. 225 lines of OAuth launch + callback handling move into
notechondria_shared/lib/src/app_shell/app_shell_oauth_mixin.dart. Two methods exposed:launchOAuth(provider, invitationCode, intent)(stash invitation/intent in SharedPreferences, thenbrowserRedirectto the provider's authorize URL); andhandleOAuthCallback()(parse?code=&state=, run the bind-flow ifintent == 'bind', otherwise call the login-flow and pass the result to the subclass'sapplyAuthPayload). -
Mixin declared
on State<W>, AppShellAuthActionsMixin<W>so it inheritsauthClient,logAppTag, andapplyAuthPayloadfrom the auth mixin without re-declaring them. Two new abstract getters:String? get token(session token, used by the bind-flow's "session expired before redirect" guard) andValueNotifier<String> get splashStatus(drives the splash screen's provider-specific labels). -
notechondria_shared/lib/src/app_shell/url_strategy.darturl_strategy_web.dart— promoted up from each per-appcore/url_strategy*.dartso the three apps share one copy of the browser History API wrappers (push/replace/redirect). Conditional import: the web copy is resolved at compile time whendart.library.htmlis available.
-
editor_app/lib/app_shell.dartadds the new mixin and overridestoken+splashStatus.core/auth_flows.dartshrinks 303 → 90 lines, keeping only the editor-specific deep-link dialog wiring (_openNoteByUuid,_showNoteDialogForDeepLink) and_restoreSession. The 213 lines of OAuth code are gone.
Files Changed
frontend/notechondria_shared/lib/src/app_shell/app_shell_oauth_mixin.dart(new).frontend/notechondria_shared/lib/src/app_shell/url_strategy.darturl_strategy_web.dart(new).
frontend/notechondria_shared/lib/notechondria_shared.dart— exportsAppShellOAuthMixin.frontend/editor_app/lib/app_shell.dart—with AppShellLogMixin, AppShellAuthActionsMixin, AppShellOAuthMixin.frontend/editor_app/lib/core/auth_flows.dart— slimmed.