bf87da7
Add dev::StartTracing action to launch Tracy profiler
Click to expand commit body
- Add is_enabled() function to ztracing crate to detect if tracy support is compiled in
- Add StartTracing action that launches tracy-profiler if found on PATH
- Show appropriate notifications for success/failure states
- Show warning with icon when running debug build (profiling results won't be accurate)
- Simplify ztracing to use just --features tracy instead of requiring ZTRACING env var
Richard Feldman
created
4b56fec
acp_thread: Fix broken main build (#45461)
Click to expand commit body
Release Notes:
- N/A
Finn Evers
created
32621dc
Fix race condition in `update_last_checkpoint` (#44801)
Click to expand commit body
Release Notes:
- Fixed spurious "no checkpoint" error in agent panel
---
## Summary
`update_last_checkpoint` would call `last_user_message()` twice - once
at the start to capture the checkpoint, and again in an async closure
after the checkpoint comparison completed. If a new user message without
a checkpoint was added between these two calls, the second call would
find the new message and fail with "no checkpoint".
## Fix
Capture the user message ID at the start and use `user_message_mut(&id)`
in the async closure to find the specific message.
cc @mikayla-maki
Nathan Sobo
created
215ac50
agent_ui: Fix markdown block for tool call input and output content (#45454)
Click to expand commit body
This PR fixes two issues with regards to markdown codeblocks rendered in
tool call input and output content display:
- the JSON code snippets weren't properly indented
- codeblocks weren't being rendered in unique containers; e.g., if you
hovered one scrollbar, all of them would also be hovered, even though
horizontal scrolling itself worked properly
Here's the end result:
https://github.com/user-attachments/assets/3d6daf64-0f88-4a16-a5a0-94998c1ba7e2
Release Notes:
- agent: Fix scrollbar and JSON indentation for tool call input/output
content's markdown codeblocks.
Danilo Leal
created
a5540a0
ui: Make the NumberField in edit mode work (#45447)
Click to expand commit body
- Make the buttons capable of changing the editor's content
(incrementing or decrementing the value)
- Make arrow key up and down increment and decrement the editor value
- Tried to apply a bit of DRY here by creating some functions that can
be reused across the buttons and editor given they all essentially do
the same thing (change the value)
- Fixed an issue where the editor would not allow focus to move
elsewhere, making it impossible to open a dropdown, for example, if your
focus was on the number field's editor
Release Notes:
- N/A
Danilo Leal
created
3e8c25f
Remove extra shortcut separator in default mode & model selection tooltips (#45439)
Closes #45385
Release Notes:
- Add extend keyword to proto
Zachiah Sawyer
created
6dad419
Update version example in remote-development.md (#45427)
Click to expand commit body
Updated the version example for maintaining the remote server binary.
Release Notes:
- N/A
Hidehiro Anto
created
0facdfa
editor: Make `TextAlign::Center` and `TextAlign::Right` work (#45417)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/43208
This PR essentially unblocks the editable number field. The function
that shapes editor lines was hard-coding text alignment to the left,
meaning that whatever different alignment we'd pass through
`EditorStyles`would be ignored. To solve this, I just added a text align
and align width fields to the line paint function and updated all call
sites keeping the default configuration. Had to also add an
`alignment_offset()` helper to make sure the cursor positioning, the
selection background element, and the click-to-focus functionality were
kept in-sync with the non-left aligned editor.
Then... the big star of the show here is being able to add the `mode`
method to the number field, which uses `TextAlign::Center`, thus making
it work as we designed it to work.
https://github.com/user-attachments/assets/3539c976-d7bf-4d94-8188-a14328f94fbf
Next up, is turning the number filed to edit mode where applicable.
Release Notes:
- Fixed a bug where different text alignment configurations (i.e.,
center and right-aligned) wouldn't take effect in editors.
Danilo Leal
created
5846137
ci: Disable automated docs on pushes to `main` (#45416)
Click to expand commit body
This PR disables the automated docs on pushes to `main`, as it is
currently making CI red.
Release Notes:
- N/A
Currently on x11, gpui PopUp windows only rely on the "notification"
type in order to indicate that they should spawn as floating window.
Several window managers (leftwm in my case, but it also seems to be the
case for dwm and ratpoison) do not this property into account thus not
spawning them as float. On the other hand, using Floating instead of
PopUp do make those windows spawn as floating, as these window manager
do take into account the (older) "dialog" type.
The [freedekstop
documentation](https://specifications.freedesktop.org/wm/1.5/ar01s05.html#id-1.6.7)
does seem to suggest that these windows should also have the override
redirect property :
> This property is typically used on override-redirect windows.
Note that this also disables pretty much all interactions with the
window manager (such as moving the window, resizing etc...)
Release Notes:
- Fix popup windows not spawning floating sometime on x11
Lieunoir
created
5395197
Separate out component_preview crate and add easy-to-use example binaries (#45382)
Click to expand commit body
Release Notes:
- N/A
Mikayla Maki
created
1d76539
gpui: Fix hover styles not being applied during layout (#43324)
Click to expand commit body
Closes #43214
Release Notes:
- Fixed GPUI hover styles not being applied during layout
Here's the before/after:
https://github.com/user-attachments/assets/5b1828bb-234a-493b-a33d-368ca01a773b
Mayank Verma
created
e5eb26e
gpui: Reset mouse scroll state on FocusOut to prevent large jumps (#43841)
Click to expand commit body
This fixes an X11 scrolling issue where Zed may jump by a large amount
due to the scroll valuator state not being reset when the window loses
focus. If you Alt-Tab away from Zed, scroll in another application, then
return, the first scroll event in Zed applies the entire accumulated
delta instead of a single step.
The missing FocusOut reset was originally identified in issue #34901.
Resetting scroll positions on FocusOut matches the behavior already
implemented in the XinputLeave handler and prevents this jump.
Closes #34901
Closes #40538
Release Notes:
- Fixed an X11 issue where Alt-Tabbing to another application,
scrolling, and returning to Zed could cause the next scroll event to
jump by a large amount.
jkugs
created
a86b0ab
gpui: Improve the tab stop example by demonstrating tab_group (#44647)
Click to expand commit body
I've just enriched the existing tab_stop.rs example for GPUI with a
demonstration of tab_group. I don't think tab groups existed when the
original example was written.
(I didn't understand the behaviour for tab_group from the doccomments
and the example was missing, so I think this is a productive PR)
Release Notes:
- N/A
Serophots
created
5fb220a
gpui: Add a Popover example for test deferred (#44473)
12dbbdd
git: Fix bug where opening a git blob from historic commit view could fail (#44226)
Click to expand commit body
The failure would happen if the current version of the file was open as
an editor. This happened because the git blob and current version of the
buffer would have the same `ProjectPath`.
The fix was adding a new `DiskState::Historic` variant to represent
buffers that are past versions of a file (usually a snapshot from
version control). Historic buffers don't return a `ProjectPath` because
the file isn't real, thus there isn't and shouldn't be a `ProjectPath`
to it. (At least with the current way we represent a project path)
I also change the display name to use the local OS's path style instead
of being hardcoded to Posix, and cleaned up some code too.
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: xipengjin <jinxp18@gmail.com>
Anthony Eid
,
Cole Miller
,
cameron
, and
xipengjin
created
6dfabdd
Revert "gpui: Enable direct-to-display optimization for metal" (#45405)
Click to expand commit body
Reverts zed-industries/zed#44334
From my testing, this PR introduced screen tearing, or some kind of
strange visual artifact, when scrolling at medium speed on a large
display.
Release notes:
- N/A
Max Brunsfeld
created
895213a
Support union declarations in C/C++ textobjects.scm (#45308)
Click to expand commit body
Release Notes:
- C/C++: Add `union` declarations to the list of text objects
Haojian Wu
created
1c576cc
Fix OpenRouter giving errors for some Anthropic models (#45399)
Click to expand commit body
Fixes #44032
Release Notes:
- Fix OpenRouter giving errors for some Anthropic models
Richard Feldman
created
3f4da03
settings ui: Change window kind from floating to normal (#45401)
Click to expand commit body
#40291 made floating windows always stay on top, which made the settings
ui window always on top of Zed. To maintain the old behavior, this PR
changes the setting window to be a normal window.
Release Notes:
- N/A
Anthony Eid
created
ff71f4d
Run cargo fix as well as cargo clippy --fix (#45394)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
71f4dc2
docs: Stash local changes before branch checkout in droid auto docs CLI (#45395)
Click to expand commit body
Stashes local changes before branch checkout in droid auto docs CLI
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
and
factory-droid[bot]
created
b091cc4
Enforce 5MB per-image limit when converting images for language models (#45313)
Click to expand commit body
## Problem
When users paste or drag large images into the agent panel, the encoded
payload can exceed upstream provider limits (e.g., Anthropic's 5MB
per-image limit), causing API errors.
## Solution
Enforce a default 5MB limit on encoded PNG bytes in
`LanguageModelImage::from_image`:
1. Apply existing Anthropic dimension limits first (1568px max in either
dimension)
2. Iteratively downscale by ~15% per pass until the encoded PNG is under
5MB
3. Return `None` if the image can't be shrunk within 8 passes
(fail-safe)
The limit is enforced at the `LanguageModelImage` conversion layer,
which is the choke point for all image ingestion paths (agent panel
paste/drag, file mentions, text threads, etc.).
## Future Work
The 5MB limit is a conservative default. Provider-specific limits can be
introduced later by adding a `from_image_with_constraints` API.
## Testing
Added a regression test that:
1. Generates a noisy 4096x4096 PNG (guaranteed >5MB)
2. Converts it via `LanguageModelImage::from_image`
3. Asserts the result is ≤5MB and was actually downscaled
---
**Note:** This PR builds on #45312 (prompt store fail-open fix). Please
merge that first.
cc @rtfeldman
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Nathan Sobo
and
Zed Zippy
created
8e5d33e
Make prompt store fail-open when DB contains undecodable records (#45312)
Droid needs a specific model with a date
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
and
factory-droid[bot]
created
56646e6
Inline assistant: Don't scroll up too high (#45171)
Click to expand commit body
In the case of large vertical_scroll_margin, we could scroll up such
that the assistant was out of view. Now, keep it no lower than the
center of the editor.
Closes #18058
Release Notes:
- N/A
Michael Benfield
created
bb2f037
docs: Droid doesn't know its own commands (#45391)
Click to expand commit body
Correctly uses droid commands in auto docs actions
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
and
factory-droid[bot]
created
07db88a
git: Optimistically stage hunks when staging a file, take 2 (#45278)
Click to expand commit body
Relanding #43434 with an improved approach.
Release Notes:
- N/A
---------
Co-authored-by: Ramon <55579979+van-sprundel@users.noreply.github.com>
1bc3fa8
Correct UTF-16 saving and add heuristic encoding detection (#45243)
Click to expand commit body
This commit fixes an issue where saving UTF-16 files resulted in UTF-8
bytes due to `encoding_rs` default behavior. It also introduces a
heuristic to detect BOM-less UTF-16 and binary files.
Changes:
- Manually implement UTF-16LE/BE encoding during file save to avoid
implicit UTF-8 conversion.
- Add `analyze_byte_content` to guess UTF-16LE/BE or Binary based on
null byte distribution.
- Prevent loading binary files as text by returning an error when binary
content is detected.
Special thanks to @CrazyboyQCD for pointing out the `encoding_rs`
behavior and providing the fix, and to @ConradIrwin for the suggestion
on the detection heuristic.
Closes #14654
Release Notes:
- (nightly only) Fixed an issue where saving files with UTF-16 encoding
incorrectly wrote them as UTF-8. Also improved detection for binary
files and BOM-less UTF-16.
Change from cli.factory.ai/install.sh to app.factory.ai/cli per official
Factory documentation.
Release Notes:
- N/A
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
b53f661
docs: Fix auto docs GitHub Action (#45383)
Click to expand commit body
Small fixes to Droid workflow
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
morgankrey
and
factory-droid[bot]
created
4ef5d2c
Fix relative line numbers in sticky headers (#45164)
Click to expand commit body
Closes #42586
This includes a rewrite of `calculate_relative_line_numbers()`. Now it's
linear-time with respect to the number of rows displayed, instead of
linear time with respect to the number of rows displayed _plus_ the
distance to the base row.
Release Notes:
- Improved performance when using relative line numbers in large files
- Fixed relative line numbers not appearing in sticky headers
Andrew Farkas
created
bfe3c66
docs: Automatic Documentation Github Action using Droid (#45374)
Click to expand commit body
Adds a multi-step agentic loop to github actions for opening a
once-daily documentation PR that can be merged only be a Zedi
Release Notes:
- N/A
---------
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Closes #43319
Release Notes:
- Sticky headers no longer obscure the cursor when it moves.
---------
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
Closes #17467
Release Notes:
- On macOS, buffer search now syncs with the system find pasteboard,
allowing <kbd>⌘E</kbd> and <kbd>⌘G</kbd> to work seamlessly across Zed
and other apps.
Agus Zubiaga
created
e05dcec
Make `pane::CloseAllItems` best effort (#45368)
Click to expand commit body
Closes #ISSUE
Release Notes:
- Fixed an issue where the `pane: close all items` action would give up
if you hit "Cancel" on the prompt for what to do with a dirty buffer
It's been a little that we've noticed some flickering and other weird
resizing behavior with text truncation in Zed:
https://github.com/user-attachments/assets/4d5691a3-cd3d-45e0-8b96-74a4e0e273d2
https://github.com/user-attachments/assets/d1d0e587-7676-4da0-8818-f4e50f0e294e
Initially, we suspected this could be due to how we calculate the length
of a line to insert truncation, which is based first on the length of
each individual character, and then second goes through a pass
calculating the line length as a whole. This could cause mismatch and
culminate in our bug.
However, even though that felt like a reasonable suspicion, I realized
something rather simple at some point: the `truncate` and
`truncate_start` methods in the `Label` didn't use `whitespace_nowrap`.
If you take Tailwind as an example, their `truncate` utility class takes
`overflow: hidden; text-overflow: ellipsis; white-space: nowrap;`. This
pointed out to a potential bug with `whitespace_nowrap` where that was
blocking truncation entirely, even though that's technically part of
what's necessary to truncate as you don't want text that will be
truncated to wrap.
Ultimately, what was happening was that the text element was caching its
layout based on its `wrap_width` but not considering its
`truncate_width`. The truncate width is essentially the new definitive
width of the text based on the available space, which was never being
computed. So the fix here was to add `truncate_width.is_none()` to the
cache validation check, so that it only uses the cached text element
size _if the truncation width is untouched_. But if that changes, we
need to account for the new width. Then, in the Label component, we
added `min_w_0` to allow the label div to shrink below its original
size, and finally, we added `whitespace_nowrap()` as the cache check
fundamentally fixed that method's problem.
In a future PR, we can basically remove the `single_line()` label method
because: 1) whenever you want a single label, you most likely want it to
truncate, and 2) most instances of `truncate` are already followed by
`single_line` in Zed today, so we can cut that part.
Result is no flickering with truncated labels!
https://github.com/user-attachments/assets/ae17cbde-0de7-42ca-98a4-22fcb452016b
Release Notes:
- Fixed a bug in GPUI where truncated text would flicker as you resized
the container in which the text was in.
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Danilo Leal
and
Lukas Wirth
created
a7e0701
editor: Add automatic markdown list continuation on newline and indent on tab (#42800)
Click to expand commit body
Closes #5089
Release notes:
- Markdown lists now continue automatically when you press Enter
(unordered, ordered, and task lists). This can be configured with
`extend_list_on_newline` (default: true).
- You can now indent list markers with Tab to quickly create nested
lists. This can be configured with `indent_list_on_tab` (default: true).
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Raduan A.
,
Claude
, and
Smit Barmase
created
ea34cc5
Fix terminal doesn't switch to project directory when opening remote project on Windows (#45328)
Click to expand commit body
Closes #45253
Release Notes:
- Fixed terminal doesn't switch to project directory when opening remote
project on Windows
feeiyu
created
a7d4306
workspace: Make title bar pickers render nearby the trigger when mouse-triggered (#45361)
Click to expand commit body
From Zed's title bar, you can click on buttons to open three modal
pickers: remote projects, projects, and branches. All of these pickers
use the modal layer, which by default, renders them centered on the UI.
However, a UX issue we've been bothered by is that when you _click_ to
open them, they show up just way too far from where your mouse likely is
(nearby the trigger you just clicked). So, this PR introduces a
`ModalPlacement` enum to the modal layer, so that we can pick between
the "centered" and "anchored" options to render the picker. This way, we
can make the pickers use anchored positioning when triggered through a
mouse click and use the default centered positioning when triggered
through the keybinding.
One thing to note is that the anchored positioning here is not as
polished as regular popovers/dropdowns, because it simply uses the x and
y coordinates of the click to place the picker as opposed to using
GPUI's `Corner` enum, thus making them more connected to their triggers.
I chose to do it this way for now because it's a simpler and more
contained change, given it wouldn't require a tighter connection at the
code level between trigger and picker. But maybe we will want to do that
in the near future because we can bake in some other related behaviors
like automatically hiding the button trigger tooltip if the picker is
open and changing its text color to communicate which button triggered
the open picker.
https://github.com/user-attachments/assets/30d9c26a-24de-4702-8b7d-018b397f77e1
Release Notes:
- Improved the UX of title bar modal pickers (remote projects, projects,
and branches) by making them open closer to the trigger when triggering
them with the mouse.
This adds the following Vim commands:
- `:r[ead] [name]`
- `:{range}r[ead] [name]`
The most important parts of this feature are outlined
[here](https://vimhelp.org/insert.txt.html#%3Ar).
The only intentional difference between this and Vim is that Vim only
allows `:read` (no filename) for buffers with a file attached. I am
allowing it for all buffers because I think that could be useful.
Release Notes:
- vim: Added the [`:r[ead] [name]` Vim
command](https://vimhelp.org/insert.txt.html#:read)
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
AidanV
and
Ben Kunkle
created
b603372
Reduce GPU usage by activating VRR optimization only during high-rate input (#45369)
Click to expand commit body
Fixes #29073
This PR reduces unnecessary GPU usage by being more selective about when
we present frames to prevent display underclocking (VRR optimization).
## Problem
Previously, we would keep presenting frames for 1 second after *any*
input event, regardless of whether it triggered a re-render. This caused
unnecessary GPU work when the user was idle or during low-frequency
interactions.
## Solution
1. **Only track input that triggers re-renders**: We now only record
input timestamps when the input actually causes the window to become
dirty, rather than on every input event.
2. **Rate-based activation**: The VRR optimization now only activates
when input arrives at a high rate (≥ 60fps over the last 100ms). This
means casual mouse movements or occasional keystrokes won't trigger
continuous frame presentation.
3. **Sustained optimization**: Once high-rate input is detected (e.g.,
during scrolling or dragging), we sustain frame presentation for 1
second to prevent display underclocking, even if input briefly pauses.
## Implementation
Added `InputRateTracker` which:
- Tracks input timestamps in a 100ms sliding window
- Activates when the window contains ≥ 6 events (60fps × 0.1s)
- Extends a `sustain_until` timestamp by 1 second each time high rate is
detected
Release Notes:
- Reduced GPU usage when idle by only presenting frames during bursts of
high-frequency input.
This fixes a number of issues where zed depends on the order of polling which changed when switching scheduler. We have adjusted the algorithm so it matches the previous order while keeping the prioritization feature.
Release Notes:
- N/A
Yara 🏳️⚧️
created
ae44c3c
Fix extra terminal being created when a task replaces a terminal in the center pane (#45317)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/21144
Release Notes:
- Fixed spawned tasks creating an extra terminal in the dock in some
cases.
Cole Miller
created
4e0471c
git panel: Truncate file paths from the left (#43462)
Click to expand commit body
https://github.com/user-attachments/assets/758e1ec9-6c34-4e13-b605-cf00c18ca16f
Release Notes:
- Improved: Git panel now truncates long file paths from the left,
showing "…path/filename" when space is limited, keeping filenames always
visible.
@cole-miller @mattermill
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This PR is an additive change introducing the `truncate_start` method to
labels, which gives us the ability to add an ellipsis at the beginning
of the text as opposed to the regular `truncate`. This will be generally
used for truncating file paths, where the end is typically more relevant
than the beginning, but given it's a general method, there's the
possibility to be used anywhere else, too.
<img width="500" height="690" alt="Screenshot 2025-12-17 at 12 35@2x"
src="https://github.com/user-attachments/assets/f853f5a3-60b3-4380-a11c-bb47868a4470"
/>
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Danilo Leal
and
Lukas Wirth
created
69f6eea
toolchains: Fix persistence by not relying on unstable worktree id (#45357)
Click to expand commit body
Closes #42268
We've migrated user selections when a given workspace has a single
worktree (as then we could determine what the target worktree is).
Release Notes:
- python: Fixed selected virtual environments not being
persisted/deserialized correctly within long-running Zed sessions (where
multiple different projects might've been opened). This is a breaking
change for users of multi-worktree projects - your selected toolchain
for those projects will be reset.
Co-authored-by: Dino <dino@zed.dev>