Port · Build: Zed's gpui at 1a28cff

gpui and gpui_platform now come from Zed's repo by git at 1a28cff,
the code gpui-pre 0.3.7 republishes, so the gallery can later build
for the browser. gpui takes stacker, as 0.2.2 always did, and
gpui_platform takes font-kit, without which macOS draws no text;
runtime_shaders moves to gpui_platform.

The API moved: focus, blur and Tab steps take cx, Corner is Anchor,
shaped lines paint with an alignment, defer_draw takes a content
mask, the inspector registers a factory, async updates return their
value, and wrapped lines are shared, not cloned. Updates through a
window context go through the window, so a closed window still ends
them as it did.

Where the new gpui behaves differently, Ely keeps its old intent.
Holds and reveals under a resting pointer survive typing through
gpui's input-modality-independent hover; previews the keyboard also
moves keep the default, and the calendar's leave ignores a key press.
Enter reaches a button inside the code editor, since gpui now arms a
key click on the press. The event logger skips a lone modifier. A
video and an image grid keep their shape in a flex column under
taffy 0.13, as a picture does.

AGENTS.md records the new stack and the rules this port changes; the
rest of the old gpui and taffy rules are re-tested in T44c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-28 20:30:17 -04:00
1 parent e49c93bb6f
commit 94deeaed52
199 files changed
+2513 -2643

No files matched your search

+17 -13
View File
@@ -4,7 +4,9 @@ use ely_gpui_component::media::{
AudioPlayer, AudioSpectrum, AudioWaveform, MediaControls, PlaybackSpeedControl, Playlist,
Repeat, Track, VolumeControl,
};
use gpui::{App, Entity, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use gpui::{
App, Entity, IntoElement, ParentElement, SharedString, Styled, TaskExt as _, Window, div, px,
};
use crate::{
probe::probe,
@@ -98,19 +100,21 @@ fn tick(state: &Entity<Listening>, window: &mut Window, cx: &mut App) {
.spawn(cx, async move |cx| {
loop {
cx.background_executor().timer(TICK).await;
let going = state.update(cx, |now, cx| {
now.at = (now.at + TICK.mul_f32(now.speed)).min(now.length());
if now.at == now.length() {
match now.repeat {
Repeat::One => now.at = Duration::ZERO,
Repeat::All => now.skip(1),
Repeat::Off if now.song + 1 < SONGS.len() => now.skip(1),
Repeat::Off => now.playing = false,
let going = cx.update(|_, cx| {
state.update(cx, |now, cx| {
now.at = (now.at + TICK.mul_f32(now.speed)).min(now.length());
if now.at == now.length() {
match now.repeat {
Repeat::One => now.at = Duration::ZERO,
Repeat::All => now.skip(1),
Repeat::Off if now.song + 1 < SONGS.len() => now.skip(1),
Repeat::Off => now.playing = false,
}
}
}
now.ticking = now.playing;
cx.notify();
now.playing
now.ticking = now.playing;
cx.notify();
now.playing
})
})?;
if !going {
return anyhow::Ok(());
+12 -8
View File
@@ -1,7 +1,9 @@
use std::{path::Path, time::Duration};
use ely_gpui_component::media::{Cue, Scrubber, SubtitleEditor, VideoPlayer, VideoThumbnailStrip};
use gpui::{App, Entity, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use gpui::{
App, Entity, IntoElement, ParentElement, SharedString, Styled, TaskExt as _, Window, div, px,
};
use crate::{
probe::probe,
@@ -61,13 +63,15 @@ fn tick(state: &Entity<Playback>, window: &mut Window, cx: &mut App) {
.spawn(cx, async move |cx| {
loop {
cx.background_executor().timer(TICK).await;
let going = state.update(cx, |now, cx| {
let step = TICK.mul_f32(now.speed);
now.at = (now.at + step).min(LENGTH);
now.playing &= now.at < LENGTH;
now.ticking = now.playing;
cx.notify();
now.playing
let going = cx.update(|_, cx| {
state.update(cx, |now, cx| {
let step = TICK.mul_f32(now.speed);
now.at = (now.at + step).min(LENGTH);
now.playing &= now.at < LENGTH;
now.ticking = now.playing;
cx.notify();
now.playing
})
})?;
if !going {
return anyhow::Ok(());