Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,29 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: UI and headless layout regressions
run: cargo test --release --locked -p zeron-ui --lib -- --test-threads=1

macos-frame-recovery:
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Check out pinned GPUI for native frame-source tests
shell: bash
run: |
rev=$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["dependencies"]["gpui"]["rev"])')
git init frame-source-tests
git -C frame-source-tests remote add origin https://github.com/zeronsh/zui
git -C frame-source-tests fetch --depth=1 origin "$rev"
git -C frame-source-tests checkout --detach FETCH_HEAD
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
frame-source-tests
- name: Check macOS application
run: cargo check --release --locked -p zeron
- name: Native frame-source recovery regression
working-directory: frame-source-tests
run: cargo test --release --locked -p gpui_macos --test frame_source_recovery
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ loro-protocol = "0.3"
# stopped vending CABackdropLayer for Selection — window blur went dead);
# b68970e rasterizes BackdropBlur in the wgpu renderer (frosted floats on
# Linux — the Metal path's snapshot/blur/composite, ported).
gpui = { git = "https://github.com/zeronsh/zui", rev = "8a32c0e26a17b9fab3aa9c2dbb79ed2d28ab2dfe" }
gpui_platform = { git = "https://github.com/zeronsh/zui", rev = "8a32c0e26a17b9fab3aa9c2dbb79ed2d28ab2dfe", features = [
gpui = { git = "https://github.com/zeronsh/zui", rev = "a1efdb9b7a4fb97824330af4bf49170a3deef986" }
gpui_platform = { git = "https://github.com/zeronsh/zui", rev = "a1efdb9b7a4fb97824330af4bf49170a3deef986", features = [
"wayland",
"x11",
"font-kit",
"runtime_shaders",
] }
gpui_tokio = { git = "https://github.com/zeronsh/zui", rev = "8a32c0e26a17b9fab3aa9c2dbb79ed2d28ab2dfe" }
gpui_tokio = { git = "https://github.com/zeronsh/zui", rev = "a1efdb9b7a4fb97824330af4bf49170a3deef986" }

# diffs
similar = "2"
Expand Down
12 changes: 12 additions & 0 deletions crates/ui/src/markdown/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,18 @@ thread_local! {
static REGISTRY: RefCell<Vec<RegEntry>> = const { RefCell::new(Vec::new()) };
}

#[cfg(test)]
pub(crate) fn selection_test_bounds(key: &str) -> gpui::Bounds<gpui::Pixels> {
REGISTRY.with(|r| {
r.borrow()
.iter()
.find(|entry| entry.key.as_ref() == key)
.expect("text must be registered")
.layout
.bounds()
})
}

/// A zero-size canvas that clears the selection registry — paint it FIRST in
/// the transcript root (before any markdown), so each frame's registry holds
/// exactly that frame's visible text elements in paint order.
Expand Down
Loading
Loading