Skip to content

🐞 Files on the project sidebar do not update correctly during git checkout, or if updated from Finder or an external editor/source #1974

@suobset

Description

@suobset

Description

If you checkout to a branch that is significantly different from the one you were on, the files in the project sidebar in CodeEdit do not update.

If files are added/removed from Finder, terminal, or any external editor, they do not update the sidebar either (even if the project does not have Git).

Git checkout from the editor itself, from the integrated zsh, or from an external zsh instance does not update files in the project sidebar. This functionality is essential for projects that utilize different branches for various project components.

To Reproduce

  1. Open any project with 2 branches that have different files.
  2. Checkout to a different branch

Even if you remain on the same branch, or don't even have git:

  1. Open any project in CodeEdit
  2. Use Finder or another editor to add a new file

The files do not update on the sidebar. Opening any file that is shared between the two branches work well. Opening a file that does not exist in the new branch (but did in the old branch, and so is present on the sidebar) leads to an infinite load time.

Expected Behavior

Either the sidebar should automatically show the new/updated files, or at least a refresh button should exist to read the directory and update accordingly. Git stash should be properly implemented. Any file in an open buffer that does not exist in the new branch can remain open as an independent file, which can be saved.

Version Information

CodeEdit: Version 0.3.3-alpha (44)
macOS: 15.1.1
Xcode: N/A, installed via .dmg

Additional Context

No response

Screenshots

Original branch

Image

New branch with an infinite loading loop and non-updated sidebar

Image

Files that the sidebar should contain

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🏁 Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions