Commit graph

299 commits

Author SHA1 Message Date
MostlyK
d88afd0e90
repl: Refresh Python kernelspecs on buffer language change (#54709)
- Subscribe to buffer LanguageChanged events so language detection that
completes later (e.g. in remote projects) triggers a kernelspec refresh
and ensures the REPL UI is populated.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #54388

Release Notes:

- Python REPL UI stays responsive on remote connection

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-05-15 12:07:32 +00:00
Conrad Irwin
be705e677b
Merge gpui::Task and scheduler::Task (#53674)
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-05-05 22:41:13 +00:00
Dino
6357a85e8f
editor: Add preserve scroll strategy for go to definition (#55036)
These changes attempt to expand on the work introduced by
https://github.com/zed-industries/zed/pull/54778 by introducing a new
`GoToDefinitionScrollStrategy::Preserve` variant that attempts to keep
the cursor at the same vertical offset within the viewport when
navigating to a definition.

Most of the machinery for this was already in place. To support cases
where the user's scroll position isn't snapped to an exact display row,
for example, after scrolling with the mmouse, `Autoscroll::TopRelative`
and `Autoscroll::BottomRelative` were updated from `usize` to
`ScrollOffset`, allowing fractional offsets.

When the cursor is offscreen at the moment the `editor: go to
definition` action is invoked, `Preserve` falls back to
`Autoscroll::center`, matching the existing default for
`go_to_definition_scroll_strategy`. This avoids attempting to preserve
an offset where the cursor isn't visible which would lead to the cursor
being offscreen when jumping to the definition.

Documentation has also been updated to reflect this new strategy value.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Relates to #52173

Release Notes:

- Added a new `preserve` option to `go_to_definition_scroll_strategy`
that keeps the cursor at the same vertical position within the viewport
when navigating to a definition
2026-04-29 07:29:15 +00:00
Finn Evers
ab69fc6d1e
repl: Unify notebook cell creation (#54765)
Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-04-29 07:14:05 +00:00
MostlyK
9e18c6a6a1
Bump jupyter-websocket-client to 1.1.0 (#54442)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-04-21 23:39:53 +00:00
Finn Evers
edfd8c87e6
repl: Do some cleanup (#54362)
This removes some code duplication as well as the minimap from the code
cells

Release Notes:

- N/A
2026-04-21 12:34:33 +02:00
Jason Lee
84dcf38dbe
gpui: Improve Anchored to support center position (#47154)
Release Notes:

- N/A

Ref https://github.com/longbridge/gpui-component/pull/1956 extract my
fork version of `anchored.rs` to let GPUI to support position Anchored
at center.


https://github.com/user-attachments/assets/8d0230ed-4b75-440b-b8c3-9bde3decd141

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 09:01:42 +00:00
MostlyK
040b03b34d
repl: Unify kernel searching in remote and wsl (#53049)
### Context:

- Having a unified way of searching would allow for better debugging as
we move forward here. Right now we have remote/headless specific
searching and it's getting messy. This should allow for a more intuitive
function graph in the head for debugging environment related issues in
remote repl. The implementation mirrors python.rs approach.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #50892

Release Notes:

- N/A
2026-04-21 09:24:09 +02:00
Nadir
a8b84497a3
repl: Correctly discover user's kernels (#50978)
Closes #50977

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Before:
<img width="1700" height="1063" alt="image"
src="https://github.com/user-attachments/assets/fd8e8438-a8a8-4d00-ac72-7e5ab75c8723"
/>

After:
<img width="1700" height="1066" alt="image"
src="https://github.com/user-attachments/assets/e31e449d-93ce-433e-94fd-cfdc08d61f49"
/>


Release Notes:

- Fixed kernels discovery in python notebook editor.

---------

Co-authored-by: Finn Evers <finn@zed.dev>
2026-04-20 22:11:11 +00:00
Mikayla Maki
ec9be5c332
Feature flag overrides (#54206)
This PR revamps our feature flag system, to enable richer iteration. 

Feature flags can now:
- Support enum values, for richer configuration
- Be manually set via the settings file
- Be manually set via the settings UI

This PR also adds a feature flag to demonstrate this behavior, a
`agent-thread-worktree-label`, which controls which how the worktree tag
UI displays.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
2026-04-18 06:34:19 +00:00
Kirill Bulatov
2635ef55c6
Restrict mouse wheel zoom for certain editors (#53598)
Follow-up of https://github.com/zed-industries/zed/pull/53452

* disables mouse wheel zooming in agent, debugger, keymap editor, dev
inspector and repl-related editors
* adjusts the code to call for theme changes directly instead of sending
the events, so that agent following does not capture the events and
changes its font size

Release Notes:

- N/A
2026-04-10 09:20:38 +00:00
MostlyK
fd667f6373
repl: Add notebook command/edit modes and keybindings (#51194)
- Introducing NotebookMode state and handlers (EnterEditMode,
EnterCommandMode, RunAndAdvance).
- Wire up UI to switch modes,focus editors appropriately, and advance
selection while in command mode.
- Update default and vim keymaps to use the new bindings (shift-enter
runs+advances, escape enters command mode,
and enter/up/down work in command mode).
- Reveal and Focus the new Cell when inserted 

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-04-07 22:58:03 +02:00
MostlyK
24a6008e5c
repl: Improve iopub connection error messages (#53014)
Coming from #51834, these would be more helpful than just that it
failed!

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- N/A
2026-04-06 22:42:50 -07:00
Finn Eitreim
733857b746
repl: Use uv to install ipykernel for uv-managed venv (#51897)
## Context

Closes #51874

the repl is able to recognize that the venv is managed by uv, but still
runs `python -m pip install ipykernel`, despite this not working. this
PR fixes that behavior and uses uv to install ipkernel.

## How to Review

Added a path that uses uv to install ipykernel in repl_editor.rs
Added a function to repl_store.rs that allows updating the venv as
having ipykernel installed after installing it.


## Videos

Old Behavior:


https://github.com/user-attachments/assets/9de81cc9-cd78-4570-ad57-550f5ecabffa

New Behavior:


https://github.com/user-attachments/assets/391f54c7-ae67-4d85-8f4f-9d87ddc8db63


## Self-Review Checklist

<!-- Check before requesting review: -->
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- repl: Fixed installing ipykernel with uv managed environements
2026-04-06 10:53:13 -05:00
Piotr Osiewicz
93e641166d
theme: Split out theme_settings crate (#52569)
Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A
2026-03-27 14:41:25 +01:00
MostlyK
65b80ff689
repl: Avoid duplicate kernelspec fetches (#51024)
Switch python_env_kernel_specifications to a buffered stream (using
buffer_unordered(4) and filter_map) to run discovery concurrently with a
bounded parallelism and skip None results.

Closes #50988

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-17 17:39:11 -06:00
Danilo Leal
4e8937b62d
ui: Refactor the Button component icon methods (#51496)
Previously, if you wanted to have a button that contains icons on both
edges, you'd need to use a `ButtonLike` component, which takes any
children. Meanwhile, the `Button` would only take one icon, where you
could control its position through the `IconPosition` enum. This has
always felt unnecessarily limiting. So, this PR removes this limitation
by adding two new methods to the button: `start_icon` and `end_icon`.

In the meantime, I have also been bothered by the unnecessary
indirection in the `IconButton` due to the existence of the `ButtonIcon`
component. So I figured I could also completely eliminate that by adding
some of its methods directly to the `IconButton` and in the Button, just
using a regular `Icon` component.

---
## Before
```rust
Button::new("id", "Label")
    .icon(IconName::Plus)
    .icon_position(IconPosition::Start)
    .icon_size(IconSize::Small)
    .icon_color(Color::Muted)
```

## After
```rust
Button::new("id", "Label")
    .start_icon(Icon::new(IconName::Check))
    .end_icon(Icon::new(IconName::ChevronDown).size(IconSize::XSmall))
```

This should have no visual impact to the UI.

Release Notes:

- N/A
2026-03-13 14:13:12 -03:00
Piotr Osiewicz
97421c670e
Remove unreferenced dev dependencies (#51093)
This will help with test times (in some cases), as nextest cannot figure
out whether a given rdep is actually an alive edge of the build graph

Closes #ISSUE

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-09 13:22:12 +01:00
John Tur
8d083a639c
Lazily initialize kernelspecs (#51026)
On Windows, the WSL VM always boots up when Zed is opened, because we
eagerly discover which jupyter kernels are installed inside WSL on
startup. This is not desirable if the REPL feature is not being used.
Defer this work to the point where we actually need to know what kernels
are installed.

Release Notes:

- N/A
2026-03-07 20:51:22 -05:00
Conrad Irwin
6c9b813f38
Remove Executor::close() (#50970)
Co-Authored-By: Eric Holk <eric@zed.dev>

In app drop we had been calling `.close()` on the executors. This caused
problems with the BackgroundExecutor on Linux because it raced with
concurrent work: If task A was running and about to poll task B, the
poll to task B would panic with "Task polled after completion". This
didn't really matter (because the app was shutting down anyway) but
inflated our panic metrics on Linux.

It turns out that the call to `.close()` is not needed. It was added to
prevent foreground tasks being scheduled after the app was dropped; but
on all platforms the App run method does not return until after the
ForegroundExecutor is stopped (so no further tasks will run anyway).

The background case is more interesting. In test code it didn't matter
(the background executor is simulated on the main thread so tests can't
leak tasks); in app code it also didn't really make a difference. When
`fn main` returns (which it does immediately after the app is dropped)
all the background threads will be cancelled anyway.

Further confounding debugging, it turns out that the App does not get
dropped on macOS and Windows due to a reference cycle; so this was only
happening on Linux where the app quit callback is dropped instead of
retained after being called. (Fix in #50985)

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
2026-03-07 04:11:45 +00:00
Kyle Kelley
21e202ef0c
repl: Switch to util::process::Child to rely on process groups (#48839)
Follow up to https://github.com/zed-industries/zed/pull/48760 thanks to
@miguelraz and @reflectronic.

No new notes since #48760 did the same thing, only wasn't opting in to
process groups we already had in place.

Release Notes:

- N/A
2026-03-06 11:04:23 -06:00
MostlyK
66de3d9c00
repl: Treat WSL as a separate kernel type from SSH remote (#50721)
Split WslRemote out of the remote_kernels bucket in the kernel picker,
giving it its own "WSL Kernels" section. Use the distro name and
kernelspec display name for WSL entries instead of the generic "WSL"
string.

In python_env_kernel_specifications, detect WSL projects via
RemoteConnectionOptions and return WslRemote instead of SshRemote. Stop
marking WSL worktrees as remote so global kernel specs load.

Fix ark kernel stdout pollution by building the wsl.exe bash command
with a quoted cd and inline env assignment, so exec replaces the shell
and doesn't echo input back.

Closes #50459 

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A
2026-03-06 07:28:10 -06:00
Kyle Kelley
74e747a6c7
repl: Support kernel language aliases in REPL (#49762)
Add a `kernel_language_names` field to `LanguageConfig` that allows
languages to declare alternative names that Jupyter kernels may use.
This fixes REPL matching for cases where a kernel reports a different
language identifier than Zed's language name.

For example, the Nu extension would set `kernel_language_names =
["nushell", "nu"]` in its config.toml, enabling REPL support for
nu-jupyter-kernel which reports `"language": "nushell"` in its
kernelspec.

The change consolidates kernel language matching logic into a single
`Language::matches_kernel_language()` method that checks the code fence
block name, language name, and the new aliases list (all
case-insensitive).

- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- Added `kernel_language_names` field for extensions to self identify
REPL mappings
2026-03-04 11:58:51 -06:00
MostlyK
731a80053c
repl: Bump runtimed ecosystem packages and add support for V3 Jupyter Notebooks (#49914)
- Add support for v3 Jupyter Notebooks ( nbformat 1.2.0 <->
https://github.com/runtimed/runtimed/pull/275 )
- This means that we can now open notebooks like [Signal Processing for
Python](https://nbviewer.org/github/unpingco/Python-for-Signal-Processing/tree/master/)
and much more.

 

Release Notes:

- N/A
2026-03-04 10:14:32 -06:00
Casper van Elteren
c0fa025bc9
repl: Fix image scaling (#48435)
Continues #47114

Release Notes:

- Fixed REPL output width clamping to apply to the content area so
images don’t get clipped by controls

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-03-04 07:33:40 +00:00
Conrad Irwin
6808acce93
Fix a few cases where we weren't escaping shell vars correctly (#50562)
Release Notes:

- N/A
2026-03-02 23:31:11 -07:00
MostlyK
72fa9715e3
repl: Fix duplicate output inside notebooks (#48616)
- Render the output only when needed, fixes the duplicate output that
can happen after opening a saved notebook.
- Vim in Jupyter View with j/k navigation across notebook cells

Release Notes:

- N/A
2026-02-26 00:15:57 +01:00
Lukas Wirth
9ad8c7a2a3
editor: Distribute lines across cursors when pasting from external sources (#48676)
Release Notes:

- When pasting multiple lines equaling the number of cursors Zed now
maps each line to each cursor
2026-02-20 16:33:06 +00:00
MostlyK
ae9bb6a628
repl: Add WSL and SSH remote kernel support (#47891)
Closes #15196, #46918 

- fix: notebook_ui, use buffer so that notebooks open in remote/WSL
settings.
- fix: add musl in nix for cross-compilation, without this remote server
doesn't build inside NixOS


Release Notes:

- Implement WSL and SSH remote kernels (crates/repl/src/kernels/*) and
wire up spawn/kill kernel proto messages and client requests.
2026-02-20 09:36:21 +00:00
Kyle Kelley
a7df04c375
repl: Add clear output(s) command (#49631)
Closes #15947

This adds `repl:ClearCurrentOutput` and `repl:ClearOutputs` commands. No
keybindings are set for this. Just an action people can bind.

Release Notes:

- Added ability to clear outputs by action
2026-02-20 08:56:29 +01:00
Kyle Kelley
19404e43df
repl: Support HTML outputs through html_to_markdown (#49646)
Closes #15555

Adds a super basic render of html output from jupyter kernels.

<img width="1061" height="1207" alt="image"
src="https://github.com/user-attachments/assets/1bfb8c71-0e38-4bff-9f0c-bec12721232a"
/>

Obviously not as full featured as #48157

Release Notes:

- Added basic handling of HTML in REPL outputs
2026-02-20 08:55:58 +01:00
Lukas Wirth
7d80412cca
Reduce amount of monomorphizations from FnMut closures (#49453)
Replaces a bunch of `impl FnMut` parameters with `&mut dyn FnMut` for
functions where this is the sole generic parameter.
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-18 12:00:02 +01:00
Jakub Konka
16dfc60ad2
util: Always use posix_spawn on macOS even with pre_exec hooks (#49090)
Here's some backstory:
* on macOS, @cole-miller and I noticed that since roughly Oct 2025, due
to some changes to latest macOS Tahoe, for any spawned child process we
needed to reset Mach exception ports
(https://github.com/zed-industries/zed/issues/36754 +
6e8f2d2ebe)
* the changes in that PR achieve that via `pre_exec` hook on
`std::process::Command` which then abandons `posix_spawn` syscall for
`fork` + `execve` dance on macOS (we tracked it down in Rust's std
implementation)
* as it turns out, `fork` + `execve` is pretty expensive on macOS
(apparently way more so than on other OSes like Linux) and `fork` takes
a process-wide lock on the allocator which is bad
* however, since we wanna reset exception ports on the child, the only
official way supported by Rust's std is to use `pre_exec` hook
* posix_spawn on macOS exposes this tho via a macOS specific extension
to that syscall `posix_spawnattr_setexceptionports_np` but there is no
way to use that via any standard interfaces in `std::process::Command`
* thus, it seemed like a good idea to instead create our own custom
Command wrapper that on non-macOS hosts is a zero-cost wrapper of
`smol::process::Command`, while on macOS we reimplement the minimum to
achieve `smol::process::Command`  with `posix_spawn` under-the-hood

Notably, this changeset improves git-blame in very large repos
significantly.

Release Notes:

- Fixed performance spawning child processes on macOS by always forcing
`posix_spawn` no matter what.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-02-13 20:16:11 +01:00
Kyle Kelley
8249ef5618
repl: Initial stdin support for kernels (#48851)
Support stdin from Jupyter kernels AKA `input()` and `getpass()` in
IPython.

<img width="460" height="380" alt="image"
src="https://github.com/user-attachments/assets/3b26457f-d651-4514-94b4-8cbb6ff52003"
/>

<img width="391" height="243" alt="image"
src="https://github.com/user-attachments/assets/255bd388-5622-4521-ab93-f9ef7fe861aa"
/>

Closes #22746

Release Notes:

- Added STDIN support (`input` / `raw_input`) to REPL
2026-02-13 08:18:55 +01:00
Lukas Wirth
a6797892ec
Resolve semantic merge conflict (#48999)
Caused by https://github.com/zed-industries/zed/pull/48763 and
https://github.com/zed-industries/zed/pull/48800

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-12 07:53:30 +00:00
Kyle Kelley
317a578f6a
repl: List python environments first (#48763)
This PR completely subsumes
https://github.com/zed-industries/zed/pull/46720

<img width="574" height="496" alt="image"
src="https://github.com/user-attachments/assets/14ee9185-0be6-49cf-b5fd-114e61915341"
/>

Release Notes:

- Added Python Environments to REPL kernel selection
- List active toolchain/python environment as the recommended kernel for
REPL usage

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 08:20:20 +01:00
Richard Feldman
ee3f40fe25
Re-add MultiWorkspace (#48800)
Release Notes:

- Added agent panel restoration. Now restarting your editor won't cause
your thread to be forgotten.

---------

Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
2026-02-12 01:06:23 +00:00
Mikayla Maki
83de8a25e0
Revert PRs for landing in main (#48969)
We're going to re-apply these after landing the multiworkspace branch.

Release Notes:

- N/A
2026-02-12 00:28:17 +00:00
Katie Geer
f233ae4c29
Add telemetry for user-facing notifications (#48558)
## Summary

Adds a "Notification Shown" telemetry event that fires whenever a
user-facing notification is displayed in Zed. This helps the team
understand error patterns, notification frequency, and which parts of
the application generate the most notifications.

## Event Schema

| Property | Type | Description |
|----------|------|-------------|
| `notification_type` | `string` | `"error"` or `"notification"` |
| `source` | `string` | Origin category (e.g., `lsp`, `git`, `settings`,
`editor`) |
| `lsp_name` | `string?` | Language server name (only for LSP
notifications) |
| `level` | `string?` | Severity: `"critical"`, `"warning"`, or `"info"`
|
| `has_actions` | `bool` | Whether the notification has action buttons |
| `notification_id` | `string` | Debug string of the NotificationId |
| `is_auto_dismissing` | `bool` | Whether the notification
auto-dismisses |

## NotificationSource Categories

A new `NotificationSource` enum categorizes notifications by origin:

- `lsp` - Language server notifications
- `settings` - Settings/keymap parse errors
- `update` - App updates, release notes
- `extension` - Extension suggestions/errors
- `git` - Git operations, commit errors
- `project` - Project-level issues
- `collab` - Collaboration notifications
- `remote` - SSH/remote project errors
- `file` - File access errors
- `editor` - Editor operations (search, encoding)
- `agent` - AI assistant notifications
- `cli` - CLI installation
- `system` - Generic fallback

## Privacy

**Message content is intentionally not included** in telemetry because:
- LSP messages come from external servers and may contain file paths or
error chains
- Error messages may contain sensitive paths or API-related information
- The metadata alone provides sufficient insight for error tracking

## Implementation

Updated function signatures to include `NotificationSource`:
- `show_notification(id, source, cx, build_fn)`
- `show_toast(toast, source, cx)`
- `show_error(err, source, cx)`
- `show_app_notification(id, source, cx, build_fn)`
- `notify_err(workspace, source, cx)`
- `notify_async_err(source, cx)`
- `notify_app_err(source, cx)`
- `detach_and_notify_err(source, window, cx)`

Release Notes

- N/A (internal telemetry change)

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-11 10:21:37 -08:00
Kyle Kelley
770ff7cbd9
repl: Write test for JSON output (#48897)
Tests for JSON output in the REPL.

Release Notes:

- N/A
2026-02-11 17:23:12 +01:00
Kyle Kelley
de5fc22335
repl: Test outputs and ExecutionView (#48892)
More tests for outputs and the `ExecutionView`. Wanting to get more of
these in before we progress on Notebooks and Widgets.

Release Notes:

- N/A
2026-02-11 17:22:26 +01:00
Kyle Kelley
303c1aa15f
repl: Be more resilient with message parsing (#48837)
Closes #21529

Show a toast when a message from a Jupyter kernel doesn't parse
properly.

Discovered that some kernels don't include their execution count in an
`ExecuteReply` which is required in the jupyter protocol. Upstream I'll
go make that field either be an `Option` or just stick
`#[serde(default)]` on it so it's not a change in the interface.

Release Notes:

- Show error when parsing a message from a Jupyter kernel fails
2026-02-09 22:54:46 -05:00
Kyle Kelley
24d9c00e0e
repl: Use split() on shell and control dealer sockets (#48823)
Hot on the heels of https://github.com/zed-industries/zed/pull/48817 I'm
bringing the best improvement to the repl underneath: `split()`-able
sockets! Much more will be unlocked by having this.

This split the shell and control `DealerSocket` connections into
independent send/recv halves using the new `split()` API from zeromq
0.5.0 and runtimelib 1.x. This also nicely cleaned things up so we could
have a single `select!` loop over iopub, shell, and control recv halves.
That replaces three separate recv tasks.

This likely closes some issues for certain kernels that would get stuck
either during startup or other flows due to them not sending replies to
specific requests. I'll see if I can find issues around this and update
the release notes after.

This allows us to unlock some nifty new things we can do on the shell
socket, particularly autocompletion for in-memory values, stdin support,
and others. I _think_ it also help with sending and receving
`KernelInfo`, which not all kernels do properly at the start. This makes
us a bit more resilient to errant kernels.

Release Notes:

- N/A
2026-02-09 18:12:00 -06:00
Kyle Kelley
29f2048f88
repl: Shutdown all kernels on app quit (#48760)
Closes #17985
Closes #21911

Force the shutdown of the kernel by ensuring the kernel sessions are
dropped on app quit.

Release Notes:

- Fixed shutdown of kernels on app exit
2026-02-09 22:36:22 +01:00
Kyle Kelley
7f2ee83173
repl: Bump runtimed ecosystem packages to 1.x (#48817)
Bump the runtimed ecosystem packages to their 1.0 releases:

- `jupyter-protocol`: 0.10.0 → 1.1.0
- `jupyter-websocket-client`: 0.15.0 → 1.0.0
- `nbformat`: 0.15.0 → 1.0.0
- `runtimelib`: 0.30.0 → 1.1.0

One breaking change: `MimeType::Json` now wraps `serde_json::Value`
directly instead of `serde_json::Map<String, Value>`, so the redundant
`Value::Object(...)` wrapping in `outputs.rs` was removed.

Closes #41649

More Quality of Life improvements and Bug Fixes are coming in new PRs
after this is merged.

Release Notes:

- Fixes startup for R kernels and Python kernels on windows.
2026-02-09 22:27:40 +01:00
Kyle Kelley
495d9665c5
repl: Pluck project off editor directly (#48808)
Clean up code by pulling the project off the editor directly.

Repeat of https://github.com/zed-industries/zed/pull/48762 since
reversion happened in https://github.com/zed-industries/zed/pull/48776.

Release Notes:

- N/A
2026-02-09 20:18:24 +01:00
Finn Evers
165b404460
Revert "New multi workspace (#47795)" (#48776)
Preparing this just in case.

Release Notes:

- N/A
2026-02-09 15:37:16 +01:00
Kyle Kelley
db6c006f73
repl: Pluck project off of editor directly (#48762)
The new multi workspace introduced in #47795 changed the window root
from `Workspace` to `MultiWorkspace`, which broke
`Workspace::for_window()` (assuming that was meant to). That returns
`None` now. The REPL action registration in `repl_sessions_ui.rs` used
this to check if the project was local, so when it got None, it silently
skipped registering `repl::Run` and `repl::RunInPlace` on every editor.

Luckily we can just get the project directly from the editor in order to
register actions.

Release Notes:

- N/A
2026-02-09 10:03:37 +01:00
MostlyK
ab54a7e29b
repl: Add quality of life changes in Jupyter view (#47533)
- Keyboard navigation where you can traverse through cells using up and
down arrow
- Jupyter Logo added 
- Initialize kernel as shutdown for more predictable behavior
- Ability to create .ipynb files with bare essential metadata.
- Optimize editor initialization to avoid cloning the entire notebook
and shortcuts


Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-04 07:05:22 -06:00
MostlyK
14621b66b8
repl: Fix cursor visibility on last line after re-running cells (#48218)
- This also sends the cursor to block placement anchor which is the
standard thing to happen when we run cmd/ctrl + shift + enter, this is
usually used for Run and Move onto next cell.
- Perhaps the ability to stay on the same code will be tackled on
further works where not using the shift modifier would signify stay and
"just" run the cell. Like #46868

Closes #48069

Release Notes:

- Fixed cursor becoming invisible on the last line of REPL cells after
re-running
2026-02-02 22:48:07 -06:00