Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: V2 desktop starts with an empty Local Storage, so stashed prompts, unsent drafts and UI state from V1 disappear #15032

ClosedAaryan-Kapoor(GitHub profile, opens in a new tab) opened this issue 1 comment

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. On a V1 build, stash a few prompts (composer.stash, Ctrl+S) and leave an unsent draft in a thread's composer.
  2. Update to nightly 0.0.46-nightly.20261003.2610 (first Orchestrator V2 build) and launch it.
  3. Open the stash, and the thread that had the draft.

Expected behavior

Stashed prompts and unsent drafts are still there after the update, or the migration guide (#14871) says they will not carry over and how to recover them.

Actual behavior

The stash is empty and the drafts are gone. Threads, projects and settings migrate fine, so it looks as if only the stash was wiped. Panel layout, in-app browser history and dismissed notices also reset.

Cause: V2 runs from a new Electron profile, t3code-v2 (#12480). resolveUserDataPath copies exactly one file from the V1 profile, Local State, and only on Windows:

https://github.com/pingdotgg/t3code/blob/v0.0.46-nightly.20261003.2610/apps/desktop/src/app/DesktopUserData.ts#L59-L68

Prompt Stash is stored only in the renderer's localStorage (t3code:prompt-stash:v2 in apps/web/src/promptStashStore.ts), and composer drafts likewise (t3code:composer-drafts:v1). localStorage lives inside the profile, so V2 starts with none of it. The server-side migration (state.sqlite → statev2.sqlite) does not cover it, because this state never reaches the server.

On macOS and Linux the function returns the new profile path without copying anything, so the same loss should occur there. I only verified Windows.

Suggested fix:

  • On first V2 launch, import the user-authored keys from the V1 profile's Local Storage: at least t3code:prompt-stash:v2 and t3code:composer-drafts:v1. This needs a read of the V1 LevelDB that tolerates V1 still running, since #12480 deliberately avoids opening V1's locked databases.
  • Installs that have already launched this nightly need the import to run later as well, and to merge with whatever has been stashed in V2 since.
  • Independently, list client-side state under "Not carried over" in #14871. Moving the stash server-side (#7626) would prevent this class of loss in future.

Impact

Major degradation or frequent failure

Version or commit

0.0.46-nightly.20261003.2610 (commit 8ed276c246b6)

Environment

Windows 11 Home 10.0.26200, x64. Nightly channel, updated in place from the previous V1 nightly.

Logs or stack traces

No response

Screenshots, recordings, or supporting files

Evidence (Windows 11)

  • %APPDATA%\t3code-v2 was created at first launch of the nightly. Its Local State is byte-identical to %APPDATA%\t3code\Local State. There is no T3 Code (Alpha) folder on this machine, so #15001 is not involved.
  • %APPDATA%\t3code\Local Storage\leveldb was last written ten minutes before the update and is untouched since. Decoding it offline shows:
    • t3code:prompt-stash:v2 is present with 7 entries (schema version 2, the same version V2 reads)
    • t3code:composer-drafts:v1 is present with drafts for 99 threads, 2 with unsent text
    • 49 keys in total under origin t3code://app
  • %APPDATA%\t3code-v2\Local Storage had no t3code:prompt-stash:v2 key at all after first launch.
  • Other V1 keys left behind: t3code:ui-state:v1, t3code:right-panel-state:v2, t3code:diff-panel-state:v1, t3code:browser-history:v1, t3code:browser-favicons:v1, t3code:provider-update-dismissals:v1, t3code:version-mismatch-dismissals:v1, t3code:theme, and the per-thread t3code:preview-panel-width:* keys.
  • The V1 profile also has an IndexedDB database (t3code_app_0) that is not carried over. I did not inspect its contents.
  • #15017: a comment there reports unsent composer drafts missing after the same upgrade, with the cause unverified. This issue is the storage evidence for that symptom; the stale-database bug in that issue is separate.
  • #15001: same function, different failure (Local State copied from the wrong profile).
  • #12480: introduced the separate V2 profile and the Local State-only import.
  • #7626: make Prompt Stash server-authoritative.
  • #14871: V1 → V2 migration guide.

Workaround

None in the app. The data is intact in %APPDATA%\t3code\Local Storage, so do not delete the old profile. I recovered the entries by decoding that LevelDB offline and re-stashing them by hand.

  1. Aaryan-Kapoor(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Note

    Grok responding on behalf of Julius.

    Triage

    Thanks for the LevelDB evidence, @Aaryan-Kapoor. It lines up exactly with how the desktop profile was split.

    Confirmed on 0.0.46-nightly.20261003.2610. The nightly desktop app uses a new Chromium profile, t3code-v2, and doesn't import the V1 profile's Local Storage. The prompt stash, unsent composer drafts, panel layout, theme, dismissed notices, and in-app browser history all live in Local Storage, so they come up empty. Threads, projects, and server settings live in a separate store, which is why those still show up. Your V1 data wasn't deleted.

    • Packaged V2 always uses t3code-v2. On Windows it copies Local State once and nothing else, and on macOS and Linux it copies nothing (source).
    • That Windows copy is only the safeStorage key file. The test for this path checks that browser databases are not copied (source).
    • The stash and drafts are stored under the localStorage keys t3code:prompt-stash:v2 and t3code:composer-drafts:v1 (stash, drafts). V2 already reads stash schema version 2, so nothing was wiped by a version change; the data just sits in a profile V2 never opens. Current main (3a7058da50) behaves the same way.

    How this relates to the other reports: the merged PR #12480 split the profiles so V1 and V2 can run at the same time. Chromium won't open one profile from two processes, so the V2 profile starts empty on purpose rather than because a copy failed. #15001 is a different Windows failure, where Local State comes from a stale T3 Code (Alpha) folder. You have no Alpha folder, so that isn't what happened here. #15017 is about the server database (statev2.sqlite) being reused from a preview build. The missing drafts mentioned in a comment there are this client-storage gap. The migration guide (#14871) only says cookies and caches don't carry over. It doesn't mention the stash, drafts, or the other Local Storage keys.

    The t3code_app_0 IndexedDB holds client caches such as connection snapshots and favicons, not threads, so leaving it behind doesn't cost you any threads.

    Until there's a fix: keep the V1 profile. Don't delete %APPDATA%\t3code (on macOS that's ~/Library/Application Support/t3code, and on Linux ~/.config/t3code). Stable V1 still shows your stash and drafts. Don't copy Local Storage or IndexedDB into t3code-v2 either: those databases are locked while either app is running, and copying them raw isn't a supported import. Decoding offline, the way you did, is the practical way to get them back.

    Possible fixes: import those Local Storage values into the new profile once, without copying the LevelDB folders. Or update #14871 to say that the stash, unsent drafts, layout, theme, and in-app browser history stay in the V1 profile, and explain how to get them back. Making the stash server-side (#7626) would protect it from future profile changes, but it wouldn't bring back what this upgrade already left behind. Choosing between these is up to the maintainers.

  3. juliusmarminge removed labelsneeds-triage

  4. juliusmarminge added labelsvia-triage

  5. juliusmarminge closed this

Sign in to join this conversation.