Skip to content

[Bug]: Same-path file type changes crash diff view with duplicate CodeView ID #12244

Description

@NachikethReddyY

Before submitting

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

Area

apps/web

Steps to reproduce

  1. Create a Git repository containing a regular file named AGENTS.md and commit it.

  2. Replace that file with a symlink at the same path, for example:

    rm AGENTS.md
    ln -s core-files/AGENTS.md AGENTS.md
  3. Confirm git diff -- AGENTS.md contains two records for the same path: a deleted regular file (100644) and a new symlink (120000).

  4. Open the project/thread in T3 Code and open the working-tree diff.

This also reproduces with any same-path Git file type change; the filename is not significant.

Expected behavior

The diff view should render the file type change, ideally as one modified file, without crashing the thread.

Actual behavior

The entire thread route shows Something went wrong and becomes unusable. Reloading reproduces the crash.

Git correctly represents this type change as separate delete and add patch records. T3 parses both records, then assigns both the same CodeView ID derived from the old/new path pair: AGENTS.md\0AGENTS.md. CodeView.setItems rejects the duplicate ID.

Impact

Blocks work completely

Version or commit

T3 Code (Nightly) 0.0.43-nightly.20260917.1851

Environment

macOS 27.0 (26A428), Apple Silicon; T3 Code desktop Nightly; Git 2.55.0

Logs or stack traces

Error: CodeView.addItem: duplicate id "AGENTS.md\0AGENTS.md"
    at e.appendItemsInternal (t3code://app/assets/diffFileContents-DyQONavv.js:1:18198)
    at e.setItems (t3code://app/assets/diffFileContents-DyQONavv.js:1:17809)
    at t3code://app/assets/diffFileContents-DyQONavv.js:1:49680

Screenshots, recordings, or supporting files

file-4bd2a23441746d6dc6d49eff766aafcd.png

Workaround

Temporarily keep the path as a regular file, or inspect the diff outside T3 Code. Reloading the app does not help while the same type-change diff is present.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Sep 17, 2026
  2. juliusmarminge commented on Sep 17, 2026

    @juliusmarminge
    Member

    Duplicate of #11074 — same CodeView crash when a same-path Git file type change (e.g. regular file → symlink) produces delete+add patch records that share one CodeView ID (path\0path), so CodeView.setItems rejects the duplicate.

    Tracking continues on #11074.

  3. added
    duplicateThis issue or pull request already exists
    and removed
    needs-triageIssue needs maintainer review and initial categorization.
    on Sep 17, 2026
  4. juliusmarminge commented on Sep 17, 2026

    @juliusmarminge
    Member

    Closing as duplicate of #11074.

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