ActionUI demo apps v0.7 Pre-release #4
abra-code
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
ActionUI v0.7 - Release Notes
ActionUI stopped being "SwiftUI from JSON with an Android experiment attached" and became a three-renderer system: the same JSON document now drives SwiftUI on Apple, Jetpack Compose on Android, and DOM/CSS in the browser - plus a new add-on architecture that lets third-party element types plug into the engine without living in core.
At a glance
1. ActionUIWeb - a third renderer
The largest single piece of work in this release. ActionUI JSON now renders in a browser as plain DOM + CSS, with app logic in JavaScript. No build step, no runtime dependencies, plain ES modules. The source layout deliberately mirrors the Swift and Android trees file-for-file (
Common/,Helpers/,Views/, one file per element) so the three renderers stay diffable.Element coverage (57 views). Layout stacks and lazy stacks,
ScrollView/ScrollViewReader,Grid/LazyVGrid/LazyHGrid,Form/Section/GroupBox/LabeledContent/DisclosureGroup, the full control set (Slider,Stepper,Pickerwith segmented/radioGroup/menu styles,SecureField,TextEditor,DatePicker,ColorPicker,ProgressView,Gauge,Toggle), the shape primitives,Label/Imageon a shared SF-to-Material glyph resolver,AsyncImage,VideoPlayer,WebView,Canvas,GeometryReader,LoadableView,Link/ShareLink/ContentUnavailableView/EmptyView/Group.Containers and navigation.
Listin all three modes (heterogeneous children, homogeneousitemType, data-driven template),Tablewith the rows API and drag-to-resize columns,TabView/Tab,Menuas a top-layer popover,NavigationStack+NavigationLink,NavigationSplitViewwith column widths, toolbars with an overflow menu, and the app menu bar as a top app bar.Runtime surface parity.
setElementPropertyvisual-property bridge, runtime structural mutation (insertElement/insertRow/removeElement, including into TabView / Menu / NavigationStack), programmatic row selection, window-level dialogs and modals, element-levelsheet/fullScreenCover/popover, window-level toast, page lifecycle hooks, theanimationmodifier over armed CSS transitions,searchable, overlay/background decoration subviews,frame(alignment:), file upload via drag & drop, and opt-in browser back/forward through the History API.Pluggable Map. Dependency-free embed by default, with opt-in providers for MapLibre, Google Maps, and Apple MapKit JS.
Mobile and touch. A substantial adaptation pass: an input-modality layer, sheets/popovers/menus presented as bottom action sheets on a phone,
sidebarAdaptableTabView collapsing to a bottom tab bar, responsive NavigationSplitView collapse, left-edge swipe-back, pull-to-refresh, swipe actions, safe-area insets on edge chrome, touch-sized targets and corner radii,textContentTypeautofill, inset-grouped Forms, and a:webstacked-card mode for Table on narrow screens.Performance and quality.
content-visibilityplus incremental row rendering for lazy containers, List and Table; multi-window as multiple in-document surfaces; a debug mode for unmapped symbols; and a development-only Node test suite (node --test, zero deps, 142 tests).The demo is a NavigationSplitView shell with each section in its own JSON file, loaded through
LoadableView. Try it live at https://abracode.com/ActionUIWeb/demo/ - no install, no local server.2. Android reaches feature parity
Android went from a partial port to a peer of the Apple renderer.
Elements ported:
Grid(custom column-aligning layout),LazyVGrid/LazyHGrid,Gauge,AsyncImage(dependency-free),WebView,VideoPlayer(with an audio panel for audio-only sources),Canvas(Skia rendering),GeometryReader,ControlGroup,Map,ScrollViewReader, plus template-based data-driven containers.Map as split provider modules -
:map-osm(Leaflet/OpenStreetMap, the default) and:map-google(maps-compose), with the shared contract in core. This is the pattern the Apple add-on architecture later mirrored.Modifier and chrome parity: the accessibility modifiers,
disabled/buttonStyle/controlSizethrough an inherited control environment, element-levelsheet/fullScreenCover/popover, overlay/background decoration subviews,textSelection,multilineTextAlignment,labelsHidden,onAppear/onDisappear,openURLActionID,contextMenu,transition,searchable, swipe actions, pull-to-refresh, and theanimationmodifier on a new host-mutable property API.Native chrome: control-chrome, toolbar and menu icons through the Material Symbols font; a window-level toast as a native bottom Material snackbar; NavigationSplitView per-pane toolbars, sidebar icons and selected-row content tint; a demoApp launcher icon.
Correctness work: SwiftUI-faithful stack layout and frame/Picker parity, layer blending matched to Core Graphics, semantic-color resolution to adaptive theme colors, safe-area handling for un-scaffolded roots, reactive
disabledandforegroundStyle/tint, runtime structural mutation, a scroll guard instead of a crash on an unbounded axis, trailing commas in JSON, andcompileSdkstandardized to 36.Android also gained its own add-on modules (
:addon-cachedimage,:addon-richtext) and an add-on demo app.3. Add-on architecture
Custom view-type registration became a public, documented API (
ActionUIRegistry.shared.register(_:as:)plus the publicActionUIViewConstructioncontract). An add-on compiles against ActionUI but does not link it; the host links both and calls the add-on'sregister()once at launch. Registration is exposed as a plain C entry point so C/C++/Obj-C hosts can use it too. Each add-on ships its own verifier schema, picked up by--schema-dir.Five add-ons ship in this release:
QLPreviewViewon macOS,QLPreviewControlleron iOS/visionOS), with drag-selectable text in the macOS preview.Chatelement (see below).Diffelement plus a standalone DiffView component (line diff, hunks, gutters).RichTextelement rendering a whole Markdown document into one native, selectable, table-aware-copyable text view.CachedImageelement with off-main fetch/decode/downscale, a two-tier memory + disk cache, and no reflow on hydration.Supporting infrastructure: ActionUIAddOnTestApp (a multiplatform host with an add-on picker), and ActionUIViewer moved into its own add-on-linking aggregator package (core cannot link add-ons without a circular dependency).
Four components were extracted into standalone sibling repos and are now consumed by version: ChatView, RichText, DiffView, AsyncImageCache.
4. ActionUIChat - a generic chat element
The most feature-dense add-on. One
Chatelement backs both AI-agent chat and person-to-person chat; the transport and appearance differ, not the view.local(scripted echo), ACP - launches any Agent Client Protocol agent as a subprocess over stdio (validated against OpenCode and claude-code-acp), openai-sse - streams any OpenAI-compatible/v1/chat/completionsendpoint, and a local peer-to-peer transport.states["content"];readOnlyis a pure viewer mode.protocol,transport) are host-injected at runtime intostates["config"], so documents stay static and secrets never live in JSON. A transport-command security guard backs this.The chat implementation itself now lives in the standalone ChatView package; ActionUIChat is a thin element-glue wrapper over it.
5. New cross-platform features in core
Each of these landed on Apple, Android, and Web:
swipeActions- leading/trailing swipe-to-reveal row actions on List.searchableon List and NavigationStack.transition- insert/remove animation, the structural partner ofanimation. Shorthand string, typed dict (opacity, slide, scale, move, offset, asymmetric), or a combined array.contextMenu/contextMenuPreviewsubviews (long-press / right-click).ignoresSafeArea/safeAreaInset.Coloras a View and SwiftUI's<color>.opacity(<fraction>)syntax.DatePickerdisplayedComponents(date / hourAndMinute / dateAndTime).6. Swift 6
The whole package and Xcode project are on Swift 6 language mode with zero warnings. The core target is data-race-safe, deferred view construction uses main-actor bindings, and test-quality warnings are cleared. ActionUIViewer's screenshot capture offers both the legacy no-permission path and a ScreenCaptureKit option, with the deprecation confined behind a protocol witness.
7. Host API and adapter additions
New APIs, exposed consistently through the Swift, Obj-C, C, C++, JSCore, WebKitJS, Node.js, and Python bindings:
selectElementRowByIndex/selectElementRowWithContent/clearElementSelectiongetContentSizeLimits- exposes a window content's SwiftUI size limits to AppKit hostspresentToast/dismissToastActionUIMenuBaris now its own SPM-first module, split out of ActionUIAppKitApplication, with per-item targeting, SF Symbol icons, and macOS 26 icon inheritance.WebViewon Apple gained two interchangeable backings selectable by the host: a.nativeWKWebView wrapper (new default; works on the package baseline and avoids the find-on-page teardown crash) and the existing SwiftUIWebKit.WebView.8. Example apps
A new
Examples/folder of complete little applications - each loads a JSON skeleton, registers action handlers, and supplies logic in a thin native host, on all three platforms from one shared JSON:9. Tooling and documentation
--schema-dirfor add-on element schemas,is_actionui_json.pydetection, a Python test suite, and schema updates across the board.regen-symbol-map.shpipeline and refreshedsf_to_material.map, sourced from the standalonesf-symbols-material-maprepo.Color,Toast), and per-add-on documentation bundles that mirror core's layout.Breaking changes
foregroundColoris removed. UseforegroundStyle.foregroundColorwas the retired SwiftUI name; Apple and Android only ever readforegroundStyle, and web honoredforegroundColoron the static path only - so 34 JSON files were colored on web and silently uncolored everywhere else. Every platform now standardizes onforegroundStyle.compileSdkis 36. Hosts building against an older SDK need to bump.Notable fixes
hidden, reactively.navigationPathpush for standard NavigationStack content.background/cornerRadius/clipShapenow apply afterframe(fill, not hug).setElementStatetype guard rejecting same-logical-type collections.Platform support
Known gaps
ActionUIWeb/README.md).Documentation/).This discussion was created from the release ActionUI demo apps v0.7 Pre-release.
All reactions