Skip to content

[Bug]: Desktop shows only the logo during long database migrations, so the app looks frozen after an update #37129

Closed as duplicate

Description

@stefanofa

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Use the macOS desktop app with Local environment on and a large state database (statev2.sqlite is 68 GB here).
  2. Update from 0.1.9-nightly.20261111.4501 to 0.1.10-nightly.20261115.4723. This build adds 14 migrations (81 to 94), several of which build an index over orchestration_v2_projection_turn_items.
  3. Open the app after the update.

Expected behavior

While the backend runs migrations, the window says so: something like "Upgrading database (migration 3 of 9)", a progress bar or spinner, and a note not to quit. If a migration is slow, the user knows the app is working and not stuck.

Actual behavior

The window shows only the T3 logo on a blank background, with no spinner, text, or progress, for as long as the migrations take. Here that was about 11.5 minutes of migration work, and about 15 minutes from update to a usable app. It looks frozen, so I quit and reopened it. Quitting interrupts the running migration, which then starts over from scratch on the next launch, so the wait gets longer.

The information needed to show progress already exists:

  • The server logs Running database migrations, then Upgrading database with migration and progress: "N of M" annotations before each migration (runMigrations in apps/server, packages/shared/src/databaseMigrationLog.ts).
  • The desktop already reads that output: onReadinessFailure in apps/desktop/src/backend/DesktopBackendManager.ts calls isRunningDatabaseMigrations(outputTail) and logs "backend is still migrating its database; waiting".
  • That signal is only used to avoid reporting a startup failure. It never reaches the window. The connecting splash in apps/desktop/src/window/DesktopWindow.ts is only shown for WSL-only setups, and it has no migration state either.

Suggested fix: forward the migration progress the desktop already parses (current migration, N of M, elapsed time) to whatever window is showing during startup, and render it with a loader and a short "Upgrading database, don't quit" message. A warning on quit while migrations are running would also stop the restart-from-scratch loop.

Impact

Major degradation or frequent failure

Version or commit

0.1.10-nightly.20261115.4723 (upgraded from 0.1.9-nightly.20261111.4501)

Environment

macOS 27.2.1, Apple M3 Max, 36 GB RAM, desktop app (Nightly), Local environment on

Logs or stack traces

server.trace.ndjson, local time
10:19:31  old backend shuts down for the update
10:19:39  Migrator 81_ProjectionMessageSearchText        14 s
10:19:53  Migrator 82_TurnItemConversationIndex starts; app quit about 3 min later because it looked stuck, work lost
10:23:15  relaunch, Migrator 82_TurnItemConversationIndex 158 s (restarted from scratch)
10:25:54  Migrator 83_CommandReadIndexes                  79 s
10:27:14  Migrator 84_LastExecutedRunIndex                 1 s
10:27:15  Migrator 85_TurnItemCounts                       8 s
10:27:22  Migrator 86_QueuedTurnInputIndex               128 s
10:29:30  Migrator 87_ProjectionProjectsCustomTitle        0 s
10:29:30  Migrator 88_TurnItemTypeStatusIndex             32 s
10:30:04  Migrator 89_ShellThreadReadIndexes               2 s
10:30:06  Migrator 90_AuthConnectDevices                   0 s
10:30:06  Migrator 91_AuthConnectDeniedRequests            0 s
10:30:06  Migrator 92_QueuedTurnInputIndexJsonValid      126 s
10:32:13  Migrator 93_ProviderTurnAttemptIndex             1 s
10:32:14  Migrator 94_TurnItemMessageOrdinalIndex        148 s
10:34:51  backend ready, /.well-known/t3/environment returns 200

desktop.trace.ndjson, the whole time
GET http://127.0.0.1:3773/.well-known/t3/environment -> 503, every 100 ms

Screenshots, recordings, or supporting files

What the window shows for the whole migration: the T3 logo centered on a blank window, nothing else.

Workaround

Leave the app open until migrations finish. To check progress, watch Migrator spans in ~/.t3/userdata/logs/server.trace.ndjson.

Related issues

#23372 is a different cause (a stuck write transaction during startup recovery, no window at all), but has the same symptom: the user gets no feedback while the backend is not ready.

F9DA36EE-AAF9-4E9C-AAC1-8BC790AF0A60

Activity

  1. juliusmarminge commented on Nov 15, 2026

    @juliusmarminge
    Member

    This is the same problem as #35995, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions