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-app core/auth_actions.dart into notechondria_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 abstract String get logAppTag getter the subclass overrides.

  • New AuthClient interface in notechondria_shared/lib/src/app_shell/auth_client.dart. Each app's existing abstract NotechondriaClient now implements 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). The AuthClient signature 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_app mixes in AppShellAuthActionsMixin<AppShell>, exposes AuthClient get authClient => widget.client and String get logAppTag => 'Editor'. The old core/auth_actions.dart extension is deleted (130 lines). 27 call sites renamed (_registerregister, _verifyverify, _applyAuthPayloadapplyAuthPayload, etc.).

  • applyAuthPayload + _logout had to move back from core/session.dart into the _AppShellState class body so the class satisfies the mixin's abstract applyAuthPayload contract — 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 when AppShellSessionMixin lands 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 — exports AppShellAuthActionsMixin + AuthClient.
  • frontend/editor_app/lib/core/client.dart — abstract NotechondriaClient implements AuthClient.
  • frontend/editor_app/lib/app_shell.dartwith AppShellLogMixin<AppShell>, AppShellAuthActionsMixin<AppShell>; re-hosts applyAuthPayload + logout as concrete overrides.
  • frontend/editor_app/lib/core/auth_actions.dart — deleted.
  • frontend/editor_app/lib/core/session.dart — deleted (body moved into app_shell.dart).
  • frontend/editor_app/lib/main.dart — drops the deleted partials.