You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Driving a real app process with the automation API, any locator.click() kills the app with a native panic. Read-only commands or .press() against the same app all work fine, only clicking crashes.
thread 'gpuix-ui' panicked at zed\crates\gpui\src\app\entity_map.rs:142:36:
cannot update gpuix_native::renderer::GpuixView while it is already being updated
thread 'gpuix-ui' panicked at library\core\src\panicking.rs:225:5:
panic in a function that cannot unwind
The UI thread aborts, the automation client then gets AutomationError: The GPUI UI thread stopped during the GPUI UI command, and the next React commit fails with The GPUI UI thread is not running.
I can reproduce this same GpuixView double-update panic on published @gpuix/[email protected] with a real foreground macOS mouse click, not only through the automation API.
Repro path: a fresh external consumer using [email protected] + published @gpuix/[email protected] paints normally and hover works, but the first physical left click aborts with:
cannot update gpuix_native::renderer::GpuixView while it is already being updated
fatal runtime error: failed to initiate panic
The re-entry is in GPUIX text-selection cleanup. register_drag_listeners runs on every left-button mouse-up and unconditionally calls on_drag_end. GpuixView::render() supplies an on_drag_end callback that immediately calls drag_end_view.update(app, ...), so an ordinary mouse-up can update the same root entity while GPUI is still dispatching the event with GpuixView leased.
I tested a minimal patch against the exact 0.7.0 source commit a24b4a42eb516c7b940eb8d34ecebb077df623bd (and its pinned GPUI submodule), changing only:
packages/native/src/text/paint.rs: capture was_dragging before ending selection and only invoke on_drag_end when a real drag was active.
packages/native/src/renderer.rs: defer the real drag move/end GpuixView updates with App::defer(...), so the current GPUI effect cycle unwinds and the entity lease is returned before the root view is updated.
That exact patched native 0.7.0 compiled on ARM64 macOS and then passed foreground acceptance in a fresh packed consumer: immediate paint, hover, repeated +, -, number click, Reset, and text selection drag/release. No GpuixView already being updated panic or crash.
This looks like the same ownership bug behind the automation crash, but it also affects physical AppKit input in 0.7.0.
Follow-up: @gpuix/[email protected] is now published, but the physical foreground re-entry path is still present in the 0.8.0 source (remorses/gpuix@8d3ec094387152558d05a5b37de3cfbfca5d2d0a).
I re-ran the same ownership patch on that exact 0.8.0 source and validated it through a full downstream compatibility matrix plus a real foreground macOS consumer:
native 0.8.0 source built successfully
35 test files / 167 tests passed downstream
Solid 1, Kobalte, Tailwind, DAW, and all builds passed
immediate paint, hover, repeated clicks, decrement, reset, and real text drag-selection/release all passed
no GpuixView already being updated panic, abort, or backtrace
The native source diff remained exactly:
packages/native/src/renderer.rs
packages/native/src/text/paint.rs
napi build did regenerate packages/native/index.d.ts in a different order on one local run, but restoring that generated declaration left only the two Rust source files above; there is no API/type change involved in the patch.
The exact ownership change tested against 0.8.0 is:
The first half prevents an ordinary click from performing drag-end root-view cleanup when no drag existed. The deferred updates keep actual selection-drag move/end work from trying to lease GpuixView while GPUI is still dispatching the physical event with that entity on the stack.
So 0.8.0 fixes the automation-input panic path described in the release notes, but this separate physical text-selection mouse-up re-entry still needs this ownership fix (or an equivalent native fix) before downstream consumers can safely rely on the registry package for foreground clicks.
Activity
Prevent live automation mouse input from leasing the root view
jhomra21 commentedon Sep 14, 2026
I can reproduce this same
GpuixViewdouble-update panic on published@gpuix/[email protected]with a real foreground macOS mouse click, not only through the automation API.Repro path: a fresh external consumer using
[email protected]+ published@gpuix/[email protected]paints normally and hover works, but the first physical left click aborts with:The re-entry is in GPUIX text-selection cleanup.
register_drag_listenersruns on every left-button mouse-up and unconditionally callson_drag_end.GpuixView::render()supplies anon_drag_endcallback that immediately callsdrag_end_view.update(app, ...), so an ordinary mouse-up can update the same root entity while GPUI is still dispatching the event withGpuixViewleased.I tested a minimal patch against the exact 0.7.0 source commit
a24b4a42eb516c7b940eb8d34ecebb077df623bd(and its pinned GPUI submodule), changing only:packages/native/src/text/paint.rs: capturewas_draggingbefore ending selection and only invokeon_drag_endwhen a real drag was active.packages/native/src/renderer.rs: defer the real drag move/endGpuixViewupdates withApp::defer(...), so the current GPUI effect cycle unwinds and the entity lease is returned before the root view is updated.Exact tested source change:
That exact patched native 0.7.0 compiled on ARM64 macOS and then passed foreground acceptance in a fresh packed consumer: immediate paint, hover, repeated
+,-, number click, Reset, and text selection drag/release. NoGpuixView already being updatedpanic or crash.This looks like the same ownership bug behind the automation crash, but it also affects physical AppKit input in 0.7.0.
release: @gpuix/[email protected] and @gpuix/[email protected]
jhomra21 commentedon Sep 14, 2026
Follow-up:
@gpuix/[email protected]is now published, but the physical foreground re-entry path is still present in the 0.8.0 source (remorses/gpuix@8d3ec094387152558d05a5b37de3cfbfca5d2d0a).I re-ran the same ownership patch on that exact 0.8.0 source and validated it through a full downstream compatibility matrix plus a real foreground macOS consumer:
GpuixView already being updatedpanic, abort, or backtraceThe native source diff remained exactly:
packages/native/src/renderer.rspackages/native/src/text/paint.rsnapi builddid regeneratepackages/native/index.d.tsin a different order on one local run, but restoring that generated declaration left only the two Rust source files above; there is no API/type change involved in the patch.The exact ownership change tested against 0.8.0 is:
The first half prevents an ordinary click from performing drag-end root-view cleanup when no drag existed. The deferred updates keep actual selection-drag move/end work from trying to lease
GpuixViewwhile GPUI is still dispatching the physical event with that entity on the stack.So 0.8.0 fixes the automation-input panic path described in the release notes, but this separate physical text-selection mouse-up re-entry still needs this ownership fix (or an equivalent native fix) before downstream consumers can safely rely on the registry package for foreground clicks.
Defer selection drag updates so live clicks do not panic
release: @gpuix/[email protected] and @gpuix/[email protected]
Skip prepaint and paint for clipped subtrees: gpuix says how far each…
Cull clipped subtrees with the accessibility tree on: the test window…