Skip to content

Git diff view crashes with "Checkpoint ref is unavailable for turn" and shows no patch #225

Description

@alfredmouelle

Summary

The Git diff view fails for some historical turns because the app cannot resolve the checkpoint reference for that turn.

Instead of rendering the patch, the diff panel throws an error and shows No patch available for this selection.

Error

Error: Checkpoint unavailable for thread 202ca412-9494-47c2-b514-8a914c613ef1 turn 3: Checkpoint ref is unavailable for turn 3.
    at Array.<anonymous> (file:///Applications/T3%20Code%20(Alpha).app/Contents/Resources/app.asar/apps/server/dist/index.mjs:3174:41)
    at Effect.fn (Alpha)
    at Effect.fn (definition) (Alpha)

Where It Happens

Git diff view / patch viewer when selecting a previous turn in a thread.

Steps to Reproduce

  1. Open a thread with multiple turns.
  2. Make sure some turns contain file edits and/or commits.
  3. Open the Git diff view.
  4. Select an older turn from the turn history.
  5. In my case, selecting turn 3 triggers the issue.

Actual Behavior

  • The right panel shows a runtime error:
    Checkpoint unavailable for thread ... turn 3
  • The patch/diff is not rendered
  • The UI displays:
    No patch available for this selection.

Expected Behavior

  • The app should display the patch for the selected turn
  • If the checkpoint reference is missing, the app should fail gracefully with a clear fallback state instead of surfacing a runtime error

Additional Context

This appears to be caused by the diff viewer assuming that every historical turn has a valid checkpoint reference.

Possible explanations:

  • checkpoint refs are not persisted for all turns
  • checkpoint refs may be pruned/cleaned up while the turn history remains visible
  • the diff viewer does not handle missing checkpoint refs defensively

Environment

  • App: T3 Code (Alpha)
  • Platform: macOS desktop app (M1 Pro)

Notes

The thread still exists and is navigable, but the Git diff view cannot load the patch for that specific historical turn.

I can provide a screenshot as well if useful.

Image

Activity

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

    bugSomething is broken or behaving incorrectly.duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions