Notechondria
Version: 0.1.55 Build Date: 2026-04-22T17:46
What's Changed
Cross-app dedup — AppShellAuthActionsMixin + AuthClient (step 2 of 8)
-
Second shared mixin lands. Six auth action helpers (
register,verify,resendVerification,login,requestPasswordReset,confirmPasswordReset) move out of per-appcore/auth_actions.dartintonotechondria_shared/lib/src/app_shell/app_shell_auth_actions_mixin.dart. Each method's only per-app variation was a log-source prefix (Editor./Planner./Portal.); the mixin reads it from an abstractString get logAppTaggetter the subclass overrides. -
New
AuthClientinterface innotechondria_shared/lib/src/app_shell/auth_client.dart. Each app's existing abstractNotechondriaClientnowimplements AuthClient— so the shared mixin has a typed cursor into the auth endpoints without pulling the entire per-app client contract (which diverges on note / course / attachment surfaces). TheAuthClientsignature is the union of methods the auth and OAuth mixins need:register,verifyEmail,resendVerification,login,requestPasswordReset,confirmPasswordReset,loginWithGoogle,loginWithGithub,bindGoogle,bindGithub,getOAuthConfig,checkSession,logout,getSettings,updateSettings. -
editor_appmixes inAppShellAuthActionsMixin<AppShell>, exposesAuthClient get authClient => widget.clientandString get logAppTag => 'Editor'. The oldcore/auth_actions.dartextension is deleted (130 lines). 27 call sites renamed (_register→register,_verify→verify,_applyAuthPayload→applyAuthPayload, etc.). -
applyAuthPayload+_logouthad to move back fromcore/session.dartinto the_AppShellStateclass body so the class satisfies the mixin's abstractapplyAuthPayloadcontract — Dart extension methods can't fulfill abstract mixin requirements. This trade temporarily grows app_shell.dart by ~150 lines; will be reclaimed in a later round whenAppShellSessionMixinlands and absorbs the body.
Files Changed
frontend/notechondria_shared/lib/src/app_shell/app_shell_auth_actions_mixin.dart(new).frontend/notechondria_shared/lib/src/app_shell/auth_client.dart(new).frontend/notechondria_shared/lib/notechondria_shared.dart— exportsAppShellAuthActionsMixin+AuthClient.frontend/editor_app/lib/core/client.dart— abstractNotechondriaClient implements AuthClient.frontend/editor_app/lib/app_shell.dart—with AppShellLogMixin<AppShell>, AppShellAuthActionsMixin<AppShell>; re-hostsapplyAuthPayload+logoutas concrete overrides.frontend/editor_app/lib/core/auth_actions.dart— deleted.frontend/editor_app/lib/core/session.dart— deleted (body moved intoapp_shell.dart).frontend/editor_app/lib/main.dart— drops the deleted partials.