Skip to content

Agent: move gpui to Zed c7bea343 - #1571

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-gpuibump-maple
Nov 14, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-gpuibump-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

First of three PRs in the stack. It moves the dependency, makes the changes the new revision requires, and adds the one thing worth adopting from it right away: a frame-time counter for development. Matt's motion work and our rework of it are the two PRs above.

Why

Maple Work has built against Zed cc053a4a (Aug 7), a pin chosen for an embedded-terminal experiment that has since been dropped. About 230 upstream commits to the gpui crates have landed since. This moves gpui and gpui_platform to c7bea343 (Nov 4), which brings platform fixes we are missing and the animation and frame-pacing APIs the motion work wants. The APIs Maple builds on did not change: the Element trait, Style, ListState, cached views and the accessibility API are the same.

What changed

  • Keystrokes name their host. Keystroke::parse_with_os, unparse(os) and display(os), through a new keymap::host_os(). Keystroke::parse now takes a static string and rejects the secondary- alias the shortcut catalog uses, so runtime sequences moved to parse_with_os.
  • KeyBinding::load takes the app instead of a keyboard mapper, so build_binding and shortcuts::prepare take cx, and the tests that call them became gpui tests.
  • Renames and signatures. window.blur(cx); on_scroll_wheel and ScrollWheelEvent became on_scroll and ScrollEvent; expect_restart reports arguments too; Modifiers::secondary needs the app, so Settings reads this build's host directly.
  • Features. gpui's stack growth under deep element trees is now the opt-in stacker feature, kept on here. uuid's v7 feature used to arrive through gpui's dependency graph and is now enabled by the app.
  • Hover. gpui now reports hover when content moves under a still pointer, and reports a row as no longer hovered when a key is pressed over it. A menu row keeps its highlight across a key press (it lost it when Left or Escape closed a submenu). The sidebar test asserts hover is never stale instead of always clear, since gpui now moves hover to the row under the pointer after a programmatic scroll.
  • Line breaking. gpui wraps text by the Unicode line breaking rules (UAX Disable chatbox while streaming #14). Markdown tables measured unbreakable runs with a copy of gpui's old word-character table; they now call the same icu_segmenter segmenter gpui does, so a column's minimum width matches where gpui will actually wrap.

Frame counter

MAPLE_FRAME_STATS=1 makes gpui draw how long each frame took to build and paint in a corner of the main window. MAPLE_FRAME_STATS=full adds percentiles over the last 1000 frames. It only shows when the app is started with that variable, so no user sees it; it works in any build, so it can be read on a packaged build in a VM as well as a local one.

The counter comes from gpui's profiler feature, which this turns on. Zed ships with it on. gpui paints it straight into the scene, so showing it asks for no extra frames. docs/performance-check.md gains a step that uses it, so the streaming check can record a number instead of "Smooth".

It is here because the motion work above turns single-frame state changes into runs of frames, each of which re-renders the chat view. This is how to see what that costs on each platform.

Behaviour changes to check

  • Windows shortcuts now pass through the platform keyboard mapper; the old API let Maple pass a no-op mapper and the new one does not. Letter shortcuts are unaffected and no shipped default uses a shifted symbol key. A user override with one is normalized the way Windows reports the key.
  • Text wrapping changes everywhere text wraps: for example a path now breaks after / instead of before it.
  • Layout engine: taffy moves from 0.12.2 to 0.15.0.
  • Frame pacing: macOS Low Power Mode now caps frames at about 30 fps by default.

Dependencies

  • 45 new registry versions in Cargo.lock. Each was published at least seven days ago by crates.io created_at, checked on Nov 11. Where a freshly resolved version differed from Zed's own lockfile at this revision, the lockfile version was used: icu_* 2.3.0, and bit-vec 0.10.1 because 0.10.2 was a day old. ar_archive_writer stays at the 0.5.3 already locked because 0.5.5 was hours old.
  • New git sources, all selected by Zed's workspace manifest: gfx-rs/wgpu cddb2f5d (wgpu 30, the Linux renderer; was crates.io 29.0.4), zed-industries/oo7 731c1215 (was crates.io 0.6.0) and zed-industries/scap b5c86ec5 (was 4afea48c). These are outside the registry cooldown and were not source-reviewed beyond identifying the commits.
  • hdrhistogram 7.5.4 for the frame counter, the version in Zed's lockfile, published well over seven days ago.
  • Rust toolchain unchanged (1.98.0 from the Agent flake).

Validation

  • On macOS, at the bump commit: cargo test -p maple-agent-app --locked with -D warnings, just ci-lint (fmt, the git metadata tests and all four clippy lanes) and the repository pre-commit hook all passed. The pre-commit hook passed again with the frame counter.
  • CI built and tested both commits on Linux, macOS and Windows.
  • Builds from higher in the stack, which include this, were used on macOS and launched on a Windows ARM64 VM. The frame counter drew as described.

Rebase

Rebased onto master b1ecb772 on Nov 13. One conflict, in desktop.rs: master's Quit prompt and native dialog code and the frame counter were added at the same spot, and both are kept. Cargo.lock merged without conflict; every package version in it is either on master or in the lockfile reviewed above, and the build passes with --locked.

Not verified

  • What the bump changes on screen. Wrapping, table layout, layout drift from taffy and shortcuts on Windows were not checked one by one; the app was only used normally on macOS.
  • Linux in a running app.
  • just supply-chain stops locally at the SQLCipher regeneration step with a linker error against the Xcode 27.1 SDK, unrelated to this change. The dependency verifiers before that step pass, and the CI supply-chain lane passed.

Not in this PR

  • The quit prompt's empty-frame workaround. The upstream fix it waits for (gpui_macos: Release the accessibility adapter when a window is dropped zed-industries/zed#64143) is in this gpui, but removing the workaround needs a live retest with an accessibility client attached, which has not been done.
  • The spinner loop. gpui now has capped, phase-locked repeating animations, but our loop also pauses in background windows and throttles under thermal pressure, which gpui's does not, so it stays.

🤖 Generated with Claude Code

AnthonyRonning and others added 3 commits November 13, 2026 23:27
Moves gpui and gpui_platform from Zed cc053a4a (Aug 7) to c7bea343
(Nov 4), about 230 upstream commits to the gpui crates. The element,
style, list and accessibility APIs Maple builds on are unchanged; the
changes here are what the new revision requires.

- Keystrokes name their host: parse_with_os, unparse(os) and display(os),
  through a new keymap::host_os(). Keystroke::parse now rejects the
  secondary- alias the shortcut catalog uses.
- KeyBinding::load takes the app instead of a keyboard mapper, so
  build_binding and shortcuts::prepare take cx. On Windows, bindings now
  pass through the platform keyboard mapper.
- window.blur(cx); on_scroll_wheel and ScrollWheelEvent became on_scroll
  and ScrollEvent; expect_restart reports arguments too.
- gpui's stack growth under deep element trees is now the opt-in
  `stacker` feature; keep it on. uuid's v7 feature is now ours to enable.
- gpui reports hover when content moves under a still pointer and drops
  it on a key press. A menu row keeps its highlight across a key press,
  and the sidebar test asserts hover is never stale instead of always
  clear.
- gpui wraps text by the Unicode line breaking rules. Markdown tables
  measure unbreakable runs with the same icu_segmenter call instead of a
  copy of the old word-character table.

Lockfile: 45 new registry versions, each published at least seven days
ago (crates.io created_at, checked Nov 11), pinned to the versions in
Zed's own lockfile where the two differed. New git sources, all chosen by
Zed's workspace: gfx-rs/wgpu cddb2f5d (wgpu 30), zed-industries/oo7
731c1215 (was crates.io 0.6.0) and zed-industries/scap b5c86ec5.
taffy moves from 0.12.2 to 0.15.0.

Co-Authored-By: Claude <noreply@anthropic.com>
The pin no longer has to match gpui-libghostty; that experiment was
dropped.

Co-Authored-By: Claude <noreply@anthropic.com>
The newer gpui can paint how long each frame took to build and paint
over the window. Turn its profiler on, as Zed does, and show that overlay
in the main window when MAPLE_FRAME_STATS is set; `full` adds percentiles
over the last 1000 frames. The performance check gains a step that uses
it, so "smooth" can be a number.

One new registry dependency, hdrhistogram 7.5.4, the version in Zed's
lockfile, published well over seven days ago.

Co-Authored-By: Claude <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning marked this pull request as ready for review November 14, 2026 16:18
@AnthonyRonning
AnthonyRonning merged commit 5a4e1a5 into master Nov 14, 2026
26 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-gpuibump-maple branch November 14, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant