Notechondria

Version: 0.1.66 Build Date: 2026-04-23T00:00

What's Changed

Bug (root cause) — login overwrote local api_base_url with Django default

  • The user reported "note loading isn't using the backend api set in app preferences". Root cause: at every successful login, applyAuthPayload was reading settings['api_base_url'] from the server response and passing it into _applyLocalAppSettings(...), which called _httpClient.updateBaseUrl(...). The server's creator.api_base_url defaults to http://localhost:9080/api/v1 on Django (see backend/creators/models.py:72), so the moment a newly-created user logged in, the frontend's carefully-set API URL got clobbered back to localhost and every subsequent note/course call hit nothing. The user's changed setting survived in SharedPreferences but was overwritten in memory on every login.
  • Fix: api_base_url is client-side state. Three files (editor_app/lib/app_shell.dart, planner_app/lib/app_shell.dart, portal_app/lib/app_shell.dart) no longer read the server's api_base_url during settings reconciliation — they keep whatever _localSettings['api_base_url'] already had, which came from the user's last explicit save. The server's field stays in the response shape for wire compatibility but is ignored on the read side. Client still PUSHES its local value up to the server for multi-device awareness (no change to the update path).
  • Audited all HTTP call construction in frontend/editor_app/lib/core/http_client.dart — every non- handshake request routes through _uri(path), which reads the mutable _baseUrl, which is mutated ONLY via updateBaseUrl. No raw Uri.parse('http...') leaks outside the handshake probe itself. So as long as updateBaseUrl isn't called with a wrong value, all calls stay on the user's chosen backend.

UX — Verify email button removed from Account settings

  • The standalone "Verify email" OutlinedButton in AuthHub (shared component) is gone. Email verification is a step inside the signup wizard — surfacing it as a top-level account action invited confusion ("do I click this every time I log in?"). The onVerify callback stays on AuthHub and RegistrationWizard because the wizard still needs it mid-flow. Intro text updated to "Sign up or log in. Email verification happens inside the signup wizard; password reset is inside the login dialog."

UX — Forgot password moved into the login dialog

  • The "Forgot password" TextButton used to sit next to Login in AuthHub's button row. Per the owner's spec ("left, same row as Login button") it now lives inside the EmailPasswordDialog action row, leftmost of the Login FilledButton. Implementation: new optional onForgotPassword VoidCallback on EmailPasswordDialog. When set, the dialog renders a third TextButton beside Cancel + Login, disabled during _submitting. AuthHub threads a closure that pops the login dialog and opens PasswordResetDialog on the root navigator.

Splash — all particles at uniform scale

  • 0.1.63 fixed background-particle randomness but left byproduct formulas (CO₂, NADH, FADH₂, GTP) and Acetyl-CoA rendered at ~2× the background-particle bond length, so the cycle-attached particles visibly dwarfed the drifting ones. Fix: both byproduct and Acetyl-CoA draws are now wrapped in a canvas.translate(anchor); canvas.scale(0.5) so the painter's hardcoded bondLen = 14.0 / bondLen = 12.0 coordinates render at the same final pixel size as the 1.0-scale background particles (bl = 7.0 * scale = 7.0). All "particles displayed on the splash screen" now share a visual size; only alpha and position differ.

Files Changed

  • VERSION — bumped 0.1.65 → 0.1.66.
  • frontend/editor_app/lib/app_shell.dart_applyLocalAppSettings post-login block keeps _localSettings['api_base_url'] instead of reading settings['api_base_url']; the else branch that rebuilds serverAppSettings also overrides its api_base_url to the local value.
  • frontend/planner_app/lib/app_shell.dart — same local-wins fix in the post-login path.
  • frontend/portal_app/lib/app_shell.dart — same.
  • frontend/notechondria_shared/lib/src/components/auth_dialogs.dartAuthHub drops the "Verify email" OutlinedButton and the top-level "Forgot password" TextButton; its Login button's onPressed now threads an onForgotPassword closure into EmailPasswordDialog. EmailPasswordDialog gains the optional onForgotPassword prop and renders a third TextButton in the action row. Intro text updated.
  • frontend/notechondria_shared/lib/src/components/splash_painter.dart — byproduct formulas and Acetyl-CoA drawn inside a canvas.scale(0.5) block so they match background particle size.

Notes

  • The backend's creator.api_base_url field is now effectively informational from the client's perspective. Dropping it from the auth_payload response entirely is a cleaner fix but needs a migration and a wider shape audit; tracked in the existing "shared HTTP refactor" TODO rather than piled on here.
  • The 0.5 scale factor for byproducts + Acetyl-CoA is a constant in two places in splash_painter.dart. If you tune background particles up/down later (e.g. bump SplashParticle.size away from 1.0), the byproduct scale should move inversely to keep the uniform appearance.