Notechondria

Version: 0.1.21 Build Date: 2026-04-15T01:00

What's Changed

Frontend — shared UI extracted into notechondria_shared package (URGENT)

  • New frontend/notechondria_shared/ Flutter package, consumed by editor / planner / portal via path: ../notechondria_shared. Each app's lib/main.dart adds one library-level import (package:notechondria_shared/notechondria_shared.dart) so every existing part of notechondria_frontend; file inherits the shared symbols transparently.

  • Symbols moved to the shared package (and dropped from each app):

    SymbolWhat
    ActionFeedbacksuccess/failure feedback model
    ApiDebugSnapshotlast-API-response snapshot model
    showBlurDialog<T>gaussian-blurred backdrop dialog helper
    formatCompactTimestampday-of-week / MM/DD / YY/MM/DD formatter
    SidebarItemwide-layout sidebar row (overflow-safe)
    ConfirmWithDelayDialogdestructive-action delay confirmation
    ApiDebugCard, ApiDebugSummarydebug-log API surface
    ErrorStateViewfull-page error + retry surface
    SplashScreencitric acid cycle splash (now takes appVersion)
    AuthHub + 5 dialog classes + FeedbackTextaccount / login / verify / password reset / sign-up
    AppPreferencesCarddefault-editor + theme-preset + theme-mode + API base URL rows, with optional extrasBuilder slot for app-specific rows
  • Underscore prefixes were stripped on every symbol that's now visible across packages (e.g. _ApiDebugCardApiDebugCard, _AuthHubAuthHub). Internal helpers and State classes that stay file-local in the shared package keep their underscore.

  • Settings UI changes (deliberate, per "synchronize across apps" decision):

    • Planner gains a "Default editor" dropdown in App preferences. The _editorMode field was already wired in planner state but never surfaced in the UI; the shared AppPreferencesCard now surfaces it consistently in all three apps.
    • Portal's editor mode dropdown moves out from behind the is-authenticated guard and into App preferences alongside the theme rows.
    • Portal's editor-mode option list narrows from {G, B, P} to {P, G} to match the editor-app canonical set. The block-editor option ('B') was already deprecated.
    • Portal and planner auth dialogs gain the gaussian-blurred dialog backdrop (via the shared showBlurDialog helper). They were previously falling through to plain showDialog; editor's helper is now the canonical one.
  • docs/TODO.md "Global reusable components" URGENT item is marked done.

  • frontend/AGENTS.md development rule #3 updated: shared widgets live in notechondria_shared/, not copy-pasted between apps. Standard verification block adds the notechondria_shared pub-get + analyze step.

  • docs/index.md repo map and §4 "Frontend verification reality" + §6 "Open work" reflect the shared package.

Files Changed

New

  • frontend/notechondria_shared/pubspec.yaml
  • frontend/notechondria_shared/analysis_options.yaml
  • frontend/notechondria_shared/lib/notechondria_shared.dart
  • frontend/notechondria_shared/lib/src/models/action_feedback.dart
  • frontend/notechondria_shared/lib/src/models/api_debug_snapshot.dart
  • frontend/notechondria_shared/lib/src/utils/blur_dialog.dart
  • frontend/notechondria_shared/lib/src/utils/compact_timestamp.dart
  • frontend/notechondria_shared/lib/src/components/auth_dialogs.dart
  • frontend/notechondria_shared/lib/src/components/debug_widgets.dart
  • frontend/notechondria_shared/lib/src/components/error_state.dart
  • frontend/notechondria_shared/lib/src/components/navigation.dart
  • frontend/notechondria_shared/lib/src/components/splash_screen.dart
  • frontend/notechondria_shared/lib/src/settings/app_preferences_card.dart
  • docs/versions/0.1.21.md (this file)

Deleted

  • frontend/editor_app/lib/components/auth_dialogs.dart
  • frontend/{editor,portal,planner}_app/lib/components/navigation.dart
  • frontend/{editor,portal,planner}_app/lib/components/debug_widgets.dart
  • frontend/{editor,portal,planner}_app/lib/components/error_state.dart
  • frontend/{editor,portal,planner}_app/lib/components/splash_screen.dart

Modified

  • frontend/{editor,portal,planner}_app/pubspec.yaml — adds notechondria_shared: {path: ../notechondria_shared}.
  • frontend/{editor,portal,planner}_app/lib/main.dart — drops the five part 'components/X.dart'; lines for the moved widgets and adds the package import.
  • frontend/{editor,portal,planner}_app/lib/core/client.dart — drops ActionFeedback and ApiDebugSnapshot definitions.
  • frontend/{editor,portal,planner}_app/lib/core/helpers.dart — drops _formatCompactTimestamp; editor also drops _showBlurDialog.
  • frontend/{editor,portal,planner}_app/lib/app_shell.dart_SidebarItemSidebarItem, _ConfirmWithDelayDialogConfirmWithDelayDialog, _SplashScreenSplashScreen (now passes appVersion: _kAppVersion).
  • frontend/{editor,portal,planner}_app/lib/modules/settings.dart — inlined preference rows replaced by AppPreferencesCard(...); portal and planner shed ~815 lines each by deleting their inlined copies of the auth-dialog stack.
  • frontend/{portal,planner}_app/lib/modules/activity.dart_FeedbackTextFeedbackText reference sweep.
  • VERSION — bumped 0.1.20 → 0.1.21.
  • frontend/AGENTS.md — "Current shape" lists notechondria_shared/, development rule #3 updated, verification block adds shared-package step.
  • docs/index.md — repo map + §4 + §6 reflect the shared package.
  • docs/TODO.md — URGENT "Global reusable components" item marked done.

Notes / follow-ups

  • The bug fixes from 0.1.20 (invalid-token session-clear, bind-without-token short-circuit) still need to be replicated from editor's app_shell.dart into planner / portal. The app_shell.dart files are still per-app and were not touched this round; tracked in docs/TODO.md Bugs section.
  • Per-app _themePresetEntries constants in core/helpers.dart are now unused but left in place to keep this round's diff scoped to the four widgets the user named.
  • Several pre-existing analyzer warnings (surfaceVariant deprecated, withOpacity deprecated, BuildContext across async gaps, use_string_in_part_of_directives, _StatChip dead in planner) were carried over verbatim and not addressed — they predate this round and would inflate the diff with unrelated churn.