zed icon indicating copy to clipboard operation
zed copied to clipboard

Git: gutters stopped working

Open ravshansbox opened this issue 6 months ago • 7 comments

Summary

Git gutters stopped working after 0.185

Description

Steps to trigger the problem:

  1. Install latest 0.184
  2. Open a project with changed git files
  3. Ensure gutters a visible
  4. Update to 0.187 (or 0.186, 0.185)
  5. Open the same file

Actual Behavior: Gutters not shown Expected Behavior: Gutters shown

On 0.184 Image

On 0.185/0.186/0.187 Image

Zed Version and System Specs

Zed: v0.187.9 (Zed) OS: macOS 15.5.0 Memory: 36 GiB Architecture: aarch64

ravshansbox avatar May 27 '25 23:05 ravshansbox

I confirm. It helped me to switch to version 0.184.10

Glazoff avatar May 29 '25 14:05 Glazoff

Interesting. I can't seem to reproduce. To quickly rule out some things:

  1. Does this happens with all themes (e.g. One Dark)?
  2. Does this happen with an empty settings.json file
  3. Does this happen with all projects or just certain ones (e.g. only those with git submodules or some such)?

In the absence of a general set of steps to reproduce, is anyone who is seeing this able/willing to do the git bisect to try to nail do when this issue was introduced?

notpeter avatar May 29 '25 16:05 notpeter

I’d also like to mention that I’m working via a dedicated SSH connection. Could it be that some data from the .zed_server folder is required?

One more clarification: the IDE stops highlighting modified lines in files when they are nested beyond a certain depth. I haven't been able to identify a consistent pattern for when this happens.

my settings ide zed

settings.json
{
  "agent": {
    "model_parameters": [],
    "single_file_review": false,
    "version": "2"
  },
  "git_panel": {
    "dock": "left"
  },
  "theme": "Catppuccin Mocha",
  "icon_theme": "Catppuccin Mocha",
  "auto_update_extensions": {
    "tokyo-night": false
  },
  "terminal": {
    "dock": "bottom"
  },
  "ssh_connections": [
    {
      "host": "0.0.0.0",
      "username": "example-user",
      "projects": [
        {
          "paths": [
            "~/example-projects"
          ]
        }
      ]
    },
    {
      "host": "0.0.0.0",
      "username": "example-user",
      "projects": []
    }
  ],
  "vim_mode": false,
  "ui_font_size": 16,
  "buffer_font_size": 14,
  "languages": {
    "JavaScript": {}
  }
}

Glazoff avatar May 29 '25 16:05 Glazoff

@Glazoff Nothing jumps out with your settings.json. I can't reproduce via ssh remoting either (works for me there too).

One more clarification: the IDE stops highlighting modified lines in files when they are nested beyond a certain depth. I haven't been able to identify a consistent pattern for when this happens.

Interesting. I wonder if what you're seeing is a timeout on a particularly active file. I've seen this before when blame is really slow to compute. If you have a file where gutter blame is missing in zed can you try time git blame filename from the command line to check? See also:

  • https://github.com/zed-industries/zed/issues/13547

Again, anything in your logs when this happens?


Can you see if you can reproduce locally too? Steps:

mkdir -p /tmp/issue31564 
touch foo.txt
git init
git add foo.txt
git commit -m "foo"
echo bar > foo.txt
zed . foo.txt

If you can reliably trigger the problem, would you be willing to see if you can narrow down to see exactly where it broke? Add "auto_update": false, to your settings, since v0.184.10 is working and newer versions aren't...

Install Zed Preview v0.185.0-pre and see if it broke there, or if it was in a subsequent release. Sort of a poor mans git bisect.

notpeter avatar May 29 '25 19:05 notpeter

@Glazoff this is completely random, sometimes it just works on another start, sometimes after cleaning up settings.json and sometimes does not work even after cleaning. I tested this on the default theme, does not look like it depends on it.

ravshansbox avatar May 29 '25 23:05 ravshansbox

@notpeter Installed v0.185.0-pre Pre-release. Editable lines in Git were immediately visible.

I tried installing v0.186.0-pre — the editable lines in Git were shown with mixed results. At first, they didn’t appear, then they did. I decided to restart the editor, and after that, they didn’t show up anymore. So I reverted back to v0.185.0-pre Pre-release and didn’t encounter any issues.

Running the command time git blame filename took a bit more than a minute — approximately 1 minute and 30 seconds. I checked this on version 0.188.4, so it’s probably related to issues/13547.

As for the steps you asked me to reproduce locally — I wasn’t able to reproduce the error. I checked this on version 0.188.4

Glazoff avatar May 30 '25 14:05 Glazoff

Gotcha. So for you, this is https://github.com/zed-industries/zed/issues/13547 but happening remotely.

I didn't immediately see anything in the diff https://github.com/zed-industries/zed/compare/v0.185.0-pre...v0.186.0-pre which seems to be a culprit why things have changed. :-/

notpeter avatar May 30 '25 20:05 notpeter

Checking in, @ravshansbox is this still an issue on the latest Zed?

katie-z-geer avatar Oct 27 '25 03:10 katie-z-geer

@katie-z-geer did not notice recently on the latest builds

ravshansbox avatar Oct 27 '25 09:10 ravshansbox

Sounds good, I'm going to close this, and we can reopen if it occurs again.

katie-z-geer avatar Dec 05 '25 22:12 katie-z-geer