zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed Offline Support (Meta Tracking Issue)

Open notpeter opened this issue 9 months ago • 4 comments

Summary

Currently Zed does not behave particularly well when offline, once configured (extensions, language servers downloaded, etc) Zed should be a distraction free editor that supports offline use / intermittent network availability which gracefully notifies users if appropriate, but does not generating excessive errors.

Description

Areas of observed jank:

  • Zed Sign in should fail gracefully
    • [ERROR] error sending request for url (https://zed.dev/rpc?nightly=1) (dns failure)
  • Zed Telemetry should fail gracefully
    • Logs [ERROR] error sending request for url (https://api.zed.dev/telemetry/events?)
  • Auto Update should fail gracefully (dns failure)
    • [ERROR] auto-update failed: error:error sending request for url (https://zed.dev/api/releases/latest?asset=zed&os=macos&arch=aarch64&nightly=1)
  • Viewing Extensions (dns error)
    • error sending request for url (https://api.zed.dev/extensions?max_schema_version=1)
  • Extension install logs erro (no toast)
    • [ERROR] error downloading extension: error sending request for url (https://api.zed.dev/extensions/zig/download?min_schema_version=0&max_schema_version=1&min_wasm_api_version=0.0.1&max_wasm_api_version=0.2.0)
  • Install Dev Extension fails (cargo quits without network) - Not sure if we can fix this.
    • Error: failed to install dev extension
  • Language Servers Fail to start because update check fails
    • Failed to start language server "snippet-completion-server": error fetching latest release
  • Copilot should fail gracefully (DNS failure api.github.com)
    • Signin flow silently fails when offline (no error log, no toast)
    • Telemetry fails (DNS failure telemetry.business.githubcopilot.com)
    • Toast message with error prompted to reinstall copilot
      • Image
  • Language Servers where update failure results in failure to start (cached install available but unused)
    • snippet-completion-server
    • lua-language-server
    • taplo (toml)
    • phpactor (php)
    • vscode-html-language-server (html)
    • elixir-ls
    • haven't tested other extensions
  • Language Servers where it works, but could be better
    • package-version-server (dns lookup logged)
    • vtsls (5 second delay in startup)
    • vscode-css-language-server (5 second delay in startup)
  • Assistant Providers:
    • LMStudio connection should gracefully handle unavailability (connection refused)
      • [ERROR] error sending request for url (http://localhost:1234/api/v0/models)
    • Ollama connection should gracefully handle unavailability (connection refused)
      • [ERROR] error sending request for url (http://localhost:11434/api/tags)
    • Anthropic provider should gracefully fail (dns failure)
      • [ERROR] Other(failed to send request to Anthropic
    • Gemini gracefully handle unavailability (dns error on tokens)
      • `[ERROR] error sending request for url (https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:countTokens?key=WHOATHERENELLY-g)
    • OpenAI/Copilot Chat does not log on connection failure (Toast only)
    • DeepSeek does not log connection failure (Toast only)

notpeter avatar Feb 14 '25 14:02 notpeter

I would like to particularly mention the necessity of enabling offline usage for remote editors.

Some companies have strict network conditions on the cluster side due to privacy concerns. If remote editors can run in a restricted network environment, it will be easier to market them to more professional settings.

HernandoR avatar Feb 15 '25 03:02 HernandoR

I suggest adding #6754 (or something like it) to this because 99% of the time I personally don't want my text editor talking to the internet at all, and the remaining 1% I want it to ask me first.

Might not line up with your goals for zed, but there's my two cents.

rare-pail7569 avatar Mar 19 '25 23:03 rare-pail7569

First off, great work on Zed! 🚀 I really like the direction this IDE is heading in. The attention to detail is noticeable and impressive. The crisp text rendering alone has ruined other macOS editors for me. The multi-buffer approach is also very cool.

Related to this topic: Little Snitch shows frequent background connections to zed.dev, api.zed.dev, GitHub domains, and npmjs.org - as frequently as every few minutes - without clear reason.

This happens despite having telemetry disabled and not being logged in. I see requests to npmjs.org even for projects where I'm not doing anything to do with npm/node.

While I don't suspect anything nefarious, I personally dislike IDEs making regular unexplained HTTP requests - it's a trust issue, especially for a new editor under greater scrutiny. I typically allow explicit update checks but prefer to only permit other connections when they're contextually expected (e.g., GitHub API calls only when doing GitHub-related tasks).

Another thing which might help is to have more specifically named sub-domains for specific purposes. I'm much more likely to allow connections to extensions.zed.dev for example (by way of a permanent rule in Little Snitch, in my case), compared to the more generic api.zed.dev. Jetbrains IDEs make lots of connections too, but the endpoint names are often quite descriptive (eg. plugins.jetbrains.com).

Beyond "Offline Support", I'd personally like to see tighter controls for third-party HTTP requests as standard in Zed. I think this would be good practice and would help to alleviate any security concerns for larger organisations with stricter rules. BTW I'm not saying that other IDEs are necessarily much better in this respect... but Zed has a clear opportunity to choose to be better!

A page somewhere which explains which endpoints Zed calls out to, and for what reason, would be a great start to increase some transparency on this.

Keep up the good work! 👍

supertr0n avatar May 17 '25 18:05 supertr0n

@supertr0n:

I think the zed.dev / api.zed.dev traffic might be this bug:

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

As for traffic to github/npmjs.org, I'd be curious if that was Zed or various LSP subprocesses. For example if you are editing a package.json, package-version-server may retrieve metadata on package versions. When editing TOML files, taplo and vscode-json-language-server will attempt to lookup schemas on schemastore.org, which often redirects to json schemas hosted on github. I like the idea of improving our subdomains so that it's more clear what traffic is what.

notpeter avatar May 17 '25 19:05 notpeter

It would be great to be able to install Zed extensions offline as well. Ideally, via a mechanism like VSCode's VSIX archives, so you can download extensions from the web on an online machine and copying them over to an offline machine.

jonpalmisc avatar Jul 24 '25 16:07 jonpalmisc

First, Zed is excillent and I loved working with it, But basic features of an editor should atleast work in offline/restriced mode.

For Me, It does not allow to run golang debugger without the internet connection, and with my org network settings urls are blocked recently. It is sad that that I had to switch to vscode for that.

In console I see, when try to run debugger.

error: status error 403

when no network, or disable the wifi, even when I'm on the lastest relase, why is it necessary to fetch lastest release just for running my debugger, should not it be fallback and it's just a background job to fetch and update to latest release.

error: error fetching latest release

Is there any verbose mode for zed, if I can get which urls in particular are getting 403, I can try whitelist those url temporarily.

ankibalyan avatar Sep 16 '25 08:09 ankibalyan

@ankibalyan The issue with offline LSPs is this:

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

As a workaround you can manually install gopls and have it available in your path which will be preferred over attempting to find the newest version from GitHub.

notpeter avatar Sep 17 '25 13:09 notpeter

Also when cloudflare goes down the zed dosnt load extensions , Zed should fully support offline mode this seem important

MiraiTunga avatar Nov 18 '25 13:11 MiraiTunga

Also when cloudflare goes down the zed dosnt load extensions , Zed should fully support offline mode this seem important

This is important to us and security experts but not to the developers as this has been an issue for years, mentioned in several posts, crossing different aspects of the IDE but not once has anyone taken a look at fixing one "always online drm" issue. What is the point of a local install if the functionality of the IDE is hard dependent on an internet connection? Might as well just create a site that we need to log into to use it 8n the cloud and be done with it. Every time I try to give zed a chance I run into this same exact issue, the developers care more for internet traffic then a functioning product.

ericwomer avatar Nov 29 '25 18:11 ericwomer