Skip to content

[Bug]: case-colliding ProfileMenu paths prevent clean Windows checkouts #4113

Description

@sgoel2be24-cyber

Bug Description

The current dev branch independently tracks two frontend files whose paths differ only by directory capitalization:

  • cognee-frontend/src/ui/Layout/ProfileMenu.tsx
  • cognee-frontend/src/ui/layout/ProfileMenu.tsx

These files contain different Git blobs and different implementations.

On a normal case-insensitive Windows filesystem, both paths resolve to the same physical file. As a result, a fresh checkout of dev immediately appears modified even though the contributor has not edited anything.

A case-insensitive scan of all 2,653 tracked paths found this as the only collision.

Steps to Reproduce

  1. Clone the Cognee repository on a normal Windows NTFS filesystem.

  2. Switch to the latest dev branch:

git switch dev
git fetch upstream
git merge --ff-only upstream/dev
  1. Check the working-tree status:
git status --short
  1. Check the repository's case-sensitivity setting:
git config --get core.ignorecase
  1. List both case-variant paths tracked by Git:
git ls-tree -r --name-only HEAD |
  Where-Object {
    $_ -ieq "cognee-frontend/src/ui/layout/ProfileMenu.tsx"
  }
  1. Observe that Git tracks both capitalization variants while Windows can represent only one physical file.

Expected Behavior

The repository should track only one canonical ProfileMenu.tsx path.

A fresh checkout should produce a clean git status on both case-sensitive and case-insensitive filesystems.

The canonical frontend path should be:

cognee-frontend/src/ui/layout/ProfileMenu.tsx

Actual Behavior

On Windows, core.ignorecase is true, and Git tracks both:

  • cognee-frontend/src/ui/Layout/ProfileMenu.tsx
  • cognee-frontend/src/ui/layout/ProfileMenu.tsx

Because both names resolve to the same physical Windows path, the lowercase implementation is materialized in the working tree while the uppercase index entry expects a different blob.

Therefore, git status --short reports:

 M cognee-frontend/src/ui/Layout/ProfileMenu.tsx

Restoring either spelling cannot make both independently tracked files coexist correctly on the case-insensitive filesystem.

Environment

  • Operating system: Windows 11
  • Filesystem: case-insensitive NTFS
  • Repository branch: dev
  • Local audited commit: 187b96c078c57b5197aba64753757fb18c9ff126
  • Current verified upstream/dev: 4eb3377e0b1d8eb11edb3f97ddc71c5afc37918b
  • core.ignorecase: true
  • Shell: PowerShell
  • API keys used: none
  • External services used: none

The issue also affects WSL repositories stored on Windows-mounted paths such as /mnt/c.

Logs/Error Messages

git status --short:

 M cognee-frontend/src/ui/Layout/ProfileMenu.tsx

git config --get core.ignorecase:

true

Case-insensitive Git tree lookup:

cognee-frontend/src/ui/Layout/ProfileMenu.tsx
cognee-frontend/src/ui/layout/ProfileMenu.tsx

The two independently tracked entries contain different blobs:

cognee-frontend/src/ui/Layout/ProfileMenu.tsx
mode: 100644
blob: 4a83f93d00be0cb0318c62da37a160f4bc6dc984
size: 3,684 bytes

cognee-frontend/src/ui/layout/ProfileMenu.tsx
mode: 100644
blob: 4ac71b16678ab773db60cd6006a51be8c1e72298
size: 6,520 bytes

This is not an application runtime exception. It is a Git working-tree and filesystem path-collision defect.

Additional Context

Current frontend imports use the lowercase @/ui/layout path. No source import was found using the uppercase @/ui/Layout path.

The lowercase component is therefore the canonical implementation, while the uppercase component appears obsolete.

PR #2606 previously renamed PascalCase UI directories to lowercase. The uppercase ProfileMenu.tsx path was later reintroduced through frontend synchronization PR #4099, making this a regression.

Impact includes:

  • fresh Windows checkouts cannot obtain a trustworthy clean git status;
  • contributors may accidentally stage or commit the wrong component;
  • IDEs, formatters, linters, and file watchers may process the aliased path inconsistently;
  • case-sensitive CI can represent both files and therefore may not detect the Windows collision.

I would like to prepare a focused PR that:

  • removes the obsolete uppercase cognee-frontend/src/ui/Layout/ProfileMenu.tsx;
  • preserves the canonical lowercase component and its current behavior;
  • optionally adds a lightweight CI check that rejects case-insensitive tracked-path collisions, if maintainers consider that appropriate.

I will not modify the separate open-source Billing behavior because issue #3315 and existing pull requests already cover that work.

Screenshot 1 — Windows working-tree symptom

On the audited local dev checkout, Windows reports the uppercase path as modified even though no frontend edit was made. The repository uses core.ignorecase=true.

Image

Screenshot 2 — Collision still present in current upstream/dev

The current upstream/dev tree at 4eb3377e0b1d8eb11edb3f97ddc71c5afc37918b independently tracks both capitalization variants with different blob hashes.

Image

Would this focused scope be acceptable, and may I take ownership of the fix?

Pre-submission Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided a clear and detailed description of the bug
  • I have included steps to reproduce the issue
  • I have included my environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions