Conversation
The app runs on tvOS without a browser: NativeScript is the runtime, its canvas plugin the WebGL surface, and @solidtv/nativescript the host between them and SolidTV. `nativescript/` is that project, its own pnpm root, and holds only the host: the boot file, the webpack config that bundles `../src` as it is, the App_Resources, the simulator scripts and a stand-in for a plugin package with no tvOS build. It imports the web entry, `src/index.tsx`, unchanged: the HashRouter, the focus manager on `document`, `fetch`, the relative asset URLs, `import.meta.env.BASE_URL` and `loadFonts` all work through the host's shims and platform. `src/` gains one rule. Back from the open nav drawer on the start page is left unhandled, so a platform that hands the system what the app leaves unhandled, Apple TV's Menu button, leaves the app there and nowhere else. A browser never notices: walking history back from the start page did nothing before. The three SolidTV packages are linked from sibling checkouts in `nativescript/package.json` until their next releases; the pins follow. The root package.json is untouched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The demo on Apple TV, without a browser, from the same
src/as the web build. NativeScript is the runtime, its canvas plugin the WebGL surface, and @solidtv/nativescript the host between them and SolidTV. This is phase 4 of that repository's integration plan.nativescript/, its own pnpm root, holds only the host:app/app.ts(the boot file),webpack.config.js(bundles../srcas it is, with the hex-colour transform and thethemealias fromvite.config.js, and copiespublic/fontsandpublic/assetsinto the bundle),nativescript.config.ts,App_Resources, the simulator scripts, and a stand-in for a canvas plugin package that has no tvOS build. shaka-player and the Firebolt SDK are aliased to an empty module, since their pages are out of scope there but their chunks must bundle.src/index.tsx, unchanged. TheHashRouter, the focus manager ondocument,fetch, the relative asset URLs,import.meta.env.BASE_URLandloadFontsall work through the host's shims and platform.src/gains one rule, inLeftNavWrapper: Back from the open nav drawer on the start page is left unhandled. A platform that hands the system what the app leaves unhandled, Apple TV's Menu button, leaves the app there and nowhere else. A browser never notices: walking history back from the start page did nothing before. Checked in Chrome: Back opens the nav, Back again walks history back, and at the start page's nav it does nothing..gitignore: the tvOS project's workspace file and lockfile are tracked.The root
package.jsonand lockfile are untouched.Depends on
Three pull requests, to be released before this merges;
nativescript/package.jsonlinks the sibling checkouts until then, and the pins are the last commit here:Config.preventDefaultOnHandledKeys, and a seconduseFocusManagerargument that cannot listen is ignored again.App.tsxpasses the removed hold options there, which 1.6.3 takes for the event target and throws on.Results
On the Apple TV 4K simulator: Browse with TMDB data and posters, an entity page from its lazy chunk, KeepAlive back to Browse, the examples portal, the remote through the harness's XCUITest driver, Menu leaving from the start page only, and a suspend and resume with the render loop stopped within half a second.
On an Apple TV HD (A8, 1080p), cold, from the first line of the bundle: entry evaluated at 0.6 s, first frame at 1.3 s, first idle with 21 posters in at 2.4 s, 60 fps within a second of the first frame, 46 MB of textures against the 200 MB critical threshold.
nativescript/results/has the logs and two screenshots; the full record is phase4-results.md. The exit test by hand on the device is the remaining step.Out of scope on tvOS: the player, Firebolt, the renderer versions page, texture compression (ETC2 assets, PVRTC GPU), the mouse states, and the Destroy example's SVG.
Note
Unrelated to this change, and not touched here: against SolidTV 1.6 or later the production web build fails, because
src/pages/Tags.tsximportscreateTag, which SolidTV removed with the renderer 1.9 upgrade. The pins atmain(1.5.2) still build. It will surface when the rootpackage.jsonmoves to a current SolidTV.🤖 Generated with Claude Code