mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-19 11:04:06 +00:00
40363 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4f6d97b9de
|
gpui: Measure frame pacing against each window's refresh rate (#65351)
Frame and hang telemetry judged every frame against a fixed 24 ms budget. That's too lax on 120–360 Hz displays and too strict at 30 Hz, so the numbers couldn't be compared across users or catch regressions on fast displays. This judges each frame against its window's display refresh interval (from #65059), as measurement version 3. **Frame timing.** A frame's work runs from the later of its frame signal and its first invalidation until its submission to the platform begins, on every platform, so time spent waiting for a late frame signal or inside the submission doesn't count. A frame is late when its work exceeds one refresh interval, but never less than 8.33 ms (one refresh at 120 Hz), since frames rarely fit a single refresh on faster displays yet; on displays whose refresh interval is unknown (X11, web) the budget is 16.7 ms. Missed refreshes still count against the real interval. **Frame Duration Report**, per window and refresh interval: on-time, late, and unmeasured frame counts and missed refreshes, overall and for frames that responded to input; work (as a percentage of the refresh interval) and draw-time buckets, computed from hdrhistogram histograms; GPU and CPU. **Hang Incidents.** Threshold incidents (one event of 100 ms or more) are unchanged. Budget incidents are split by trigger: - `late_frame`: a presented frame over its budget, listing the events that overlap that frame's work; - `blocking_work`: in an interval with no measured frame, a single event of at least the frame budget (16.7 ms in release builds), long enough to delay a frame. Total foreground time across an interval no longer counts, since gaps between short work don't block frames. Draw contributors carry request-layout, prepaint, and paint times, and any entity view phase whose own work (excluding nested views) takes 0.5 ms or more becomes a contributor named by its view type. Events also report counts per trigger, incidents during active use (within a minute of a key press, click, or scroll) with active seconds for rates per active hour, stall buckets, and contributor totals summed across every incident (`view:<type>:<phase>`, `action:…`, `task:…`). **Verification.** With a synthetic render delay on a 240 Hz display, on-time frames went from 99.9% at no delay to 0% at 6 ms. In a real Zed on Linux at 360 Hz, scrolling a markdown preview with #63138's per-frame code-block highlighting reintroduced roughly doubled missed refreshes per frame (3.2 to 6.0) and attributed the extra time to `MarkdownPreviewView`'s request-layout phase. Profiler overhead was +2.3% of main-thread time in a 1,500-view GPUI stress test and about 0.3% in the Zed scroll run. Not yet verified: Windows, and input-driven frames from real use. Time spent inside the platform submission (GPU, compositor) isn't measured on any platform. Release Notes: - [GPUI] Improved frame and hang telemetry to measure frames against each window's display refresh rate |
||
|
|
95d35c6efd
|
gpui_apple: Share CoreText, Keychain, and thermal services (#65058)
This moves three pieces of macOS platform code into `gpui_apple` so the upcoming iOS backend (#63068) can share them: the CoreText text system, the Keychain credential helpers, and thermal-state reporting. macOS behaves the same as before. Credential reads still return `None` when nothing is stored or the prompt is canceled, deleting a missing credential is still an error, and text rendering keeps font smoothing and dilation. Along the way the Keychain and OpenType code switch from hand-written FFI to the generated objc2 bindings, which also fixes an over-release of temporary CoreText feature strings, and thermal notifications now reach the main thread through a channel instead of a raw-pointer `dispatch_async_f`. It also replaces the old `core-video` crate with `objc2-core-video`, because `core-video` pulls in `io-surface` and `cgl`, which link OpenGL and break iOS builds. That changes GPUI's public surface API: `SurfaceSource`, `PaintSurface`, and `Window::paint_surface` now take `CFRetained<objc2_core_video::CVPixelBuffer>`, and LiveKit's video frames follow suit. I tested this with the gpui, gpui_apple, and gpui_macos test suites, including a new Metal test that renders a real NV12 pixel buffer, plus checks of the `zed` and `remote_server` builds; the iOS link was verified on the iOS branch. LiveKit playback and the Keychain paths are only compile-checked, so a quick sign-in/sign-out on macOS before relying on this is worth doing. Release Notes: - [GPUI] Added shared Apple CoreText text rendering, Keychain, and thermal-state services in `gpui_apple`, and migrated `SurfaceSource`, `PaintSurface`, and `Window::paint_surface` from `core-video`'s `CVPixelBuffer` to `CFRetained<objc2_core_video::CVPixelBuffer>` |
||
|
|
9ab0715969
|
agent_servers: Preserve initial ACP session updates (#65339)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Upgrade ACP SDK and derive to the published **3.2.0** release and use its prepared requests/cancellation handles to register new sessions before processing their first updates. Previously, `session/new` used an ordinary response future. A peer could reply and immediately send an update before foreground session registration, causing the update to be discarded as belonging to an unknown session. The prepared ordered callback now delivers the result to the creation task and waits for synchronous foreground registration to be acknowledged before later inbound dispatch proceeds. Caller abandonment explicitly requests RPC cancellation through the SDK-owned handle without discarding eventual response handling. If an abandoned caller receives a late successful session, Zed requests close when the peer advertises support. Peer rejection, EOF, and abandonment release the registration barrier; a failed creation does not terminate an otherwise usable connection. Default mode/config work remains asynchronous and is not awaited inside the barrier. The callback does not retain `Rc<AcpConnection>` or await later traffic on the same connection. Cancellation is request-scoped and cooperative, not cancellation of already-completed RPCs or ongoing session work. Client writes no longer hide already-captured agent stderr when startup fails. A deterministic interleaving regression covers this diagnostic-selection race without weakening the physical-process startup assertion or adding retries. Caller-drop cancellation uses the existing `util::defer` helper rather than a bespoke guard type. Release Notes: - Fixed initial ACP session updates being dropped and agent startup diagnostics being lost. |
||
|
|
cb981d5ac6
|
editor: Fix hover hiding delay when symbol_range is zero-width (#64032)
When a language server omits the `range` field in its hover response and
syntax tree fallback fails, Zed falls back to a zero-width hover range
(`anchor..anchor`). Previously, because the check used an exact offset
match, any slight cursor movement within the same symbol would treat it
as a new hover target, immediately dismissing the existing popover and
triggering repeated requests. This caused flickering and made it
impossible to move the cursor into the popover to interact with it.
This PR fixes the issue by falling back to `surrounding_word` when
checking if an anchor is contained within a zero-width hover range,
allowing cursor movement within the same word without dismissing the
popover.
Release Notes:
- Fixed hover popovers flickering or prematurely dismissing on mouse
movement when using language servers that omit range information.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
|
||
|
|
b47a4ca595
|
git_ui: Clarify remote-tracking branch delete in branch picker (#61793)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Closes #56525 # Objective Zed's branch picker shows a "Delete Branch" trash icon for both local and remote-tracking branches. For remote-tracking branches (e.g. `origin/feature`), this action only deletes the local tracking ref (`git branch -dr`) — it never contacts the remote, and the branch still exists on the actual remote repository. The label gives no indication of this, so users can't tell whether the action is local-only or will delete the branch upstream. ## Solution `Branch.is_remote()` was already used internally to pick the right git flag (`-d`/`-dr`) when deleting, but this distinction was never surfaced in the UI copy. This PR threads that same `is_remote` value through to the delete tooltip and branches the displayed text on it: - Local branch: unchanged — "Delete Branch" / "Force Delete Branch", with the existing "Hold alt to force delete" hint. - Remote-tracking branch: "Delete Local Tracking Branch" / "Force Delete Local Tracking Branch", with a "Does not delete the branch on the remote" hint. Also updated the stale `DeleteBranch`/`ForceDeleteBranch` action doc-comments, which still said "Deletes the selected git branch or remote" — a leftover from an earlier (already-fixed, see #48338) implementation that really did delete the whole remote config. No behavior change to the underlying delete logic — this is a copy-only fix that makes existing, correct behavior legible to the user, per [maintainer guidance on the issue](https://github.com/zed-industries/zed/issues/56525#issuecomment-5095069397). ## Testing - `cargo check -p git_ui` passes. - Manually verified in the branch picker: hovering the trash icon on a local branch shows the original text; hovering it on a `origin/...` remote-tracking branch shows the new "local tracking branch" text and meta line, for both the plain and alt-held (force) states. - No behavior/logic change, so no new automated test was added — purely a UI string change in `DeleteBranchTooltip::render`. - Reviewers: open a repo with at least one remote-tracking branch visible in the branch picker (`git fetch` a repo with a branch you don't have locally), hover the delete icon on it vs. on a local branch, and compare tooltip text. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Before: hovering the trash icon on `origin/feature` shows "Delete Branch" / "Hold alt to force delete" — identical to a local branch, no indication the remote is untouched. After: hovering it shows "Delete Local Tracking Branch" with meta text "Does not delete the branch on the remote". --- Release Notes: - Improved the branch picker to clarify that deleting a remote-tracking branch only removes the local ref, and removed the force delete option for remote-tracking branches since it had no effect. --------- Co-authored-by: Agus Zubiaga <agus@zed.dev> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
8f41da2520
|
Fix transparent Threads Sidebar backgrounds in some themes (#65343)
## Summary > PR #62597 changed the Threads Sidebar background color, but introduced a regression where the background becomes transparent in some themes, such as VSCode Dark Modern, which assigns a semi-transparent color to `surface_background`. > > This PR blends the Threads Sidebar background color with `background` to prevent it from becoming transparent. > > Additionally, while the default themes are unaffected, the Threads Sidebar background was found to be inconsistent with other panels in themes such as VSCode Dark Modern. To address this, this PR also changes the blended color from `surface_background` to `panel_background`, preserving the appearance of Zed's bundled themes while improving consistency in other themes. #62597でThreads Sidebarの背景色が変更されましたが、`surface_background`に半透明の色が割り当てられているVSCode Dark Modernなど一部のテーマでサイドバーの背景色が透明になってしまうリグレッションが発生しました。 このPRでは、Threads Sidebarの背景色を`background`とブレンドし、背景色が透明になることを防ぎます。 また、デフォルトのテーマでは問題ありませんが、VSCode Dark ModernなどではThreads Sidebarの背景色がほかのパネルと一致せず一貫性がなくなることが判明したため、ブレンドする色を`surface_background`から`panel_background`に変更しました。これにより、Zedに同梱されているテーマでの外観を維持しつつ、一部のテーマで背景色に一貫性を持たせます。 Before: <img width="867" height="457" alt="image" src="https://github.com/user-attachments/assets/c98e5063-abee-4110-bf6c-2b7ae91d2fbc" /> After: <img width="846" height="388" alt="image" src="https://github.com/user-attachments/assets/72e253c4-a713-4245-9c18-ce57572bbb6c" /> Closes #65310 ## Testing > Install a theme that assigns a semi-transparent or transparent color to `surface_background`, such as VSCode Dark Modern. > > Before this change, the Threads Sidebar background appears transparent (or white on Windows). After this change, the background remains opaque. VSCode Dark Modernテーマなど、`surface_background`に半透明または透明の色が割り当てられているテーマをインストールします。変更前はThreads Sidebarの背景色が透明(Windowsでは白色)になってしまいますが、変更後は不透明の背景色になります。 ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed an issue where the background color of the Threads Sidebar was transparent in some themes |
||
|
|
f495dd0f77
|
gpui: Track connected displays and each window's display (#65059)
Some checks are pending
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
GPUI now tracks connected displays and the display each window is on.
`App` caches every display's bounds and refresh interval, rereading them
whenever a platform reports that displays may have changed, and reports
`Added`, `Removed`, and `Changed { id, changes }` through
`App::observe_displays`. Windows report only moves between displays;
`Window::refresh_interval(cx)` reads App's cache, and
`Window`/`Context::observe_window_display` fire when a window moves or
its display changes, with App updated first. This is implemented on
macOS, Windows (whose platform window is now a hidden top-level window
so it receives `WM_DISPLAYCHANGE` and `WM_ENDSESSION` with no windows
open), and Wayland, and was exercised at runtime on all three by
switching refresh rates; X11 and web report no refresh interval, and
headless Linux now reports no displays. Planned consumers are
refresh-rate-aware frame telemetry and the screen-share display picker.
Release Notes:
- [GPUI] Added `App::observe_displays`, `Window::refresh_interval`, and
`observe_window_display` for tracking connected displays, their refresh
rates, and each window's display
|
||
|
|
b0048cde74
|
gpui_web: Avoid blocking Fetch response-body sends (#65334)
Replace the bounded `futures::mpsc` response-body channel with `async-channel`, using the workspace's default-features-disabled configuration. The browser Fetch pump runs on the main thread while response bodies can be consumed by workers. `futures::mpsc` locks an internal sender mutex during `poll_flush`; contention can attempt an unsupported `Atomics.wait` on the browser main thread. Release Notes: - [GPUI] Fixed a browser crash when streaming Fetch response bodies to background workers. |
||
|
|
20aff31323
|
edit_prediction: Update text fixture (#65336)
Release Notes: - N/A |
||
|
|
19c69782eb
|
Fix panic when EGL fails without reporting an error (#65329)
Pin `khronos-egl` to the Zed fork's defensive error-handling fix for
[FR-522](https://linear.app/zed-industries/issue/FR-522/zed-c82-called-optionunwrap-on-a-none-value).
An EGL call can fail while `eglGetError()` reports `EGL_SUCCESS`. The
binding currently unwraps the missing error, which caused the reported
panic during Wayland surface creation. The fork returns a distinct
`Error::Unreported` instead, preserves real EGL errors, and applies the
same rule consistently to failed-call wrappers.
- Fork commit:
[42214b3](
|
||
|
|
34d68ec5e6
|
editor: Fix text duplication when converting case with multiple cursors in one word (#65291)
## Summary Closes #64273 Running a case conversion (or any other `manipulate_text` command) with several cursors inside the same word inserted the converted word once per cursor: | Before | Upper case result | |---|---| | `some_ˇvariˇable_naˇme` | `SOME_VARIABLE_NAMESOME_VARIABLE_NAMESOME_VARIABLE_NAME` | ### Cause `manipulate_text` expands each empty selection to its surrounding word, so several cursors in one word produce identical ranges, and a cursor's word can also overlap other selections. The buffer coalesces overlapping edits by concatenating their texts, so the converted text was inserted once per selection. ### Fix After expanding, the ranges are sorted by start and overlapping ones are merged, then each merged range is transformed once. Sorting matters because expanding a cursor can move its range's start before earlier selections (e.g. `«a»b«cd»e|f`, where the cursor's word starts at `a`). Selections that only touch are kept separate, so non-overlapping selections behave exactly as before. This applies to every command that goes through `manipulate_text`: all case conversions, ROT13/ROT47, and Base64 encode/decode. ## Testing Added `test_multicursor_manipulate_text`, which reports every failing case at once. It covers: - multiple cursors in one word, and in two different words - a cursor's word partially overlapping a selection - a cursor's word starting before earlier selections - a conversion that changes nothing, which keeps the cursors unchanged ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] Tests cover the new or changed behavior. Release Notes: - Fixed case conversion and other text transformation commands duplicating the word when multiple cursors are inside it. |
||
|
|
f1a10a5227
|
agent: Add telemetry for checkpoint action usage (#65326)
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> ## Summary What problem does this solve, how, and why does this change matter? Use "Closes #123" for each issue resolved. Include artifacts produced when testing: before/after screenshots, GIFs, videos, benchmarks. ## Testing Manually test your changes; report results, mention platforms if relevant. How can reviewers test this easily? Include setup and steps. ## Self-review - [ ] I've reviewed my diff for quality, security, reliability, and performance. - [ ] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [ ] Tests cover the new or changed behavior. Release Notes: - Added telemetry for usage of checkpointing feature in the agent panel. This telemetry is opt-in and has no effect with telemetry disabled. Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
67b41bf976
|
Upgrade ACP SDK to 3.1.0 (#65274)
The temporary pin is the immutable commit
[`015845a19fc31752c02367567d3b8900a406f9da`](
|
||
|
|
4240146813
|
Cancel ACP elicitations on transport disconnect (#65282)
Cancel outstanding ACP elicitations when the transport reaches EOF or fails, including idle session threads and connection-scoped request stores retained by the application. Previously, detached elicitation waiters observed peer `$/cancel_request`, but bare EOF did not settle their canonical entries. Process-exit handling and turn/auth cleanup covered some workflows, not retained idle owners. - Register SDK `on_close` cleanup through the existing foreground queue and await its acknowledgment. Accepted requests register before cleanup; no process exit or active turn is required. - Share the cleanup operation with the SDK-future failure path, because transport errors can bypass the clean-EOF callback. Run it once, surface cleanup failures, and preserve the original connection error if both fail. - Reuse existing thread/store cancellation. Session references stay weak until synchronous application; there is no new store or connection-owner cycle. - Apply URL completion synchronously in foreground queue order, so final accepted completion cannot be overtaken by disconnect cancellation. Release Notes: - N/A |
||
|
|
3914477312
|
acp_thread: Share v2 compaction updates (#65254)
Share SDK v2 compaction updates/chunks through the existing compaction owner while keeping production ACP wire handling and capability advertisement v1. This completes the shared compaction-adapter slice after #65235, #65241, and #65248. - Add explicit v1 update/chunk adapters preserving opaque ID Arc payloads, known/future/custom statuses, all decoded content, metadata scopes, and omitted/null/value patch distinctions. - Retain compaction-owned metadata with whole-map replacement semantics. Chunk metadata remains delivery-scoped and never patches aggregate compaction metadata. - Use the existing `MessageContent` container for canonical summary blocks plus derived rendering. Preserve text/image metadata and full rich/unknown content rather than losing source details during rendering. - Preserve the compaction-specific presentation policy: adjacent text coalesces, empty-first text produces the same Markdown block, links remain standalone, and rich/image/unsupported content uses the existing renderer. - Keep first-seen timeline placement, update events, unknown-ID/late-chunk ignoring, native streaming/delta/status behavior, detail visibility, labels/layout/expansion, search entity identity/refresh, and export separators unchanged. ## Review guide - [explicit v1 adapters]( |
||
|
|
dc3fb21676
|
markdown: Fix image alignment in HTML blocks (#63166)
Some checks are pending
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
# Objective Fixes a regression of #51062 introduced by #56427. Images inside center- or right-aligned HTML blocks render left-aligned in Markdown Preview. This is a regression: #53196 originally fixed the alignment, but the image-rendering changes in #56427 moved images into a wrapping flex container without carrying over the alignment mapping. Text alignment still works, which makes the problem easy to miss. A centered heading is centered, while a centered logo or badge row is left-aligned. ## Solution `push_image_child` turns the current container into a flex row so multiple images can wrap. Once the container becomes a flex row, `text_align` no longer positions its children; `justify_content` does. This restores the mapping from `TextAlign::Left`, `Center`, and `Right` to the corresponding flex justification while preserving the `flex_wrap` and `items_start` behavior added by #56427. Both `align="..."` and `style="text-align: ..."` already resolve to `TextAlign`, so the fix applies to both forms, including images nested inside links or headings. ## Testing - `cargo test -p markdown --lib` - Added `test_image_child_container_follows_text_align`, which checks the rendered container's justification for left, center, and right alignment. - The existing tests from #53196 cover parsed alignment, but not the resulting flex container. They continued to pass when the rendering behavior regressed. - Manually checked on macOS with a centered image, a centered row of linked images, and a right-aligned image. <details> <summary>Used this markdown to test:</summary> ```markdown # HTML image alignment ## Centered image <p align="center"> <img width="120" src="https://raw.githubusercontent.com/zed-industries/zed/main/crates/zed/resources/app-icon.png"> </p> ## Centered linked images <p align="center"> <a href="https://zed.dev"><img width="96" src="https://raw.githubusercontent.com/zed-industries/zed/main/crates/zed/resources/app-icon.png" alt="Zed"></a> <a href="https://github.com/zed-industries/zed"><img width="96" src="https://raw.githubusercontent.com/zed-industries/zed/main/crates/zed/resources/app-icon.png" alt="Zed repository"></a> </p> ## Right-aligned image <p align="right"> <img width="120" src="https://raw.githubusercontent.com/zed-industries/zed/main/crates/zed/resources/app-icon.png"> </p> ``` </details> ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase <details> <summary>Screenshots: </summary> | Before | After | | --- | --- | | <img width="469" height="786" alt="Snapzy_2026-08-25_01-04-21_153" src="https://github.com/user-attachments/assets/b82f4dfe-df77-4ff5-8d14-a92964a2e834" /> | <img width="469" height="786" alt="Snapzy_2026-08-25_00-59-00_221" src="https://github.com/user-attachments/assets/edf472f1-1df9-4e5a-ba75-33d418227873" /> | These screenshots were captured from the standalone `markdown` crate example (I did not build the full Zed app for this comparison). </details> --- Release Notes: - Fixed image alignment in HTML blocks in Markdown Preview --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
4ce1fdd576
|
acp_thread: Skip git checkpoints for threads that can't restore them (#65304)
Partially addresses
[#62283](https://github.com/zed-industries/zed/issues/62283) and
[#58444](https://github.com/zed-industries/zed/issues/58444).
Before Zed sends a prompt, it waits for a Git checkpoint of every
repository in the project, even in threads that can never restore one.
In large workspaces, this can delay sends and max out the CPU. On
Windows it can be worse. The [investigation in
#62283](https://github.com/zed-industries/zed/issues/62283#issuecomment-5345773750)
found `git update-index` waiting forever for stdin EOF, so the prompt
never reaches the agent.
This skips checkpoints in threads that can't show the Restore Checkpoint
button:
- **External agents.** Zed's ACP connection doesn't support truncation,
so these threads never get the button. Only the initial checkpoint
needed skipping, because the later updates already return early for
messages with no client-generated IDs, which `AcpConnection` [never
provides](
|
||
|
|
cb73ee1d45
|
debugger_ui: Enable search in debugger terminal panel (#56863)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
When a debug session is running, pressing cmd-f (or using Edit → Find) in the terminal panel had no effect. Three things were missing: - The debugger panes never had a BufferSearchBar added to their toolbar, so there was no search UI to deploy. - SubView::as_searchable returned None for all item kinds, so even if a search bar were present it could not find a search target. - RunningState::render did not wrap its output with the pane search action handlers, so buffer_search::Deploy was never handled. Fix all three: - Register BufferSearchBar on each debugger pane toolbar via the PaneSearchBarCallbacks global (same pattern as terminal_panel). - Implement SubView::as_searchable for Terminal kind, delegating to the inner TerminalView which already implements SearchableItem. - Wrap RunningState::render with wrap_div_with_search_actions so the Deploy action reaches the active pane's toolbar. - Add refresh_terminal_toolbars to re-fire toolbar.set_active_item when the terminal entity is set, covering the case where the Terminal tab was already active before the terminal was created. Only refreshes panes where the Terminal subview is currently the active item. Add a test that verifies the active debugger pane toolbar has a BufferSearchBar after a session starts. 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 Fixes #38409 Release Notes: - Fixed `cmd-f` search not working in the debugger terminal panel. --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> |
||
|
|
da0a7a78cf
|
markdown: Fix code block scrollbar track leaking past rounded corners (#64978)
When hovering a horizontally scrollable code block, the scrollbar track was painted with square corners. Since GPUI content masks are rectangular, the parent's rounded border didn't clip it, so a small corner of the track showed outside the code block's rounded border. This adds `Scrollbars::track_corner_radius` to round the track's outer corners, and markdown code blocks now pass their inner corner radius (corner radius minus border width). Before: <img width="400" alt="CleanShot 2026-09-30 at 3 57 50 PM@2x" src="https://github.com/user-attachments/assets/a90372cf-c668-4469-8dea-058a795888be" /> After: <img width="300" alt="CleanShot 2026-09-30 at 4 00 08 PM@2x" src="https://github.com/user-attachments/assets/cf6c384e-3c93-4a79-9479-d390974c4b67" /> Release Notes: - Fixed a visual artifact at the corners of scrollable code blocks when hovered. |
||
|
|
a34a062bb7
|
Update edit prediction messaging for the Free plan (#65258)
Starting Oct 7th, the free plan will no longer include Zed's hosted edit predictions. ## Testing - Added `test_free_plan_edit_predictions_ended_for_zed_provider`. It covers: - the Free vs Pro plan rule, with Cloud still reporting a 2,000 allowance - the default vs explicitly chosen provider - the Ollama exclusion - the notice only firing when the user accepted predictions - All `edit_prediction` tests pass. - Clippy with `--deny warnings` passes on the touched crates. - The docs pass prettier. - Screenshots of an earlier revision were captured with the visual test runner. The latest copy and the Copilot removal haven't been checked in a running build. Release Notes: - N/A |
||
|
|
4882254fae
|
remote: Batch SSH environment queries (#65065)
## Summary Connecting to my server I regularly use takes about 4 seconds. Previous implementation used 3 sequential commands to detect the remote environment, since windows does not support multiplexing, these queries alone could take around 12 seconds. This change batches those queries into a single script. ## Testing Added some unit tests for the parsing logic, although they are still fairly example-based. I tested the changes on my own machines as well. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [ ] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Batch SSH environment queries --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
7ca96c2a58
|
Keep remote agent secrets out of launcher arguments (#65174)
Closes https://github.com/zed-industries/zed/issues/64511 Release Notes: - Fixed remote agent secrets exposed in the launcher arguments |
||
|
|
46b11cc550
|
Fix settings sidebar selection when scrolling (#65172)
## Summary Closes #65156. Update the settings sidebar selection when scrolling through subsections. Allow the final short subsections to scroll into position, and update selection as the next header's surrounding region reaches the top of the content viewport. ## Testing - Built and ran Zed locally on Windows; manually verified by the contributor. - Passed 9 navbar tests and the settings content viewport regression test. - Passed `cargo fmt --package settings_ui -- --check` and `git diff --check`. To reproduce: open Settings, expand Window & Layout, and scroll the content down and back up. Check that the sidebar follows the visible subsection, including Pane Modifiers and Pane Split Direction at the end. Clicking a sidebar subsection should still scroll to it. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. ### Settings sidebar follows scrolling https://github.com/user-attachments/assets/eaf298c5-ef50-4741-a90a-066120ae313a Release Notes: - Fixed settings sidebar selection to follow scrolling through settings --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
6110aa61e1
|
Improve icon handling on startup (#65173)
## First commit Preload initial project panel icons before drawing Preload the initial project panel icons through the asset cache. Measurements (warm macOS launches): - Time to complete Catppuccin Frappe icons: reductions of 4.0 ms and 16.2 ms in two runs of 10 pairs. - Time to first nonblack captured frame: increases of 16.6 ms and 2.3 ms; all 16 icons were present in every candidate launch. ## Second commit Reuse unchanged icon families during startup instead of loading them twice. Reuse icon families with unchanged source bytes and paths until extensions finish loading. Include file paths in theme-read errors. Measurements (warm macOS launches): - Time to first captured complete Catppuccin Frappe icons: paired median reductions of 6.2 ms and 5.0 ms in two runs of 10 pairs. - Capture gaps in the repeat run reached 216.7 ms. Release Notes: - Improved startup time when custom icons are used |
||
|
|
786be276c7
|
Index restored editor selections and preserve their order (#65171)
Measurements (warm macOS launches): - Time to captured active-file header, restoring 256 tabs with 17 selections each: reductions of 37.8 ms and 35.5 ms in two runs of 30 pairs. - With one caret per tab: paired median reduction of 4.7 ms. - Without tab restoration: no observed improvement. Release Notes: - Improved Zed's startup time when hundreds of selections are restored |
||
|
|
56303a3372
|
audio: Recover from notification output stream failures (#65158)
Closes https://github.com/zed-industries/zed/issues/64962 Update CPAL and rodio to remove the uninterruptible ALSA write retry loop. Discard failed output streams so subsequent notifications can reopen the device. Preserve recoverable underruns, cancel stale error handlers on teardown, and keep existing output buffer defaults. Release Notes: - Fixed audio thread failing to properly stop on errors |
||
|
|
976ab33fb4
|
Reduce release binary sizes (#65168)
Not sure how worth such optimization is WRT the speed, but for such gains, seems worth opening to discuss? ----------- Optimize selected workspace crates for size and hide Rust exports in macOS bundles. Measurements (release editor executable size): | Platform | Architecture | Before (bytes) | After (bytes) | Reduction (bytes / %) | | --- | --- | ---: | ---: | ---: | | macOS | ARM64 | 258,218,240 | 172,524,896 | 85,693,344 / 33.19% | | Linux | x86_64 | 317,435,136 | 295,344,952 | 22,090,184 / 6.96% | | Windows | x86_64 | 358,987,776 | 256,678,400 | 102,309,376 / 28.50% | Release Notes: - Reduced Zed's binary size |
||
|
|
83b332342f
|
Support inlay hint edits via double clicks and AcceptInlayHint action (#64789)
Closes https://github.com/zed-industries/zed/discussions/51582 https://github.com/user-attachments/assets/fb4ae2c2-c134-4c7c-8fea-e886b085fc32 Limitations: * we cannot accept all inlay hint at once, as each of them may apply contradicting text edits (e.g. altering imports) * next hint will be accepted with a slight delay, as, after the edit, we need to re-fetch the hints and then resolve that new hint to get the edits Release Notes: - Supported inlay hint edits via double clicks and `AcceptInlayHint` action |
||
|
|
01f22d2d86
|
util: Expose Windows job activity for child processes (#64870)
Waiting for a direct child to exit does not establish that its Windows
Job Object is empty. Helper processes can remain active after the parent
exits, but the process wrapper did not expose the job's activity to
callers.
Add the Windows-only
[`Child::has_running_processes()`](
|
||
|
|
7262175465
|
Bump Zed to v1.25.0 (#65285)
Release Notes: - N/A Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com> |
||
|
|
eb466341a6
|
project_panel: Allow dropping external files on folded directory components (#65259)
## Summary Closes #65091 In the project panel, a folded directory path like `a/b/c` is rendered as separate components. Internal drags (`DraggedSelection`) could already be dropped on any component or separator, but external files dragged in from the OS could only be dropped on the deepest directory. This is the case from the issue: files dragged onto `upper_folder` in a folded `upper_folder/lower_folder` always ended up in `lower_folder`. This adds `ExternalPaths` drag-move and drop handlers to each folded path component and to the separators between them, so external files land in the directory that was actually hovered. The hover highlight follows the same path as for internal drags. The duplicated drag-target bookkeeping in the `DraggedSelection` handlers is moved into `update_folded_directory_drag_target`, so both drag types share it. Before: <img width="1100" height="688" alt="before" src="https://github.com/user-attachments/assets/94af5bb9-f727-4bd0-80ed-5713790b7f65" /> After: <img width="1100" height="688" alt="after" src="https://github.com/user-attachments/assets/dee1f581-ae7d-48b0-9d08-19e671fc63e5" /> ## Testing Added `test_drop_external_files_on_folded_directory_components`, which drops an external file on each of `a`, `b` and `c` in a folded `a/b/c` and checks that it lands in that directory and that the drag state is cleared afterwards. The test fails without the new drop handlers (the drop on `b` ends up in the wrong directory). Manually tested on macOS 27. The issue was reported on Windows, which I have not tested. 1. Enable `auto_fold_dirs` and open a project containing a nested chain of single-child directories, e.g. `a/b/c`. 2. Drag a file from the OS file manager onto `a`, `b`, `c` and onto a `/` separator. 3. The file is created in the hovered directory, and only that component is highlighted while dragging. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed dropping external files onto a specific directory in a folded path in the project panel --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
dc000222a9
|
Fix SSH config host refresh in the remote projects picker (#65246)
## Summary Opening Remote Projects could leave SSH aliases missing even though they were present in the local SSH config. When asynchronous discovery finishes after the initial picker refresh, the watcher reloads the delegate but does not reset the list's cached item count. Config edits can likewise leave visible rows stale. Refresh the picker through `refresh_default_picker` after each SSH config update, using the window context. This synchronizes the visible rows with the discovered hosts and reapplies the current search query. ## Testing - Built and ran the patched application on macOS arm64; the author manually reviewed and verified that the fix works. - All 37 `recent_projects` library tests passed. - Both new rendered-UI regression tests failed with the original watcher and passed with the fix. They cover host addition/removal, empty config, and preserving an active search filter. - Formatting and whitespace checks passed. Automated test command: ```sh cargo +1.98.1 test --locked -p recent_projects -p gpui_platform --features gpui_platform/runtime_shaders --lib ``` The runtime shader feature was used because the local machine has Command Line Tools without the full Xcode Metal toolchain. Relevant test results: ```text Original watcher: 0 passed; 2 failed Patched recent_projects suite: 37 passed; 0 failed ``` To verify manually, open Remote Projects with `read_ssh_config` enabled and check that configured aliases appear without typing. With the picker open, add or remove a concrete `Host` alias in the SSH config and verify the rows update. Repeat with a search query active. ## Self-review - [x] The change has been reviewed and manually verified by the author. - [x] Tests cover the changed behavior, including rendered rows and active filtering. - [x] The fix uses the existing picker refresh path and introduces no new UI controls. ## Suggested .rules additions For `recent_projects` modal rendering tests, create a `MultiWorkspace` window containing the test `Workspace`. A bare `Workspace` window does not render the modal layer, so rendered-row assertions cannot observe the picker. Release Notes: - Fixed SSH config hosts sometimes remaining missing or stale in the remote projects picker. --------- Co-authored-by: Finn Evers <finn.evers@outlook.de> |
||
|
|
3190b1f5e3
|
project_panel: Fix shift-click and shift-arrow selection for folded directories (#65266)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
## Summary > When selecting a range with shift-click, intermediate folded directories are now fully included by resetting their active index. This ensures drag and drop operations move or copy the entire directory. Shiftキーを押しながらクリックして範囲を選択する際、途中にある折りたたまれたディレクトリも、アクティブインデックスをリセットすることで完全に含まれるようになりました。これにより、ドラッグ&ドロップ操作によってディレクトリ全体が移動またはコピーされるようになります。 ## Follow-up changes - Shift-up/down now also select entire folded directories: every row you move onto resets to its outermost directory, while the starting row keeps the segment you clicked. - Shift-up/down now include the starting entry in the selection; previously only the rows moved onto were marked. - Tests cover both shift-click and shift-arrow range selection. Before <img width="239" height="443" alt="Zed 1 21 0 Version- 1 21 0+stable" src="https://github.com/user-attachments/assets/f5e76da7-31b3-4a4e-83c5-763eca253a17" /> After <img width="239" height="443" alt="Zed 1 21 0 Version- 1 21 0+stable fixed" src="https://github.com/user-attachments/assets/04de8627-85f6-475f-876d-9f82afccfeea" /> ## Testing > Manually verified the reported scenario: with d and f active, clicking a, Shift-clicking other, and dragging the selection to the project root moves the entire c/d and e/f directory chains, leaving root empty. Automated tests also passed on macOS (Apple Silicon): all 138 project_panel tests. Both new regression tests fail without the fix and pass with it. 報告した操作を手動で確認済みです。d・f をアクティブにした状態から、a をクリックし、other を Shift-click してプロジェクトルートへドラッグすると、c/d・e/f が親ごと移動し、元の root は空になります。 自動テストも macOS(Apple Silicon)で全138件成功しました。追加した回帰テスト2本は、修正なしでは失敗し、修正ありでは成功します。 ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed shift-click and shift-up/down selection in the project panel not including entire folded directories, and shift-up/down not including the starting entry. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
e5ff5550e4
|
Fix UTF-8 boundary crashes in syntax parsing (#65273)
Tree-sitter input callbacks receive byte offsets, which can fall inside a UTF-8 character. Both language parser entry points previously sought to that offset, sliced the rope chunk as `str`, and only then converted it to bytes. This could panic while reparsing after an agent edit. - Add `Chunks::peek_bytes` and use it in both parser callbacks, preserving the exact requested offset without allocating or rounding to a character boundary. - Share the chunk slice-range computation with string and bitmap peeks, preserving their existing UTF-8 requirements. Document that constructing a `Chunks` cursor still requires an aligned initial offset. - Use `Rope::bytes_in_range` for query text providers and add a query-predicate regression for error nodes starting inside multibyte characters. - Add parser regressions for two-, three-, and four-byte characters and nonzero syntax-layer origins; compare results with parsing contiguous bytes. - Exercise forward/reverse seeks across rope chunks, bounded ranges starting or ending inside characters, and EOF/empty input. Release Notes: - Fixed a crash when syntax parsing requested bytes inside a multibyte character. |
||
|
|
98e168265b
|
agent: Skip redundant thread saves while a response streams (#65244)
Closes #64823 While the agent replied, every streamed chunk saved the whole thread: serializing it to JSON, compressing it, and rewriting the SQLite row. The streamed text isn't saved until its message completes, so nearly all of these writes were identical. Now the thread is not saved while a message is streaming, unless a message has completed or a setting, the title, or the draft prompt changed since the last save. Measured on a 16.6 MB thread (0.76 MB compressed) while the agent replied to one prompt for ~40s: | | Before | After | |---|---|---| | Full-thread saves during the reply | 836 (~21/s) | 2 | | Zed's memory (Activity Monitor) while streaming | 1.34 GB → ~2.2 GB | stays flat | | CPU while streaming | ~75% of a core | ~35% of a core | Before: Initial: <img width="1424" height="200" alt="CleanShot 2026-10-06 at 8 36 34 PM@2x" src="https://github.com/user-attachments/assets/b3065bca-a881-4ff5-9eda-92ced2659554" /> Streaming: <img width="1430" height="212" alt="CleanShot 2026-10-06 at 8 37 20 PM@2x" src="https://github.com/user-attachments/assets/589842b9-7893-4750-8911-4362e981de7c" /> After: Initial: <img width="1358" height="182" alt="CleanShot 2026-10-06 at 8 41 22 PM@2x" src="https://github.com/user-attachments/assets/ea55e40e-4d8c-4218-bf52-6285d7285963" /> Streaming: <img width="1352" height="194" alt="CleanShot 2026-10-06 at 8 38 20 PM@2x" src="https://github.com/user-attachments/assets/616ccede-6303-4da6-96e2-29803aad28aa" /> Release Notes: - Improved memory and CPU usage while the agent responds in long threads. |
||
|
|
8323e23277
|
Fix hanging during remote project search (#65257)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Closes https://github.com/zed-industries/zed/issues/65099 Before: https://github.com/user-attachments/assets/36673f06-75b2-4d36-a8d9-4aaaa6bc1768 After: https://github.com/user-attachments/assets/86a4e129-e1de-465f-9e70-fcec9d421c03 Issues: - The host checked files that were not yet open for matches, but treated every already-open buffer as a candidate. Earlier queries leave thousands of buffers open, so later queries sent all of them to the client: 3,339 buffers for 51 real matches in one case. Open buffers are now checked against their in-memory text first, which also stops ordinary non-SSH searches from reporting open buffers with no matches. - The host queued every candidate buffer's full contents without waiting for the client, so data from cancelled queries piled up in front of the new query's results. A single worker shared by all searches now sends at most 64 buffers or about 1 MiB before waiting for the client to acknowledge them, and skips batches from cancelled searches. - Cancelling a search could stop a buffer transfer after the buffer was already marked as shared, so later searches waited forever for its contents. `BufferStore` now owns transfers, so dropping the caller no longer cancels them. Release Notes: - Fixed hanging during remote project search |
||
|
|
eba6365025
|
which_key: Stop grouped rows from hiding keybindings that complete on the next keystroke (#64942)
This has been the behavior since which-key was introduced.
When a key both completed a binding and started longer ones, the
which-key popup and the pending keystrokes indicator folded them all
into one `+N keybinds` row, so there was no way to see what pressing
that key alone would do. For example, with this keymap:
```json
[
{
"context": "Workspace",
"bindings": {
"space f": "file_finder::Toggle",
"space f g": "pane::DeploySearch",
"space f r": "projects::OpenRecent"
}
}
]
```
pressing `space` showed `f +3 keybinds`. It now shows `f file finder:
toggle` as its own row, and only the longer bindings are grouped (`f +2
keybinds`). A single longer binding is shown as a regular row.
Group counts also counted duplicate bindings for the same keys when they
weren't next to each other in the list (e.g. `+3` where the next level
only shows 2 rows). Duplicates are now removed before grouping, keeping
the binding key dispatch tries first.
Before:
<img width="200" alt="CleanShot 2026-09-29 at 10 16 01 PM@2x"
src="https://github.com/user-attachments/assets/fe46c218-da7c-431a-bb23-92b0799003ad"
/>
After:
<img width="200" alt="CleanShot 2026-09-29 at 10 15 49 PM@2x"
src="https://github.com/user-attachments/assets/2ce1280a-63bf-4dfc-b589-769dc84c307e"
/>
Release Notes:
- Fixed the which-key popup and pending keystrokes indicator hiding what
a key does when that key also starts longer keybindings.
|
||
|
|
57df168fe7
|
settings_ui: Render font picker options in their own font family (#64199)
# Objective While selecting a font in appearance settings, every option in the picker appeared in the selected UI Font with no visual difference. This PR renders each option in its own font family, serving as a preview for selecting. ## Solution Each row in the font picker now wraps its label in a `div` with its own font family, so the label inherits the typeface. One renderer serves all `FontFamilyName` settings - so Buffer, UI, Agent Panel, and terminal font pickers all get the new preview. ## Testing `fmt`, `./script/clippy -p settings_ui,` and `cargo test -p settings_ui` all pass. Manually verified on macOS in a debug build. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase Before <img width="3600" height="2338" alt="image" src="https://github.com/user-attachments/assets/baed5f40-f997-4d68-87d8-ea86cb8889ca" /> After <img width="3600" height="2338" alt="image" src="https://github.com/user-attachments/assets/5dacb8af-160f-422c-be06-4b1ba5302e3e" /> --- Release Notes: - Improved the font family pickers in the settings window to render each option in its own font as a preview. |
||
|
|
d6358b2d3c
|
gpui_wgpu: Fix fallback fonts disappearing from the font database on Linux (#65269)
Closes #61660 On Linux, `load_family` skips any font without an `m` glyph, since the editor uses the width of `m` for layout and would panic otherwise. That part's fine. The problem is it also deleted the font from the fontdb database, and has since the cosmic-text port (#7539). That hurts because fonts like Arabic, Hebrew, Devanagari, Noto Color Emoji and Symbols Nerd Font have no `m`, and they're exactly what cosmic-text falls back to for glyphs your main font doesn't have. So if one of them ever went through `load_family`, say because you put it in `buffer_font_fallbacks`, it was gone for the rest of the session and that script showed up as empty boxes. It also blocks #64199, where the font picker renders each row in its own font. On Linux that would call `load_family` on every installed font and wipe out all the non-Latin and emoji ones. Running the Linux text system against the fonts on my Mac, 334 of 806 faces got removed. This keeps the `m` check and drops the removal. You still can't use these as your buffer or UI font, but fallback works again. --- Tested on Ubuntu 24.04. By default, emoji render because cosmic-text finds Noto Color Emoji on its own: <img width="400" alt="control-no-fallbacks" src="https://github.com/user-attachments/assets/ac9b5aa1-fb06-4033-9ca1-1f4938b34839" /> Setting `"buffer_font_fallbacks": ["Noto Color Emoji"]` sends the font through `load_family`, which deleted it from the database since it has no `m`, so emoji turned into empty boxes: <img width="400" alt="before" src="https://github.com/user-attachments/assets/0af20580-f074-4522-a4b2-9c0a1312594f" /> With this PR the font stays in the database and emoji render again: <img width="400" alt="after" src="https://github.com/user-attachments/assets/a1fe9e91-dc8e-413d-a89f-d0968c410a6e" /> Release Notes: - Fixed emoji, symbol and non-Latin fonts rendering as empty boxes on Linux after being used as a font fallback. - [GPUI] Fixed fonts without an `m` glyph being removed from the font database on Linux (`gpui_wgpu`) when loaded by family name, which broke fallback for emoji, symbol and non-Latin text. |
||
|
|
b0d4fd203d
|
markdown: Fix the --- separators being parsed as YAML metadata blocks (#64162)
# Objective Fixes #64159 `ENABLE_YAML_STYLE_METADATA_BLOCKS` is enabled for the whole document whenever metadata rendering is on. pulldown-cmark then treats any unindented `---` line followed later by another `---` as a metadata block, so ordinary section separators in Markdown Preview and the Agent Panel swallowed the text between them and rendered it as a code-style box. ## Solution Frontmatter only exists at the start of a file, so the parser now: - probes with the YAML option only when the document starts with `---`, and keeps the first block if pulldown-cmark reports a YAML metadata block there; - parses the rest of the document with the YAML option off; - shifts the body's event ranges and link definition spans back to offsets in the original text. ## Testing - `test_yaml_frontmatter_does_not_consume_body`: frontmatter in LF, CRLF, and `...`-closed forms, and none at all. Checks that both body separators are rules, the section between them keeps its heading, bold text, and reference link, and that every event range and heading offset still points into the original text. - `test_body_separators_are_not_yaml_metadata`: parsing with metadata rendering on and off must give identical results for separators in the body, inside a blockquote, inside a list item, and after a leading blank line. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase The theme differs in the two screenshots because the "After" one was taken in a local dev build with default settings. Only the rendering of the `---` sections is relevant. Before: <img width="675" height="505" alt="Screenshot 2026-09-13 at 22 30 49" src="https://github.com/user-attachments/assets/2df3d95d-23c9-46a5-9278-53c3894135a0" /> After: <img width="610" height="421" alt="Screenshot 2026-09-13 at 22 29 08" src="https://github.com/user-attachments/assets/d616c46c-95cc-408d-99a1-70f1f8d3c4b4" /> --- Release Notes: - Fixed Markdown Preview and the Agent Panel rendering the text between two `---` separators as a YAML metadata block. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
72d073d642
|
Fix agent file link navigation (#64748)
Closes https://github.com/zed-industries/zed/issues/56633 Related to https://github.com/zed-industries/zed/issues/56067 Related to https://github.com/zed-industries/zed/issues/63968 Changes path handling to open files in the agent panel similar to what cmd-click does: regular open for files from the project, singe-file worktrees for files outside of the project Release Notes: - Fixed agent file link navigation |
||
|
|
6ec43d6319
|
agent: Improve error messages when missing parameters (#65245)
See #62142 Release Notes: - Improved tool call response error messages when an invalid or incomplete response is given by the model Co-authored-by: Tanner Hobson <thobson125@gmail.com> |
||
|
|
c3ab5564f8
|
agent_ui: Scroll to AskUserQuestion Other answers (#64007)
# Objective - After answering AskUserQuestion / `ask_user` with a typed Other reply, "Scroll to User Message" jumped to the original prompt instead of the steering text. - Fixes #63942. ## Solution - Typed Other answers are stored on an accepted session elicitation linked to a `ToolCall`, not as `UserMessage`. - Added `AcpThread::is_user_authored_scroll_target` in `crates/acp_thread/src/acp_thread.rs`. It matches a `UserMessage`, or a `ToolCall` whose id is referenced by an accepted session elicitation (`scope.tool_call_id`). - Turn-end, fallback, and prev/next user-message navigation in `crates/agent_ui/src/conversation_view/thread_view.rs` share that matcher. - Left the harmless "Scroll to user message" icon on the first message alone. Sibling of #63901. That PR skips `<task-notification>` `UserMessage` entries. This PR counts accepted elicitation `ToolCall`s. They touch the same `rposition` / `scroll_to_user_message_index` sites. A merge should keep both. ## Testing - Yes. Added `test_scroll_to_user_message_lands_on_ask_user_elicitation_answer` and ran: ``` cargo test -p agent_ui --features test-support test_scroll_to -- --nocapture ``` Result: 3 passed (including the new test). The synthesized thread is `[UserMessage, ToolCall, Elicitation, AssistantMessage]`. Scroll lands on `item_ix == 1` (the tool call), not `0`. - Reviewers can run the same `cargo test` command, or follow the steps in #63942. - Tested via unit tests on Linux. Scroll targeting is not platform-specific. <img width="1400" height="900" alt="image" src="https://github.com/user-attachments/assets/c549cf23-ebbf-4b33-98b1-cd48c27ebe08" /> https://github.com/user-attachments/assets/9771e770-56f5-4e63-bf2d-51674f59d469 ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed "Scroll to User Message" so it lands on typed answers to AskUserQuestion --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
73be6ac6b1
|
acp_thread: Share v2 elicitation values (#65248)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Share SDK v2 elicitation requests, schemas, responses, scopes, IDs, and errors through the existing owners, UI, and native producers. Keep production ACP traffic and capability advertisement v1 with explicit adapters. Based on main with #65235 merged. - Preserve every runtime SDK schema field, ordered choices/items/required names, constraints/defaults, optional versus empty values, nested metadata, opaque IDs, and raw `Other` payloads. - Convert decoded v1 requests once; lower v2 responses inside the existing RPC cancellation boundary; retain v1 error code/message/data. No production serde bridge, schema normalization, or wire-parsing shim. - Preserve existing scoping, local request identity, weak owners, settlement/events, HTTP(S)/host validation, consent-before-completion, and stale-submission guards. Unsupported modes still reject before pending insertion. - Keep unknown string formats as annotations without bypassing known patterns, inferring URLs, or adding controls. UI projection/submission does not modify the canonical request. - Native producers build v2 directly and wrap legacy session/tool ID Arc payloads without normalization. Preserve `ask_user` answer precedence and error/cancel handling; unrelated tool APIs stay v1. - Unknown actions remain `Other` on wire and retain the existing local canceled fallback, never acceptance. ## Review guide - [explicit adapters]( |
||
|
|
f87356210a
|
acp_thread: Share v2 notice definitions (#65241)
Share SDK v2 notice definitions across the existing live session owner and notice UI. One explicit v1 adapter feeds the same insertion path used by direct v2 values; production ACP remains v1. - Preserve all notice fields, opaque future/custom severity strings, plain text, nested notice metadata, and absent versus empty optional values. - Keep monotonically assigned local IDs, duplicate live events, independent/idempotent dismissal, and the existing notice update/notify lifecycle. - Keep notices out of transcript/history/export, title, conversation metadata, activity/error state, and permissions. - Keep the existing severity presentation, unknown-severity fallback, controls, mouse dismissal, and keyboard focus restoration unchanged. - Preserve the current v1 beta/capability advertisement. V2 notices do not require client capability advertisement, but this slice adds no v2 wire handler or backend. ## Review guide - [explicit v1 adapter]( |
||
|
|
e7526b378a
|
Fix text selection in thinking previews (#65231)
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Waiting to run
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_remote_server_linux_x86_64 (push) Blocked by required conditions
run_tests / check_remote_server_mac_aarch64 (push) Blocked by required conditions
run_tests / check_remote_server_windows_x86_64 (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
Make the decorative fade overlay in Thinking previews mouse-transparent so selection and right-click copying reach the underlying Markdown. Closes #65110 Release Notes: - Fixed text selection and copying in Thinking previews in agent threads. Co-authored-by: Kunall Banerjee <hey@kimchiii.space> |
||
|
|
fdc1005e71
|
Fix worktree creation on Windows remote from Unix host (#63075)
# Objective Closes #63067 Another issue with path handling when connecting from Unix to a Windows remote, similar to #62038. When we create a git worktree from Zed's title bar, Zed computes the target path using many standard library `Path` APIs, such as `Path::file_name()`, `Path::parent()`, and `Path::starts_with()`. All of these methods are platform-dependent. Since we build the Windows path on a Unix client, these methods don't work as intended, which introduces errors. ## Solution This PR does two things. First, it fixes the worktree creation issue. The main change is replacing the standard `Path` APIs with the corresponding ones in `PathStyle` across the methods involved in the worktree path computation chain, mainly `RepositorySnapshot::main_worktree_abs_path()`, `Repository::path_for_new_linked_worktree()`, and `worktrees_directory_for_repo`. This lets us build correct worktree paths on Windows. Additionally, to make the logic testable, the core of `Repository::path_for_new_linked_worktree()` was moved to `RepositorySnapshot`. Second, it fixes the worktree display. The main change is in the `linked_worktree_short_name` function; the rest updates its callers, including the title bar, sidebar, and the agent thread UI. ## Testing Added new tests, and also built and tested locally; a video recording is attached. ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable --- Release Notes: - Fixed worktree cannot be created when remote connecting from unix system to windows. |
||
|
|
85b3aa83a2
|
acp_thread: Share v2 authentication definitions (#65235)
Share SDK v2 authentication definitions and method IDs across the existing connection and login UI, while keeping production ACP initialization and login requests on v1. This continues the shared-model migration after #65230; it does not enable a v2 backend. - Adapt v1 definitions once at initialization, preserving opaque IDs, names, descriptions, argument order, and complete method metadata. Convert the unordered v1 environment map to name-sorted v2 entries. - Retain complete unknown-method payloads and environment-item metadata in shared state. Unknown methods remain non-actionable rather than becoming guessed login or legacy terminal-auth execution. - Use one support predicate for login availability, buttons, slash-command gating, and direct selections. Preserve supported-method ordering, primary styling, tooltips, and pending state. - Keep configured terminal command resolution, argument append/environment overrides, legacy Agent `_meta` terminal-auth, Gemini compatibility, logout, and native no-auth behavior on their existing paths. - Reject terminal, unknown, and unadvertised IDs before the agent-managed login RPC; convert only an advertised Agent ID to the v1 request. ## Review guide - [v1 adapter and focused fixture]( |
||
|
|
0418cb5b60
|
Fix LSP workspace folders for single-file worktrees (#60753)
# Objective - Fixes #40627 ## Solution - Only send directory URIs in LSP workspaceFolders ## Testing - Added a regression test for opening a Python file with ty as a single-file worktree. - Verified that the test fails without the fix and passes with it ## 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 adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed ty panic when opening a Python file as a single-file project. Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> |
||
|
|
fd1e8f04b6
|
markdown_preview: Fix markdown tasklist not being shown (#53699)
Fixes a regression introduced in #52008 It's because [pulldown-cmark](https://crates.io/crates/pulldown-cmark) may insert Paragraph between Item and TaskListMarker example markdown: ```md - [x] a - [ ] b ``` before: <img width="168" height="111" alt="image" src="https://github.com/user-attachments/assets/e840f171-98ad-4115-943c-0c7fff12c272" /> after: <img width="186" height="126" alt="image" src="https://github.com/user-attachments/assets/4377c4a2-381d-4ebd-9fbf-7bb69e73d849" /> <details> <summary>ParsedMarkdown</summary> ```rust ParsedMarkdown { source: "- [x] a\n\n- [ ] b\n", events: [ ( 0..17, RootStart, ), ( 0..17, Start( List( None, ), ), ), ( 0..9, Start( Item, ), ), ( 6..8, Start( Paragraph, ), ), ( 2..5, TaskListMarker( true, ), ), ( 6..7, Text, ), ( 6..8, End( Paragraph, ), ), ( 0..9, End( Item, ), ), ( 9..17, Start( Item, ), ), ( 15..17, Start( Paragraph, ), ), ( 11..14, TaskListMarker( false, ), ), ( 15..16, Text, ), ( 15..17, End( Paragraph, ), ), ( 9..17, q ( 0..17, End( List( false, ), ), ), ( 0..17, RootEnd( 0, ), ), ], languages_by_name: {}, languages_by_path: {}, root_block_starts: [ 0, ], html_blocks: {}, mermaid_diagrams: {}, } ``` </details> 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: - Fixed markdown tasklist not being shown --------- Co-authored-by: MrSubidubi <finn@zed.dev> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> |