Skip to content

Fix native host file services, startup viewport, and SVG rendering - #60

Merged
danwalmsley merged 4 commits into
mainfrom
codex/focoui-native-host-fixes
Sep 11, 2026
Merged

danwalmsley merged 4 commits into
mainfrom
codex/focoui-native-host-fixes

Conversation

@danwalmsley

@danwalmsley danwalmsley commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Native desktop hosts need a viewport-correct first frame, complete SVG typography and gradient paints, and asynchronous file operations that do not depend on browser uploads/downloads. These changes let FocoUI run the unmodified Kestrel and AureonStudio applications using native Open/Save dialogs and Metal rendering.

This PR is stacked on #43 and targets codex/epic-22-gpu-foundation. It includes only the native host fixes above that branch (updated through 2b66c84f).

  • Add a versioned, opt-in file-service C ABI: dequeue owned requests, release request views, and complete requests asynchronously. File inputs receive File objects plus input/change events; Blob-backed downloads become save requests. Handle cancellation, errors, URL revocation, and navigation/shutdown lifetime boundaries. Reflect dynamic input.accept in generated and manual bindings.
  • Add viewport-aware navigation so initial layout uses the actual native window size.
  • Preserve radial background paints and cascaded SVG font size, family, weight, spacing, and text anchoring in immutable scenes. This fixes blank material previews and oversized Kestrel view-cube labels.
  • Raise the shared graphics release budget for sustained native rendering, with regression coverage.

Validation: rebuilt the native engine and ran the complete native V8 runtime test executable after rebasing onto the latest #43 head; generated WebIDL bindings pass --check. Added file-service, initial viewport, SVG typography, and graphics-release regressions. In the FocoUI integration, Kestrel Open/Save was user-tested and the corrected view cube visually verified; Aureon's native pickers were also exercised.

File-service scope: filesystem integration is supplied by each host; this PR provides the WebScene callbacks. Requests are limited to 64 MiB and 64 files. Provider-only streams, canvas PNG encoding, FileReader, native file drops, and File System Access APIs are not implemented here. App-authored export toasts remain unchanged and can precede completion of the native save operation. This addresses part of #57; it does not close its broader requirements.

Conflict-resolution validation: merged the latest PR43 Blob/media changes, removed the duplicate URL revocation handler, and preserved origin checks plus native file payload cleanup. The focused native file-service regression, complete native V8 runtime suite, audio graph tests, media decoding tests, and generated WebIDL binding check pass. The added regression verifies binary Blob fetch and queued native Save survive revocation while subsequent fetches fail.

There is no FocoUI dependency or platform picker implementation in this PR. The WebScene C ABI is host-neutral; the FocoUI-specific integration remains in the FocoUI repository.

@danwalmsley
danwalmsley added this pull request to stack #63 September 9, 2026 23:00
Preserve origin-checked Blob revocation, native file payload cleanup, binary fetch data, and media navigation cleanup. Cover native Save and binary fetch sharing a Blob followed by URL revocation.
Base automatically changed from codex/epic-22-gpu-foundation to main September 11, 2026 12:43
@danwalmsley
danwalmsley merged commit 697a491 into main Sep 11, 2026
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant