Keep rotation on the GPU and read pixels back when a VNC viewer needs them. Associate each frame with its Vulkan presentation ID so input geometry and frame health advance when the display acknowledges it. A failed presentation releases the display and repaints through KMS.
Refs #145.
Co-authored-by: Shin Aoyama <[email protected]>
A game that declares `game.render.workers` in `app.json` runs its `Jobs::remote`
queue's wire jobs in Web Workers. Each worker holds a second instance of the
game's GPU module, compiled once by the page and posted to it; jobs and results
cross as bytes, with no shared memory, so the page needs no cross-origin
isolation headers.
- `module!` takes `workers`: the module then exports the worker's entry and
installs a `Transport` whose calls go to `globalThis.exact.gpu.jobs`.
- `host/web/gpu-jobs.js` is the page's transport: up to four workers, batches of
up to 16 jobs, the start and batch timeouts, replacement, the end of the lane
after three losses, and which queue an idle worker serves.
`host/web/gpu-jobs-worker.js` is the worker.
- `gpu-glue.js` binds the transport to a module loaded as an ES module, and
closes it at unload, a committed swap and a quarantine. A hot-swapped module
is inline.
- The bake ships the two scripts and the export only for a game with the key,
on both web builds.
- Whatever fails (a missing script, a page's `worker-src`, a timeout, duplicate
job names), the page plays on the inline lane.
- `renderHooks.jobs.wire` gains `readyMs` and `idleWithWork`, and is printed
only for a remote queue. An inline delivery past the deadline spends a remote
queue's late unit.
- The terrain fixture declares the key. Its bench records the wire readings for
each window and serves an ordinary page with `BENCH_NO_ISOLATION=1`.
In Chrome on a Mac Studio (M5 Ultra, 60 Hz), flying at radius 40 with
`light=96000 vertex=64 blend=window edits=4`, the lane fills the fixture's
window in 29 s and refills it in 383 ms with `prepare` at 9.2 ms p50 and no
frame past its deadline; with `jobs=off` the window is not full after 60 s,
a refill takes 683 ms and `prepare` is 15.5 ms. With the reuse compares on,
which stay on the page, neither finishes a refill. On a Pixel 5 the wire's
page time is 1.6 to 3.5 ms p95 a frame. Uncalibrated; `game/bench/README.md`
has the rows.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Why
===
#1237 remaps `EXACT_SOURCE_ROOT` by its physical path and as given. Three cases were left. The given spelling was passed through `path.resolve`, which collapses a `..` before the link before it, so with `/work/link` pointing to `/work/capture/sub/current`, `/work/link/../capture` was remapped as `/work/capture`: a later match than the physical prefix, it renamed a file under that physical path `source/sub/capture/…`, and a path written as given matched neither. On Windows `physicalPath` split a UNC path's root into parts and resolved `server` from the current drive, made a drive-relative `D:staging` absolute against the current drive's directory, and followed a link before a `..`, where Windows collapses the `..` first: with `C:\work\link` a junction to `C:\opt\current`, the system opens `C:\work\link\..\capture` as `C:\work\capture`, and the remap named `C:\opt\capture`. And a string of configured rustflags left out a spaced physical alias, so a sibling dependency named under that path kept its absolute path in the artifact.
How
===
The source root is remapped as written, `..` and all, after its physical path. `writtenPath` (`scripts/cargo-check.mjs`) makes a path absolute without collapsing a `..`: a relative one joins the working directory, a drive-relative one its drive's, and a root, a drive or a UNC share, stays whole. `physicalPath` starts from that. On Windows, and for a POSIX path without `..`, it resolves the path in one native call after `path.resolve`, as the system does; a POSIX path with `..` is followed part by part from its root, split at `/` alone, each link before a later `..`. Bun 1.4.2's `realpathSync` cannot read a POSIX name that holds a backslash, which the system and Node read, so such a root gives no physical path and is remapped only as written, as on main. A remap whose prefix holds a space is refused from a string of configured rustflags with the existing error naming the array form, which carries it.
Test Plan
===
`bun test scripts/cargo-rustflags.test.mjs` passes, with its case now: a linked root is remapped physical then as written with its `..`, its physical path the link's target's sibling on POSIX and the link's sibling on Windows, a canonical one once; a relative path is made absolute with its `..` and a backslash in a name kept; a spaced remap is refused from a string of rustflags and kept in an array. The Windows cases are read from Node's `path.win32` rules and Microsoft's path normalization (https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#evaluate-relative-components) and not run here. `bun scripts/gate.mjs` passes.
Why
===
#1236 stopped every ordinary compile error from compiling the Contract compiler: with stderr inherited, a failure counts as the Contract's only when a build script was built and did not run. Cargo's messages cannot settle that. A build script that finishes compiling as another crate's type error stops the build is built and never runs, so it still compiled the Contract compiler; a dependency's host build script that ran can share a package ID with its target build script that failed baking the plan, so a real Contract error went unsaid; and the JS web target's GPU build inherits stderr in Cargo's human format, which leaves no messages on stdout, so its Contract errors went unsaid too.
How
===
The relay that streams Cargo's stderr for such a build (`streamCargo` in `scripts/cargo-check.mjs`) reads it as whole lines, however the stream splits them, for Cargo's own error header for a failed build script, with colours stripped: `error: failed to run custom build command for …` for one that panicked or exited non-zero, as the plan's bake does, and `error: build script logged errors` for one that logged `cargo::error=` and returned (Cargo 1.99.1, measured); not the phrase quoted in rustc's excerpt of a source line; when it streamed one and the build failed, it adds a line to stdout, `{"reason":"exact-build-script-failed"}`. With stderr inherited, `contractMayHaveFailed` asks the Contract compiler only when that line is there, whatever message format the build used. A piped stderr is read for the same header.
Test Plan
===
`bun test scripts/contract-diagnosis.test.mjs` passes, with new cases: the relay's line asks and a rustc error or nothing does not; Cargo's header for a build script that logged errors asks, which fails with the earlier matcher; and the relay, run over a stand-in Cargo, adds the line for a header split across three writes, and not for the phrase in a type error's excerpt or after a build that passed. The case that fails a real build script on a Contract error still says every error. `bun test scripts/app-bake.test.mjs -t 'streams progress and retains product receipts'` passes. `bun scripts/gate.mjs` passes.
Use the target architecture’s redistributable CRT from Visual Studio for the executable and its DLLs, including Hermes. Record each copied DLL in the package receipt.
- Fail Mac signing before Cargo/Swift builds via a pre-bake `macSigning(..., { preflight: true })` check in `host/apple/build.mjs`, and document `EXACT_IDENTITY=-` / `DEVELOPMENT_TEAM=<team-id>` in `test --help all`.
- Document HTML's `command="close"` + `disabled` rule for `alertdialog` prompt buttons in `contract vocab confirm` (`concepts.md`) and `docs/agent-pitfalls.md`.
- Count `answer fetch` 4xx/5xx responses as arranged failures (`failureHits`) on web and native runners, and admit resource names in `expect refusal` (`scripts/agent-test.mjs`, `contract/syntax/src/parser/steps.rs`).
- Separate per-turn scroll deferral (`ScrollHold`) from collection deferral in Android's `CanvasHost` so scrolling a plain `<scroll>` never leaves `tell_shell()` (`Request::Back`) suppressed on later turns.
- Fix iOS VoiceOver / `tree --ax` gaps: expose a labelled `select`'s chosen option via `accessibilityValue`, forward `aria-label`/`aria-labelledby` on `<video>` and `<audio>` without overwriting audio's Play button, expose read-only Markdown `atoms` (and inline `role="link"`/`"button"`) as individual accessible elements, and clarify the foreign-checkout fixture hint in `scripts/app-server.mjs`.
Why
===
`rustRemapFlags` remaps `EXACT_SOURCE_ROOT` by its real path (#1218), so
a source under a linked root is remapped as Cargo names it. Three cases
were left. A path written in the root's given spelling, as `env!` or an
`include!` hands it to rustc, no longer matched any prefix, so its
absolute path stayed in the artifact. A root that links to a path
holding a space gave a flag a string of configured rustflags cannot
carry, and `targetRustflags` refused a build that had built before. And
Bun 1.4.2's `realpathSync.native` collapses a `..` before it follows the
link before it, so `/work/link/../capture`, which the system reaches as
`/opt/project/capture` when `link` points to `/opt/project/current`, was
resolved to `/work/capture`, or not at all.
How
===
The source root is remapped by its physical path and as given, both to
`source`, the given spelling last, so where both match one path rustc
takes it. `physicalPath` (`scripts/cargo-check.mjs`) resolves a path as
the system does, following each link before a later `..`, and is null
when a part cannot be read. Building a string of configured rustflags,
`targetRustflags` leaves out a spaced remap whose prefix is the physical
path of another flag's, remapped alike, which is that alias, and never a
given spelling; an array and Cargo's encoded flags carry both.
Test Plan
===
`bun test scripts/cargo-rustflags.test.mjs` passes, with a new case:
`physicalPath` follows a link before `..` where `realpathSync.native`
fails, and is null for a missing root; a linked root is remapped
physical then given, a canonical one once; a string of rustflags leaves
out a spaced alias, keeps it in an array, and refuses an uncovered
spaced remap and a spaced given spelling. `bun scripts/gate.mjs` passes.
---------
Co-authored-by: ide-agent <[email protected]>
Co-authored-by: Charlie Cheever <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
Why
===
When a host build fails, `buildCommand` asks `throwContractErrors`
whether the Contract is the cause, and that runs the repository's
Contract compiler (`cargo run -p contract`), which compiles it when it
is not fresh. With stderr inherited, `contractMayHaveFailed` read
Cargo's JSON on stdout and took the failure for the Contract's unless a
rustc error was there. The bakes run Cargo with
`--message-format=json-render-diagnostics`, which renders rustc's errors
to stderr and puts none on stdout, so every ordinary compile error, such
as a type error, was taken for a possible Contract error.
`scripts/app-bake.test.mjs`'s "ordinary buildBake with split directories
streams progress and retains product receipts" met it: in its third bake
Cargo reported the type error within a third of a second, and the bake
then compiled the Contract compiler for 55 seconds, or past the test's
180-second limit, before reporting. Where the compiler was fresh the
bake took 2.4 seconds, so the test failed only sometimes.
How
===
With stderr inherited, a build may have failed for the Contract only
when a build script was built (a `compiler-artifact` of kind
`custom-build`) and did not run (no `build-script-executed` for its
package); that is how the plan's bake failing shows. A rustc error after
the script ran, or a failure with no build script, asks nothing.
Test Plan
===
`bun test scripts/contract-diagnosis.test.mjs` passes, with new cases
from Cargo's messages for such a build: a script built and not run asks,
a script that ran before a type error does not, and neither does a
failure with no script. The case that fails a real build script on a
Contract error still says every error. `bun test
scripts/app-bake.test.mjs -t 'streams progress and retains product
receipts'` passes in 2.7 seconds, twice, where the event order logged
before the change showed the 55-second and the killed runs. `bun
scripts/gate.mjs` passes.
Co-authored-by: ide-agent <[email protected]>
Why
===
Four tests in `scripts/` failed on main because the code they read moved under them. `scripts/rust.test.mjs`'s "external Rust modules have identical bytes in relocated cold source captures" copies `scripts/rust.mjs`'s imports into two captures by scanning each file as JavaScript; the graph now reaches `document-utis.json`, a JSON module, which the scanner could not parse ("Expected \";\" but found \":\""), and `host/apple/link.mjs`, which reads `./Package.swift` beside itself as it loads, which the capture lacked. `scripts/app-bake.test.mjs`'s "packages static files without Finder metadata" runs each host's packaging step cut out between two markers: `7ffe182e15` (#695) moved the web build's static copies away from its start marker, which now opens mid-expression, and `ab5144ae47` (#1086) indented the watch build's step one level deeper, past its end marker. Its "game web, release and unwired gpu-dev bakes never open registry generations" stubs `buildCommand` by rewriting `scripts/app.mjs` as it loads, and `65979d7e2b` moved `buildCommand` to `scripts/cargo-check.mjs`, so the test ran a real Cargo build in a directory with no workspace.
How
===
The capture copies a JSON module without scanning it, and copies each file a module names beside itself with `new URL(…, import.meta.url)`. The web row starts at its first `copyStaticTreeIfPresent`, and the watch row's markers carry the step's indentation. The GPU test rewrites both modules and refuses a run in which either stub was not written, so a function that moves again fails at the rewrite rather than by building.
Test Plan
===
`bun test scripts/rust.test.mjs -t 'identical bytes in relocated cold source captures'`, `bun test scripts/app-bake.test.mjs -t 'packages static files without Finder metadata'` (five hosts) and `bun test scripts/app-bake.test.mjs -t 'unwired gpu-dev bakes'` pass; each failed on origin/main. `bun scripts/gate.mjs` passes.
Why
===
`bun host/web/build.mjs unsaid` failed: "app.json's rust.data.crate is hello-data, which is not a crate beside app.json". Unsaid, Weather Now and Material Specimens declare Hello's data crate (`apps/hello/data`), which their own host crates link by path; `7da7f53c14` gave them `rust.data`, as LLP 1153.003 D2 has every Rust-data app declare it. The web build's module looked for that crate only among the crates beside `app.json`, so none of the three built for the web.
How
===
For an app whose host crates exact2 does not generate, the module's data crate is the one the app's host crates (`apple/`, `android/` and the others `HOST_CRATES` names) link by path under the name `rust.data.crate` gives (`linkedCrate` in `scripts/cargo-check.mjs`), else the one beside `app.json`: a normal or build dependency of that name or renamed to it, with its own `path` or one inherited from the workspace's `[workspace.dependencies]`, under its name or renamed there, the workspace found as Cargo finds it (`package.workspace`, else the nearest `[workspace]`, the crate's own manifest first) and read without a build's lock check; a test's dev-dependency, or another crate beside `app.json`, is not what a host builds. Both lookups start from the app's canonical directory. That is the directory the native hosts build, so the page runs the same crate, even beside a same-named copy in the app's directory. Two host crates linking different directories under the name are refused, and so is an app for which neither lookup finds the crate, each saying how to fix it. A generated workspace still takes its data crate from beside `app.json` (LLP 1153.003 D1).
Test Plan
===
`bun host/web/build.mjs unsaid`, `weather-now` and `material-specimens` build. `bun test scripts/cargo-rustflags.test.mjs -t 'link by path'` passes, with a new case: the crate is found through a target-specific path, a renamed dependency, a workspace-inherited one, one renamed in the workspace and one from a host crate that is its own workspace's root, not through a dev-dependency or a crate that is not a host's, none when no crate links it, and two different directories are refused. `bun scripts/gate.mjs` passes.
- Mac popover text selection: deduplicate NodeView.id across overlapping tops roots in TextSelection.paragraphs and shownParagraphs so presented popovers still attached under presenter.root do not trap Dictionary(uniqueKeysWithValues:).
- Mac status items: key StatusItemHost's cached icon on MenuHost.MenuImageKey and guard redundant AppKit property writes (title, toolTip, accessibilityLabel, appearsDisabled, item.menu) to avoid menu-bar redraws on unchanged batches.
- Mac release notarization: sign and notarize the .dmg before stapling it in scripts/exact.mjs.
- Scheme net.fetch grants: include https: and http: scheme grants in fetchOrigins and nativeFetchOrigins and match them in resolveFaultPrefix without warning while keeping backend and /path aliases scoped to concrete origins.
- verify ios summary: add 'scrolling was not measured' to the closing verdict when scroll measurement errors.
- contract fmt: keep '.' tight after numeric path indices (nav.tabs.0.stack.3.name) unless the following token starts with an ASCII digit.
- Widgets: add systemExtraLargePortrait across manifest validation, schema, snapshot admission, WidgetGallery, SnapshotDriver, Timeline.swift, Android cell spans, and generated WidgetBundle.swift behind #available(iOS 27.0, macOS 27.0, *).
- Docs: clarify navigationType is on exactPage (docs/contract-for-humans.md), note banned globals in node_modules and android --run --url in docs/start-here.md, and list systemExtraLargePortrait in docs/reference.md.
Why
===
`rustRemapFlags` remapped `EXACT_SOURCE_ROOT` as the environment spells
it, but Cargo names a package's sources from the real directory it
reached them in. Given a spelling through a link, such as macOS's
`/var`, which is `/private/var`, the prefix never matched, and a
dependency under the root kept its absolute path. A deploy canonicalizes
the root it sets, but the remapper did not depend on that.
`scripts/cargo-rustflags.test.mjs`'s wasm remap test met this: its
temporary directory is `/var/folders/…`, so its sibling dependency kept
its absolute path. It also could not build on a Mac with no rustup
default toolchain, since its app lives outside exact2's
`rust-toolchain.toml`.
How
===
The source root's prefix is its real path, or the path as given when it
does not exist; a canonical root gives the flag it gave before. The
other prefixes stay as they are: an app's directory, and with it its
workspace and target, are already resolved by `resolveApp`. The test
writes exact2's `rust-toolchain.toml` into its app, as a generated
workspace carries it (`scripts/app-shells.mjs`), and keeps the temporary
directory's linked spelling.
Test Plan
===
`bun test scripts/cargo-rustflags.test.mjs` passes on a Mac with no
rustup default, and its wasm remap case fails without the change to
`rustRemapFlags`. `bun test scripts/app-bake.test.mjs
scripts/rust.test.mjs`, which also read the remap flags, fails the same
cases on origin/main as with the change. `bun scripts/gate.mjs` passes.
---------
Co-authored-by: ide-agent <[email protected]>
Co-authored-by: Charlie Cheever <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
Publish both axes of the painted scroll container. Map UI Automation percentages, visible sizes, and line and page actions to its live scroll positions, including popup windows.
Select the Windows entry from the trust in the baked receipt. A production binary has no reference to the headless presenter and its command handlers. The Windows release packager selects production trust unless the caller explicitly selects development for an optimized driver build.
Refs #1199
Read the current offset from Windows and look up named zones at the requested instant with system ICU. Reuse the calendar for consecutive dates in the same zone. This removes the bundled time-zone database from a Windows app that uses the shared painter.
Refs #1199
Start the D3D11 device workers when the app asks to show its window. Keep it cloaked and leave the foreground with the current app until the window has presented its frame. A hide during preparation cancels the show and releases its painter.
Refs #1195
Why
===
iOS, iPadOS, the Mac and the web drag a `draggable` node into other apps (LLP 1094.000 stages 2 to 4). On Android, D7 has the painted presenter recognize the long press and the reader start the platform's drag, with files served by a provider of the reader's own; the same gap kept files out of `share` on Android, so the two land together. D9 gives the drag to assistive services as `ACTION_DRAG_START`.
How
===
The presenter's long press (`top/invoke.rs`) now finds the innermost node with `draggable` from the finger up, stopping at a disabled node, a text field or a control that follows a finger (a slider, a switch, a date or time), which keep their contact; a button, a checkbox or a progress bar inside the node lifts it, as on iOS. That node drags, with the platform's long-click feedback, when no node with a menu is nearer. On the node's own menu, or a nearer one, the menu opens, and when the node carries something the held finger moving on past the platform's touch slop closes the menu and lifts the drag, as a held app icon and Chrome's held image do; an alert the node's `contextmenu` opened stays. A drag counts as a taken long press and the reader's hit reply names a node that drags, so a hosted view under the finger yields; once exact2 has taken the long press, the reader keeps the rest of the contact from a scroller (`Contacts.longPress`), holding the moves that come while it waits for exact2's answer. The reader's offset into the hit reply for that count now skips the five words a nested sheet's flag adds, in `finishHold` as at the down, so a hosted view's long click under a nested sheet reads the right count. No drag lifts under the agent, whose `tree` says what one would carry, as on the Mac.
The drag is a new request, kind 23 (`presenter/drag_out.rs`): the node, its box and the finger in the view's pixels, whether a service started it, the text, the URL and each file as the node names it. The reader's `DragOut.kt` reads it (`DragOut.read`), finds each file as it finds a `video`'s source (`Sources.file`), serves it as a content URI of its existing `Files` provider, journals one it cannot find, and calls `View.startDragAndDrop` with `DRAG_FLAG_GLOBAL | DRAG_FLAG_GLOBAL_URI_READ` (plus `DRAG_FLAG_ACCESSIBILITY_ACTION` for a service's drag on API 32 and later). The shadow is what the window shows within the node's box as its clip leaves it, copied with `PixelCopy`, since the view's own drawing is its frame's work; a plain card stands in where the copy fails or cannot be asked. The clip is one item a file, then the URL and the text as `text/plain`: Chrome makes every item with a URI a file, so a URL rides as text.
On a host that lifts drags, the access tree flags a node that drags, a box that drags with words of its own becomes one element named by them, and the reader offers `ACTION_DRAG_START` for it on API 32 and later; a service's long click opens the element's own menu. `share(files=…)` on Android now carries `app:/` files to the sheet as `EXTRA_STREAM` content URIs with a read grant (`Requests.sendIntent`), `exactPage()` says `canShare` and `canShareFiles` there, the sheet takes files exactly where it says so, a share that fails before the sheet opens is answered, and an element's picture is still refused. The reader's README names request kind 23 and the share's files, the recipe and the grammar say Android lifts the node, and the grammar that Android shares `app:/` files.
Test Plan
===
`cargo test -p exact-painted --lib` passes, with the new `drag_out_tests`: the request's words, which the reader reads back; a nearer drag beats a menu, a node's own menu then a move lifts the drag, a menu on a node that carries nothing stays, a down or a cancel ends the chance; a field, a slider, a switch and a disabled node keep the contact, and a button, a checkbox and a progress bar lift the node; share's files where the sheet says so and the refused picture; `exactPage`; a service's drag and long click; the hit reply; none under the agent; a clipped node's shown part; an image keeping its role; a host that lifts nothing flagging nothing. `cd host/android && ./gradlew :canvas:testDebugUnitTest` passes, with the new `DragOutTest` (the request read back, the clip, a file the app does not have left out and journaled, the flags by API level, the sheet's intent) `AccessTest` cases (Start drag offered and acted on API 33, none on API 31) and two `HostedTouchTest` cases (a long press exact2 takes keeps the move from the scroller and one it does not take leaves it, which fails without the yield; the moves that come before exact2's answer wait for it, which fails without the hold). `bun scripts/completion-inventory.mjs --check` and `bun scripts/gate.mjs` pass.
On an Android 16 emulator in split screen, interaction-gallery's card dragged into Messages, whose compose row received the photograph's content URI and read it through the grant (the SMS-only conversation then refused the attachment), and into a Chrome page, which read the PNG whole, byte for byte the shipped file's size. For the measurement only, the card was given text and a URL, which Messages inserted, and a `contextmenu`: in the gallery's vertical list a held press then a move up the list lifted the drag instead of scrolling, its shadow the card's shown strip. A Shelf row given `draggable` opened its menu on the held press, and moving on lifted its drag into Messages. A Fieldnotes row given its saved backup dragged `fieldnotes.json` (33 bytes, `application/json`) into the Chrome page, and Fieldnotes' "Share backup file…" opened the Sharesheet with that file. Files refuses every other app's drag by design (DocumentsUI's `DragHost`), so no drop into it is possible; a device, API 29 to 35, TalkBack and other destinations stay open in the LLP.
Check the prepared batch before committing across sessions. Hold the candidate if it would remove the composing editor or make it unreachable, and retry when the input method finishes. Keep retained roots mounted as their siblings change.
Refs #754
When a sibling has to clear the native route container, keep positioned siblings that follow the container in the same paint step. Equal ranks then paint and receive touches in subview order. Update the depths when the container moves across its siblings.
Refs #1174
Let a test supply a source result at launch and change it as the script runs. Refresh every reader of that source through the runner’s topic-change handling. Replay typed answers in the flat and component semantics and the web JS runtime, including answers supplied for a native module.
Check always properties over resource-dependent derives and fail verification when an expectation in a test with supplied answers is false.
Why
===
An agent that makes an app on a machine without Xcode, such as a Linux
sandbox, learns from `exact new` only what the web needs. Nothing says
the iPhone build cannot happen there or where it can, so the agent runs
`exact setup` and local iOS builds that cannot finish.
How
===
`exact new` reads the iOS device rows of the setup report and asks only
for the Apple tools `exact setup` does not install: Xcode with its iOS
SDK on a Mac, the Apple cross SDK and its tools on Linux. Any other OS
has none. A device build needs only the iPhone device SDK, so
`appleCrossReport` now takes the cross SDKs a build needs and the report
for a device build asks for `iphoneos` alone; a device-only cross SDK no
longer reads as missing, for `exact new` or for the preflight of `share`
and `ios --device`. When they are missing, `exact new` for an app ends
with one line: the machine cannot build the app for iPhone, Exact Build
builds it in the cloud and AppDrop installs it, with the agent guide
(https://exact.appdrop.app/agents.md) and the API
(https://exact.appdrop.app/docs). A machine that lacks only Rust or a
Rust target is told nothing new, since `exact setup` fixes that; a game
is told nothing either. No command builds remotely: the line is advice.
Test Plan
===
A new test in `game/new.test.mjs` runs `exact new` with only Bun on
PATH, which has no Xcode on a Mac and no cross SDK on Linux, and reads
the line. A second, on Linux, gives `exact new` a device-only cross SDK
(no simulator configuration) and stub Swift, LLVM and rcodesign of the
pinned versions: no line. The same tools without the SDK get the line.
It fails before the device-only change. On Linux without Rust, `bun test
scripts/exact.test.mjs` has the same failures, and `scripts/caps.mjs`
finds no file over its cap, with this change alone or merged with
expo/exact#1171 before and after the change, each needing Rust or a Mac.
---------
Co-authored-by: Amp <[email protected]>
Co-authored-by: Eliot Hertenstein <[email protected]>
Why
===
On a machine that cannot build for iPhone, such as Linux without the
Apple cross SDK, three messages misled an agent:
- `bun exact.mjs share` refused as `bun exact.mjs ios: this machine
lacks what a ios build needs`, naming a verb that was not run.
- When app.json already named iOS (`exact new --with ios`), `share` and
`ios` skip the setup rows, and generating the native workspace without
Cargo ended in a Bun stack trace from `ensureShells`.
- `exact new` printed the web's rows under "This machine still needs",
and a builder whose goal was an iPhone build read them as what that
build lacked.
How
===
`bringPlatform` takes the verb that was run and refuses in its name; the
app CLI passes it. A failure to generate the native workspace is a
refusal in the same form, `bun exact.mjs share: cargo was not found on
PATH …`, with nothing written. An app's table from `exact new` now opens
with "For the web (bun exact.mjs web, test web, verify), this machine
still needs"; a game's table is the whole report and keeps its heading.
Test Plan
===
Two new tests fail before the change and pass after it.
`scripts/app-hosts.test.mjs` runs `share` with only Bun on PATH, once in
an app that does not name iOS (refused as `bun exact.mjs share`) and
once in one that does (the one-line Cargo refusal, no stack frames). A
second runs `exact new` with only Bun on PATH and reads the web heading.
On Linux without Rust, `bun test scripts/app-hosts.test.mjs
scripts/agent-android.test.mjs scripts/exact.test.mjs` has the same 14
failures before and after the change, each needing Rust or a Mac.
---------
Co-authored-by: Amp <[email protected]>
Co-authored-by: Eliot Hertenstein <[email protected]>
Move a full-height aside into an AppKit split item. The panel starts at the authored width, follows its divider and restores the person’s width and visibility. Its controls stay in the route’s input and accessibility paths.
Count evdev and VNC mouse presses at their input timestamps. Extend a selection by the unit that started it, using the painted glyph under the pointer and the same selectable ranges and clipboard as a drag.
Fixes#1163.
Use the painted paragraph to hit-test the drag and highlight its UTF-16 range. Report each paragraph's selected text and geometry, and copy the visible text through the desktop clipboard when a field does not own the shortcut.
Fixes#1155
Select a fresh local binary or a matching tool set when regenerating TypeScript declarations. If a cached product disappears, try the other matching sets before falling back to Cargo. Skip the background compiler build when a new app can use an existing compiler.
Why
===
On an iPad or the open iPhone Duo, a stack whose list rows push showed one pushed stack, where a hand-built UIKit app shows UIKit's split view: the list beside its detail on a wide display and one stack on a compact one (LLP 1127 D2). An app that wanted the split built it with the `tabContainer` hatch, which runs only after first pixel (LLP 1075.003.000.001 D5), so its first frame was Exact's container and the split replaced it a moment later: UI Gallery on the open Duo drew a tab bar in the side strip, then its sidebar, and its header and page moved.
How
===
A stack that splits (`Runner::stack_split`) is a `.doubleColumn` `UISplitViewController` (`SplitIOS.swift`), installed at every size outside a tab and before the first draw: `installPrimary` makes it, and a stack that splits is never deferred to a boot holder. The list's navigation controller (N0) holds the root route and the detail's (N1) the routes above it. UIKit decides how many columns show and their widths. `show(_:)` reveals a new detail under a list shown over it and the list over the detail alone when the stack goes back to its root. A push or pop within N1 is UIKit's, with the route's own transition and zoom, collapsed or expanded; collapsed, N0's push and pop of N1 take the zoom of N1's base while N1 holds just that base, prepared again whenever the base changes, and are N1's top's while it holds more, as a pushed stack's push or pop of that top is. So no pop zooms into a source an earlier base named, or into the base's source with another route on screen (D6). From UIKit's expand or collapse question to `didExpand` or `didCollapse`, the columns are left to UIKit and written once it is done. `reshape` swaps the containers when a stack starts or stops splitting. Where the runner cannot answer (inside a callback it waits on), the stack is asked again on the main queue's next turn, which `clock settle` waits for.
The host follows UIKit's stacks as state, and a collapsed Back pops N1 off N0 while N1 still holds its routes. So `RouteController.inStack` counts a route of N1 in a stack only while N1 is in its column or nested in N0, or UIKit is moving it, and `committed` reads N0's coordinator when N1 is what leaves (D5.4); one Back is a `goBack()` and more a history jump. Of the two pop recognizers under one finger, N1's pops within the detail and N0's only while N1 holds one route (D5.3), and the zoom's drag-down dismissal of N1, which is N0's pop, begins only where N0's recognizer may; none begins on the base's own zoom, which N1 cannot pop. A stack's held sync runs after the end of a swipe it follows, since N1, nested, has no coordinator left in its transition's completion.
Liveness is D8's. The kernel holds how each route's block shows against its stack's top (`BlockShown`: in the stack, beside it, or under a pane over it), which the host tells with claim kind 23 of `exact_host_covers`: beside the detail both columns are live, over the detail only the list, with the detail alone or collapsed only the detail, and under a sheet the columns show and are not live. The runner's point reads in the list's column beside the detail reach the list. While N1 is nested its top decides N0's bar, and its bar items, menus and tips anchor in N0's bar (D7); a route in N1 counts as pushed, and the empty detail says "No Selection".
Beside its detail, a grouped list in the list's column is UIKit's sidebar list (`GroupedSidebarIOS.swift`): `UICollectionLayoutListConfiguration.Appearance.sidebar`, no separators or disclosure chevrons, its grounds UIKit's, and the detail's row selected: the row that links to the detail's base, else the row whose press brought the base or moved it while it keeps that location, else the row the app marks current. A press of a row in the list's column counts collapsed or expanded: a batch the runtime made during it that brings or moves the base credits its row. Each batch is judged as it syncs, before UIKit's transitions can hold the sync, and against the base the batch before it left, so a press that changed nothing credits nothing. Such a batch may apply after the press returns, behind a fill in flight; until the session holds none, the sidebar keeps the pressed row. The detail's row is selected again after any press that leaves the detail as it was and after the split expands. Collapsed, it is the authored list. `state window.split` reports whether UIKit collapsed the split, its display mode and the list's width, each column's routes, whether the detail is nested, `empty`, the routes beside the top and under a pane, and the row whose detail shows. `contract vocab navigationSplit`, the concepts, the list-detail and REST patterns, the foldables recipe, the guide's point reads and the pitfalls say where the split shows. `StackSplit` moves from the Mac's file to shared Swift.
Asking whether a stack splits costs 21–49 µs a call on the Duo simulator (Rust optimized, Swift debug, 2,000 calls in 3 rounds), about 5–8% of a sync that changes nothing, and about 0.2 ms of a 77–203 ms launch, so the answer is not cached.
Test Plan
===
`SplitIOSTests` covers the split installed before the first draw and asked again where the runner is busy; a stack that starts and stops splitting; liveness beside, over, alone, collapsed and under a sheet and a full-screen cover, and the list under an empty detail alone; D6's `show(_:)` calls; the detail's bars and a collapsed detail's bar items in the list column's bar; a collapsed detail's own transitions and zoom, a zoom within an expanded detail, the detail column's zoom following its base and held only while it holds just the base, and its dismissal only over the base and never on the base's own zoom; a row chosen beside the detail and a replace that keeps the detail's route; UIKit and the router agreeing at rest; expanding and collapsing with the detail kept; UIKit's own pops of a collapsed detail and the back swipe, each dispatching one Back; the sidebar list and its selection, by a link, by a press that brings or moves the base, expanded or collapsed, during a push within the detail, or with its batch landing after the press returns beside a press that changes nothing, and by the current row; and the agent's state. The kernel and the C ABI test `BlockShown` and kind 23, and the runner tests liveness and point reads beside the top, an overlay after the routes staying in front with a block the host places after it. The navigation classes the change reaches ran on the same simulator; the failures among them fail the same way without the change. The tvOS host compiles, and the Mac's split and sidebar tests pass. UI Gallery's launch on the Duo, open and folded, and the iPhone 18 Pro, recorded with every distinct frame kept, draws the split or the list from the first app frame.
```
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer EXACT_SHOW_SIMULATOR=0 bun host/apple/build.mjs --test --ios --sim <iPhone Duo, iOS 27.1> --only SplitIOSTests
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer EXACT_SHOW_SIMULATOR=0 bun scripts/known.mjs -- bun host/apple/build.mjs --test --ios --sim <iPhone Duo, iOS 27.1> --only <the navigation classes>
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer bun host/apple/build.mjs --tvos --no-install
DEVELOPER_DIR=/Applications/Xcode-27.1.app/Contents/Developer bun host/apple/build.mjs --test --only SplitMacTests,SidebarMacTests
cargo test -p exact-kernel -p exact-runner -p exact-apple
bun scripts/gate.mjs
```
## Summary
A swipe in a list that starts on a native button (a reaction chip, say)
presses the button, and the scroll claiming the touch cancels it (LLP
1061: a press releases on up, cancel or pan takeover). `press_feedback`
keeps the release in `Host::presses`, easing to 0, until
`retire_presses` drops it, and that runs only inside a motion frame.
`press_settle` asks for no frame for a native button or a node that
shows no press, so nothing comes to retire the entry. It stands until
some unrelated motion frame runs.
On Android every scroll step pays for it. While `pressing()` holds, no
picture is still, so a step cannot move the last picture and paints the
whole tree instead. A paint held for a scroll leaves the presenter
dirty, so a Choreographer turn also paints at every vsync. On the other
hosts the entry only made its row record again at each paint.
A release that no frame eases now removes its entry at once and marks
its row dirty, so the next paint draws the row at rest. A native
button's pressed look comes from the contact, which this does not touch.
Presses that ease are unchanged. `press_feedback` now reads the node, so
the completion inventory classifies it beside `retire_presses`.
Measured with the heavy-list benchmark's Android port (not on `main`
yet), live mode, 24 flings per trial:
- **Galaxy A57**, 15 trials each, on builds that also carry other
unmerged reader work: without the change 10 trials ran away, with it
none. A runaway trial cost 259 ms/s on the `exact` thread and 738 ms/s
of process CPU, against 81 and 522 for the other trials. With the change
the trials cost 81 and 523.
- **`main`'s own build** (`da0e4e0fbc`) on the same phone: 5 of 9 trials
ran away, at 370 and 875 ms/s against 168 and 654. The change was not
measured on this build alone.
- **moto g57 power**, 16 trials each: 5 runaways without the change,
none with it. A runaway ran 5.79 G instructions on the `exact` thread
against 2.85 G.
Frames, janky frames and the main thread are the same in a runaway
trial; the cost is all on the `exact` thread.
## Test plan
-
`events_tests::a_native_buttons_cancelled_press_leaves_nothing_pressed`:
a cancelled press on a native button leaves nothing pressed. It fails
without the change.
- `cargo test -p exact-painted --lib` passes.
- `bun scripts/gate.mjs` passes.
- Not checked on screen that a released chip draws unpressed.
Why
===
LLP 1094.000 lets a person lift a node and drop what it carries into another app. Its first stage builds what every host shares before any host lifts a drag: the authored declaration, the runner's admission of a drag's data for the host, and the test step that asserts what a node carries. Each platform's lift then builds on one tested core.
How
===
`draggable` (HTML's attribute) and `dataTransfer=DataTransfer(text=, url=, files=[…])` are new attributes. The type checker reads `DataTransfer(…)` as a named-argument construct, as it reads `share(…)` (`contract/types/src/checks/transfer.rs`), and lowering binds each argument to its own compiler-written prop, `files` joined by newlines, as `metadata=MediaMetadata(…)` binds its fields (`contract/lower/src/transfer.rs`). Lowering refuses a draggable node with nothing to carry, data on a node that never drags, `draggable` on a tag with a drag or gesture of its own or on a run of text, a gesture beside it that claims the same movement, anything draggable written in a grouped list's section, a literal shipped file the app does not ship (in the bundled-file pass), and `dragstart`, `drag` and `dragend`, each by name with what to write instead. A literal `draggable=false` needs no data and claims no movement. The schema gains `draggable`, `dataTransferText`, `dataTransferUrl` and `dataTransferFiles`.
A shipped file is `exact_plan::is_shipped_drag_file`: a portable path under `assets/` that Apple's asset resolver also opens. The runner's new `runner/src/transfer.rs` holds the file-entry rule a drag and `share` share, and `share`'s `app:/` arm now uses it. `Runner::admit_drag_files` rewrites a commit's `dataTransferFiles` and `dataTransferUrl` to what the host carries before the batch is sent, refusing a file outside the grants, on the web any `app:/` file, and a `url` that is not absolute `http:` or `https:`; it clears a prop left with nothing and journals each refusal as `drag: refused: …` when the prop is written. Any `draggable` sets the new capability `drag_out`. The wasm web host needs nothing linked for it; the JS target loads `host/web-js/drag.js`, the page's port of the admission, which journals a value when it changes, as the runner does. `scripts/app.schema.json` names the capability for `link`.
`expect drag "<testId>" none | has "<type>" [== "<value>"] [name "<name>"] | missing "<type>"` parses in `contract/syntax/src/parser/drag.rs` and asserts what a node carries as `tree` shows its admitted props, by `scripts/agent-drag-out.mjs`, the same on every host; the JS target's tree reads the props back from their `data-` attributes. No host lifts a drag to the system yet, as `docs/recipes/drag-out.md` and the grammar say.
Interaction gallery's Photos cards carry their photograph, with an authored test. Its deck tests throw 180 points instead of 200, which left the 382-point screen of a folded iPhone Duo; why a 150-point throw stays under the deck's threshold on iOS is in `QUEUE.md`. The `gpu-shader` recipe joins `contract vocab`'s list, which a test holds to the directory.
Test Plan
===
`cargo test -p contract --test it -- drag_out corpus vocab`, `cargo test -p exact-plan --lib drag_file`, `cargo test -p exact-web --lib link`, `cargo test -p exact-bake --lib link`, `cargo test -p exact-web-js --bin exact-web-js a_drags_bound_data` and `bun test scripts/agent-drag-out.test.mjs host/web-js/drag.test.mjs` pass, but for two `vocab` tests (`no_name_prints_the_card_and_all_prints_every_table`, `a_closed_output_pipe_ends_quietly`), which fail on main as here: `contract/cli/src/vocab/card.rs` looks for an `Ops` block that `scripts/help.mjs` no longer has. Interaction gallery's authored tests pass on the web (the JS target, with `drag.js` in its bundle), Linux, macOS 27 and an iPhone Duo simulator on iOS 27.1: `bun scripts/agent.mjs <host> --app interaction-gallery --test apps/interaction-gallery/app.test.contract`, run before the last edits, which change only compile-time checks, visibility, the URL rule's edge characters and text. `bun scripts/gate.mjs` passes.
Why
===
LLP 1083.000 D4 lifts nodes beside a native tab container's panels into stands in a layer just after it. Two paths broke the paint order CSS gives those nodes.
An exit ghost in a stand, whose id its parent's child list no longer names, sorted to the stand's end, so it painted over the nodes lifted after it while it played. A parent keeps a ghost's index among its children (LLP 1083.000 §4 item 3). A flight's slot in a stand drifted to the end the same way.
A node put back into its parent was inserted among the parent's views but not its flat boxes (LLP 1068 §6.1). `putBack` only marks the parent's boxes for the next flush, and the batch's flush has run by then, since `PresenterIOS` flushes before `navigation.batchApplied`. So a flat box after the node in the tree painted under it until a later batch.
How
===
`PanelSiblings.order()` orders the nodes the parent's order names around what it does not name, a ghost or a flight's slot, which keeps its index. `apply` and `putAllBack` flush the flat boxes once nodes have gone back.
`PanelSiblingsIOS.swift` now puts the walk that decides what lifts ahead of the classes that hold the lifted nodes, and its long comments are rewrapped to the file's width; no other code changed.
`NavigationMoreLiftIOSTests.swift` takes More's two lift tests out of `NavigationMoreIOSTests.swift`, which is at the line cap, and adds one for a cancelled swipe toward More's list. That case already lifts the node again after the cancel; the test keeps it so. `moreFixture`, `pickRow` and `node` are no longer private, for the new file's sake.
Test Plan
===
- `TabEdgeIOSTests.testALeavingBarKeepsItsPlaceUnderTheNodesLiftedAfterIt` checks that a leaving bar stays under the drawer lifted after it.
- `TabEdgeIOSTests.testASidebarPutBackKeepsTheFlatBoxAfterItOverIt` checks that a flat box after the sidebar is over it once the sidebar is put back. The tab-edge fixture gains that box.
- `testALiftedBarPlaysItsExitOverTheContainer` now checks that the bar stays in its stand through its whole exit.
- `NavigationMoreIOSTests.testACancelledSwipeTowardMoresListLiftsTheNodeAgain` covers the cancelled swipe.
Two variants each take one fix back, and each fails its test: sorting ghosts last again, and dropping the flush.
Before the rebase onto main, on an iPhone 18 Pro with iOS 27.0, `bun host/apple/build.mjs --test --ios --only <classes>` builds of the 28 classes that cover tabs, navigation, paint order and accessibility were run hosted and bare. They passed, except for tests that fail on the base too: two share tests that exceed their time allowance, and three `NavigationBasicsIOSTests` cases. `bun scripts/gate.mjs`, `bun scripts/seam-ratchets.mjs` and `bun host/apple/build.mjs --tvos --no-install` pass.
On this commit's parent, `25879b6031`, the gate and seam ratchets pass, `TabEdgeIOSTests` and `NavigationMoreIOSTests` build, and the new and changed tests pass on the 18 Pro.