Notechondria
Version: 0.1.23 Build Date: 2026-04-15T03:00
What's Changed
Frontend — splash byproducts as structural formulas
-
The four cycle byproducts (CO2, NADH, FADH2, GTP) previously drawn
as English-name text (
_drawText) are now rendered as minimal skeletal structural formulas by a new_KrebsCyclePainter._drawByproductFormula.- CO2: O=C=O with two visible double bonds.
- NADH: pyridine-like hexagon with ring N and the nicotinamide -C(=O)NH2 substituent + reduced-ring H.
- FADH2: two fused hexagons (isoalloxazine stub) with N and =O side substituents and the two reduced-ring Hs.
- GTP: purine (fused hexagon + pentagon) with three P circles (alpha, beta, gamma) linked by phosphate-bridge lines. These drawings are schematic (not IUPAC-complete) but they satisfy the "no English text" intent.
- Byproduct flight distance / peak travel bumped slightly so the larger formula drawings fit clear of the active-metabolite glyph.
Frontend — debug log window (shared package)
-
New shared module
notechondria_shared/lib/src/components/debug_log.dartowns the debug log contract:DebugLogLevelenum:error | warning | info | debug.DebugLogEntry: timestamped, level-tagged, source-tagged message with an optionaldurationMs(for timed backend calls). Persisted form is[iso] [L] source \u2014 message (Xms); legacy unprefixed strings are round-tripped as Debug-level entries.DebugLogController:ChangeNotifierholding up to 200 entries plus aMap<String, Object?>cache provider callback.DebugLogCard: rendered-log list with per-level color chips, a level-filter chip row (defaults to Debug = show everything), and an embedded mini-terminal supportingls,cd <key>,cd ..,pwd,clear, andhelp. The terminal navigates the in-memory cache snapshot the host app binds to its controller (maps -> list keys, lists -> numeric indices, leaves print a one-line summary).
-
flutter/services(Clipboard) is imported by the new module so the built-in Copy logs button falls back to clipboard when the host does not supply anonCopyLogshandler. -
Exported from
notechondria_shared.dartbarrel.
Frontend — per-app wiring
-
editor_app,planner_app,portal_appeach declare aDebugLogController _logControllerfield, dispose it, and bind its cache provider to a new_snapshotLocalStore()method that mirrors the six_LocalAppStorebuckets (settings,drafts,courses,stats,cache,logs) plus a redactedsessionentry (token_present+ the profile, never the raw token). -
Each app's
_appendUiLog(String)is preserved as a thin Info-level wrapper and now also appends aDebugLogEntryto_logController. A richer_log({level, source, message, durationMs})method is added on the same class so new code can emit structured entries. -
Editor adds a
_timed<T>(String source, Future<T> Function())helper that wraps a backend call, logs duration at Debug level on success and at Error level on failure, and rethrows. Used to wrap the four high-signal bootstrap calls insideEditor._loadInitialData(getFrontPage,getCourses,getCourseNotes,listNotes). The bootstrap completion line now readsInitial Editor._loadInitialData data loaded (N categories, M notes).— replacing the formerInitial data loaded.line per the TODO's "useInitial <what class>, <what function> data loaded" ask. - Planner and portal use the lighter-touch wiring only (controller + cache provider + settings widget swap). No per-request timing instrumentation this round.
Frontend — settings surface
-
Each app's
_SettingsPagegained an optionaldebugLogController: DebugLogController?parameter. When supplied the "Debug log" card renders the sharedDebugLogCard; otherwise the previous string-list view is preserved so the widget stays drop-in compatible. -
Each
app_shell._SettingsPage(...)call site now passesdebugLogController: _logController.
Files Changed
New
frontend/notechondria_shared/lib/src/components/debug_log.dartdocs/versions/0.1.23.md(this file)
Modified
frontend/notechondria_shared/lib/notechondria_shared.dart— exportsDebugLogCard,DebugLogController,DebugLogEntry,DebugLogLevel.frontend/notechondria_shared/lib/src/components/splash_screen.dart— replaces byproduct text labels with_drawByproductFormula.frontend/editor_app/lib/app_shell.dart— new_logController+_log+_timed+_snapshotLocalStore;_appendUiLogrewritten as a wrapper;_loadInitialDatawraps 4 client calls with_timed; the "Initial data loaded" line now names class + method; settings call site passesdebugLogController.frontend/editor_app/lib/modules/settings.dart— newdebugLogControllerparam;_buildDebugSectionshort-circuits toDebugLogCardwhen available.frontend/planner_app/lib/app_shell.dart— same controller wiring.frontend/planner_app/lib/modules/settings.dart— same settings swap.frontend/portal_app/lib/app_shell.dart— same controller wiring.frontend/portal_app/lib/modules/settings.dart— same settings swap.VERSION— 0.1.22 -> 0.1.23.docs/TODO.md— completed debug-log items removed; splash byproduct item removed.
Verification
notechondria_shared:flutter analyze— no new errors (2 pre-existingsurfaceVariantdeprecations unchanged).- Each of
editor_app/planner_app/portal_app:flutter analyze— issue count unchanged vs 0.1.22 (all infos / pre-existing warnings; no new errors).flutter test test/smoke_test.dart -r compact— passes.
Notes / follow-ups
- Planner / portal still emit mostly Info-level
_appendUiLogstrings; per-request timing instrumentation is editor-only this round. Adding_timedwrappers in planner/portal bootstrap is a straightforward follow-up when those apps' bootstrap surface stabilizes. - The terminal's
ls/cdnavigates the in-memory_LocalAppStorebuckets only (not the browser filesystem). Log entries from Debug-level timed calls use shortClassName._methodsource strings; individual call sites can adopt that convention incrementally. - Note-view local-category delete semantics remain pending in
docs/TODO.md(next round). - Planner / portal
app_shell.dartstill needs the 0.1.20 editor_app invalid-token session-clear and bind-without-token short-circuit replicated (pre-existing bug fromdocs/TODO.md).