Skip to content

v0.6.3-beta: Migration UX & Auth Visibility Hotfix - #44

Merged
DeepZone merged 1 commit into
mainfrom
codex/create-v0.6.3-beta-migration-ux-hotfix
May 20, 2026
Merged

v0.6.3-beta: Migration UX & Auth Visibility Hotfix#44
DeepZone merged 1 commit into
mainfrom
codex/create-v0.6.3-beta-migration-ux-hotfix

Conversation

@DeepZone

Copy link
Copy Markdown
Owner

Motivation

  • Existing SQLite databases from pre-v0.6 installs can be missing Alembic state and columns (e.g. created_by_user_id), causing raw SQL errors when saving checks.
  • The system status endpoint needs to reliably report migration state so operators know when to run alembic upgrade head before using checks.
  • The UI lacked clear auth visibility (who is logged in) and a visible logout action which reduced operational clarity.
  • Documentation and troubleshooting for the migration failure must be improved so operators can fix stale schemas safely.

Description

  • Hardened migration reporting in backend/app/core/system_status.py by returning schema_version, migration_head, migration_status and optional migration_message, and treating missing alembic_version with existing tables as behind without raising internal exceptions.
  • Added operational_warnings to build_system_status when the database schema is not up_to_date and bumped the backend system version to v0.6.3-beta.
  • Made check storage resilient by catching sqlalchemy.exc.OperationalError in backend/app/api/routes_checks.py and returning a clear HTTP 503 with migration instructions when the DB is missing created_by_user_id.
  • Frontend: store getMe() as currentUser, show username and role in the Layout, add a visible Logout button and logout() API call, display migration-warning banners in Dashboard and System views, and present a friendly message when the backend indicates migrations are required.
  • Docs and release notes: added troubleshooting steps for table checks has no column named created_by_user_id to docs/operations/database-migrations.md and appended v0.6.3-beta release notes; bumped versions in backend and frontend metadata.
  • Tests: added backend smoke tests that assert migration_status warnings are surfaced and that the check-store path maps the missing-column OperationalError to a migration-related HTTP 503.

Testing

  • Ran backend smoke tests: pytest -q backend/tests/test_api_smoke.py and all tests passed (21 passed).
  • Built the frontend: npm --prefix frontend run build and the production build completed successfully.
  • New/modified backend tests exercising migration-warning and OperationalError handling were executed as part of the test run and passed.

Codex Task

@DeepZone
DeepZone merged commit 7e4831b into main May 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant