Skip to content

fix: specify Uint8Array generic for Image.rgba - #15957

Merged
Legend-Master merged 2 commits into
tauri-apps:devfrom
Legend-Master:specify-uint8array-generic
Sep 2, 2026
Merged

Legend-Master merged 2 commits into
tauri-apps:devfrom
Legend-Master:specify-uint8array-generic

Conversation

@Legend-Master

Copy link
Copy Markdown
Contributor

@Legend-Master
Legend-Master requested a review from a team as a code owner September 2, 2026 04:23
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Package Changes Through 8ee5f5e

There are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master
Legend-Master merged commit 32efd02 into tauri-apps:dev Sep 2, 2026
13 checks passed
@Legend-Master
Legend-Master deleted the specify-uint8array-generic branch September 2, 2026 09:21
lucasfernog added a commit that referenced this pull request Sep 7, 2026
* refactor: gate `FocusState` in `#[cfg(windows)]` (#15951)

* chore(deps): bump rpassword from 7.4.0 to 7.5.4 (#15356)

Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 7.4.0 to 7.5.4.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](conradkleinespel/rpassword@v7.4.0...v7.5.4)

---
updated-dependencies:
- dependency-name: rpassword
  dependency-version: 7.5.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(cli): plugin init template ts 6/7 `rootDir` (#15954)

Update typescript to v7 in `tauri plugin init` template (split from #15703). Also fixes the default `rootDir` in the template `tsconfig.json`

Closes #15953 (regession from #15158)

* chore(deps): update rust crate libc to v0.2.189 (#15900)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate ignore to v0.4.33 (#15827)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* perf: skip serializing to JSON for `Image::rgba` (#15955)

* fix: specify `Uint8Array` generic for `Image.rgba` (#15957)

* fix: specify `Uint8Array` generic for `Image.rgba`

* Add change file

* refactor: move `send_user_message` into `Context` (#15960)

* ci: add explicit workflow permissions (#15967)

* ci: add explicit workflow permissions

* add the remainings

* per job level permissions should override workflow level one right?

* document why write for publish cli rs

* fix js audit

* fix(ci): give audit permissions (#15970)

* feat(cef): expose native frame lifecycle observers

Publish synchronous browser-process lifecycle events for every native frame while preserving portable main-frame navigation policy. Consumers can invalidate document authority before guarded input dispatch and distinguish frame replacement from equal frame counts.

* feat(cef): configure frame observers from generic plugins

Allow runtime-generic plugins to register native frame observers before their main and popup webviews are created. CEF retains one current handler; other runtimes emit no native CEF events.

* feat(cef): expose native state and shared request correlation

Sample actual native parent, bounds, and visibility at with_webview callbacks. Share a checked process-wide DevTools ID allocator between runtime evaluation, initialization scripts, and native API consumers so results cannot cross request producers.

* feat(cef): own document tokens for every native webview

Track all-frame navigation in the runtime before application observers. Expose opaque browser/document identity through native snapshots and read-only frame state. Revoke prior documents when a main frame disappears or the renderer terminates, and validate the exact native frame set before issuing a snapshot token.

* feat(cef): identify exact native window lifetimes

Expose an opaque runtime-owned window token in native webview snapshots. Reparenting and same-label recreation can then be attributed without trusting a reusable label or OS handle.

* feat(cef): own native popup lifetimes without replacing opener windows

* fix(cef): drain pending popups and share native window identity

* feat(cef): observe exact native JavaScript dialog lifetimes

* fix(cef): observe popup source without blocking UI dispatch

* fix(cef): release window lock before waiting for getter reply

* fix: inefficient regular expression in node binary test (#15968)

* chore(cef): use required source license headers

* fix(cef): restore desktop and mobile check coverage

Keep CEF dependencies and APIs behind the desktop target boundary. Use the mobile runtime and mock-runtime test path where CEF is unavailable, and correct the affected platform lints and permission documentation examples.

* fix(ci): install both macOS CEF helper targets

The Rust lint job builds tauri-bundler, which embeds arm64 and x86_64 CEF helpers. Install both Rust target libraries before the macOS Clippy job builds those helpers.

* update docs

* update api example

* fix(cef): bind the native browser identity before exhaustion can latch

apply() recorded browser_id only after the invalid-identifier check that
latches exhausted, so a browser whose very first notification carried an empty
frame id left the identity unrecorded forever. Since has_browser_id gates every
renderer process message, that silently killed the whole invoke() bridge, and
frame event delivery with it. Such a first event is reachable: on_address_change
and on_load_error both tolerate a missing native frame.

The frame cap no longer latches exhausted either. It is now a live condition of
ready(), matching observe_document's native frame_count guard, so a page that
transiently exceeds the cap recovers once its frames drain instead of losing
document admission for the rest of the webview's life.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): close every popup on window and app teardown

PopupFamily::closed returns early unless the state matches the given browser id,
which is correct for the per-browser native callback but wrong for teardown: a
root that never observed a frame event has no identity to match, so no popup was
revoked, live_popups never drained and exit_if_done never fired, hanging the app
on quit with orphaned popup windows.

Window close and app shutdown now go through close_all(), which owns the family
outright. closed() keeps its exact-identity guard for on_before_close.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): keep the opener's download handler on CEF-owned popups

CEF cancels every download of a client whose GetDownloadHandler returns NULL, so
building the popup client with download_handler: None silently broke all
downloads started inside a window.open() popup. Before popups got their own
client they inherited the opener's, and its download handler with it.

The other handlers dropped the same way stay None on purpose: on_page_load,
document_title_changed, address_changed and web_content_process_terminate are
all wrapped at the tauri layer against the opener's label, so forwarding them
would report popup events as the opener webview's own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): report a parentless native webview as unmatched on Windows

GetParent returns NULL both for a window that has no parent and for a genuine
failure, and the binding maps that NULL to an Err, so GetParent(hwnd).ok()?
collapsed both into parent_matches: None. That is documented to mean the
platform could not establish the relationship, hiding the exact reparented case
the field exists to detect.

Clearing the last error first tells the two apart, matching what the macOS and
Linux implementations already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): log DevTools identifier exhaustion through the app logger

The exhaustion path wrote to stderr while the rest of the file reports failures
with log::error!, so the message was invisible to tauri-plugin-log consumers and
to packaged Windows apps with no attached console, right where the runtime
silently closes the browser.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): drop popup reservations of a revoked family on exit

A reservation is normally resolved by PopupCreated or PopupAborted, but CEF
discards popups without always reporting the abort: the opener can be torn down
first, or the abort can arrive for a browser its opener no longer matches.
Nothing else cleared AppState.pending_popups, so exit_if_done returned early
forever and the app hung with no windows on screen.

exit_if_done now drops reservations belonging to a revoked family. A revoked
family never admits a popup again, so those reservations are dead; reservations
of live families still gate the exit until CEF resolves them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(cef): state that popup frame events stay out of the opener's observer

FrameEvent::browser_id read "a popup has a different identity from its opener",
which implies an app's on_frame_event observer sees popup lifecycle. It does not:
create_popup installs only the internal navigation observer, and the root wrapper
gates app delivery on has_browser_id.

That exclusion is deliberate, so the docs move to meet the code rather than the
reverse. A popup is a separate browser navigating wherever its own content goes
-- an SSO or OAuth window is the standing case -- and every FrameEvent carries a
full URL, which the web platform itself denies the opener across origins. The
same filter is what keeps a DevTools window out of app observers. Apps observe
popups without their URLs through Webview::popups.

Documented at all three public sites plus the two enforcement points.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): stop asserting an unverified parent for popup snapshots

WebviewSnapshot::parent_matches was hard-coded to Some(true) for every popup
whose view named a window, which asserted nothing: the window it was compared
against is the one the view itself named, so the check was true by construction.
It could also contradict the same snapshot -- once the window token cap was hit
the popup shipped window: None beside parent_matches: Some(true).

The root's value comes from a real check of two independent sources
(XQueryTree / GetParent / superview against the runtime's own bookkeeping).
No such independent claim exists for a popup, because CEF owns its native
window and the runtime never reparents it, so the relationship is simply never
established and None is the documented answer. A caller gating a native effect
on Some(true) no longer gets an unverified assertion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): reserve a DevTools identifier range for the runtime's own requests

The unified allocator starts at 1, so id 1 was the root browser's Page.enable
and id 2 its Page.addScriptToEvaluateOnNewDocument -- the key stored in
pending_initial_loads. An app sending {"id":2,...} made on_dev_tools_method_result
release the deferred navigation before the document-start script was registered,
loading the real page with no Tauri bootstrap injected, silently. The same
mismatch applied to the eval-with-callback observer.

Documenting the allocator contract is not enough on its own, because the failure
mode of ignoring it is invisible. The runtime now issues its own requests from a
range reserved above the public allocator's ceiling, which refuses to hand out
anything once it reaches that boundary, so overlap is impossible by construction
rather than by improbability. Both ranges still fail closed through
DevToolsMessageIdExhausted.

Callers keep the same contract with each other: two app callers must both use
allocate_devtools_message_id to avoid consuming each other's results.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(cef): record why enabling the Page domain does not take over dialogs

A review flagged the unconditional Page.enable as suppressing JavaScript
dialogs. It does not, but nothing in the module said why, so the claim was
reasonable on its face.

Verified against Chromium 151.0.7922.174 (the build behind CEF 151.3.24):
PageHandler::DidRunJavaScriptDialog has no intercept out-param, and
WebContentsImpl::RunJavaScriptDialog notifies each enabled page handler and then
still calls the browser's dialog manager unconditionally. Page.pdl states a
dialog stalls the page only when the browser has no dialog handler for the
target, which the protocol reports as hasBrowserHandler == false, and CEF always
supplies one. None of CEF's 116 patches touch this path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(cef): keep popup protocol traffic out of the opener's observer

The root webview's devtools_protocol_handlers was PopupFamily::handlers, the
same list every popup's protocol observer fed, so an app callback registered on
one webview received every popup's CDP traffic. No DevToolsProtocol variant
names a browser, so a handler could not tell them apart, and a MethodResult
matched by message id fired on popup ids too.

This is the FrameEvent question again with more at stake: CDP carries the page's
content, its network activity and its dialog messages. Popups now register
against a list of their own that stays empty, so the runtime's internal dialog
observation keeps working while no app callback reaches a popup. The root owns
its own list, and PopupFamily::handlers is gone -- sharing it was how popups
reached the app in the first place.

Adding a browser id to the variants was rejected: they have named fields on an
enum that is not non_exhaustive, so it breaks downstream patterns, and it would
label traffic that should not be delivered at all rather than stop delivering it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* refactor(cef): drop on_address_change in favour of the frame AddressChanged event

on_address_change was added on this branch by 61abf00 (#15010) for CEF and
never existed on dev, so removing it is not a break for anyone: it is unreleased.
FrameEventKind::AddressChanged supersedes it and reports strictly more -- child
frames as well as the main one, with the browser and frame identity attached --
where on_address_change only ever fired for the main frame.

The wry side was never a real address-change signal either. It had no wry
counterpart and was shimmed onto with_navigation_handler, so it fired while the
navigation policy was being consulted rather than when the address actually
changed, and never for a same-document or fragment change. That block returns to
the shape it has on dev.

CEF's own OnAddressChange override stays: it is what emits the frame event.

Checked the rest of the surface for handlers the frame events subsume --
on_address_change is the only observation hook this branch added to the portable
API. on_document_title_changed has no frame-event equivalent,
on_web_content_process_terminate predates the branch and is wry's macOS/iOS
signal, and on_navigation is a policy rather than an observation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fmt

* fix(cef): preserve startup and shutdown ownership after runtime refactor

* fix(cef): build macOS helpers from resolved dependency sources

* fix(cef): preserve renderer recovery and repair security audit

Adapt the renderer termination contract from 60d6272 to the dynamic runtime. Preserve permission, frame, and popup handling. Apply the RPM signing repair from a6f29c3. Remove shared environment mutation from mirror tests and allow the resource-path test to run without a native bundle.

* fix(ci): classify the CEF startup change note

* fix(test): pass termination callbacks on every platform

* remove change files [skip ci]

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants