Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
Rename the iOS host to bento/tray
nyblnet9890e0afde7e
diff --git a/.gitignore b/.gitignoreindex 9e3857f6..0a37b702 100644--- a/.gitignore+++ b/.gitignore@@ -27,6 +27,6 @@ working/# make-og.mjs intermediate (the SVG rasterised into site-src/og.png)scripts/.cache/-# generated Xcode project — regenerate with `cd ios && xcodegen`-ios/*.xcodeproj/-ios/BentoHost/Resources/starter.bento.html+# generated Xcode project — regenerate with `cd tray && xcodegen`+tray/*.xcodeproj/+tray/BentoTray/Resources/starter.bento.htmldiff --git a/docs/DECISIONS.md b/docs/DECISIONS.mdindex ea17917c..a2e1341b 100644--- a/docs/DECISIONS.md+++ b/docs/DECISIONS.md@@ -232,3 +232,40 @@ something is actually failing.Human review is a practice, not a GitHub setting, for as long as the team isone person. Restore a real approval count the moment a second reviewer exists;the future-action exclusion list in the amended entry still applies.++## 2026-07-26 — bento/tray: the iOS host is a suite member, and it is generic++The native iOS app is named **bento/tray** — "Bento Tray" on the App Store,+bundle id `page.bento.tray`, source in `tray/` beside `slides/` and `spaces/`.++**It runs ANY self-contained HTML document, not only Bento's.** That is not+scope creep bolted on; the Swift never parses the document and never did — it+is a courier that serves bytes into a WKWebView and polyfills the one File+System Access call the page needs to save itself. Bento decks are simply the+first documents it carries. Any single-file HTML app that saves itself works+identically, which on iOS is otherwise impossible: every browser there is+WebKit and none ship that API.++Naming notes, so this is not relitigated:++- **`bento/host` was rejected.** It names the mechanism, not the thing, and the+ suite convention is `bento/<what you get>`. "tray" keeps the food metaphor and+ says what it does — a tray carries any bento, whoever made it.+- **Plain "Bento" is unavailable** on the App Store: an unrelated Food & Drink+ app holds the exact name, and App Store names are globally unique. "Bento+ Tray" and "BentoTray" were both free at time of checking. That check reads+ published listings only — reservations in App Store Connect are invisible to+ it, so confirm there before submitting.+- The App Store name carries no slash. Per the 2026-07-24 naming entry, `/` is+ a mark, never a stored name.++**One app, not two.** A separate "generic HTML runner" listing would risk+guideline 4.3 (duplicate apps from one developer) and doubles the listing+overhead — screenshots, privacy labels, review cycles — for no gain. The+Developer Program is $99/yr per ACCOUNT, so a second app costs nothing in fees;+the cost is entirely in maintenance.++Consequence already implemented: each document gets its OWN origin+(`bento-tray://<sha256 of path>`), because a shared origin would let one+document read another's localStorage and IndexedDB — tolerable when every file+is yours, a real leak between unrelated third-party apps.diff --git a/ios/BentoHost/AppDelegate.swift b/tray/BentoTray/AppDelegate.swiftsimilarity index 100%rename from ios/BentoHost/AppDelegate.swiftrename to tray/BentoTray/AppDelegate.swiftdiff --git a/ios/BentoHost/BentoDocument.swift b/tray/BentoTray/BentoDocument.swiftsimilarity index 100%rename from ios/BentoHost/BentoDocument.swiftrename to tray/BentoTray/BentoDocument.swiftdiff --git a/ios/BentoHost/DocumentBrowserViewController.swift b/tray/BentoTray/DocumentBrowserViewController.swiftsimilarity index 100%rename from ios/BentoHost/DocumentBrowserViewController.swiftrename to tray/BentoTray/DocumentBrowserViewController.swiftdiff --git a/ios/BentoHost/EditorViewController.swift b/tray/BentoTray/EditorViewController.swiftsimilarity index 97%rename from ios/BentoHost/EditorViewController.swiftrename to tray/BentoTray/EditorViewController.swiftindex 5ea20190..cd3d1d58 100644--- a/ios/BentoHost/EditorViewController.swift+++ b/tray/BentoTray/EditorViewController.swift@@ -64,7 +64,7 @@ final class EditorViewController: UIViewController, WKScriptMessageHandler, WKURoverride func viewDidLoad() {super.viewDidLoad()let cfg = WKWebViewConfiguration()- cfg.setURLSchemeHandler(self, forURLScheme: "bento-app")+ cfg.setURLSchemeHandler(self, forURLScheme: "bento-tray")cfg.userContentController.add(self, name: "bentoFile")// .atDocumentStart is required, not stylistic: Bento decides whether it@@ -80,7 +80,7 @@ final class EditorViewController: UIViewController, WKScriptMessageHandler, WKURwebView.autoresizingMask = [.flexibleWidth, .flexibleHeight]webView.allowsBackForwardNavigationGestures = falseview.addSubview(webView)- webView.load(URLRequest(url: URL(string: "bento-app://\(originHost)/index.html")!))+ webView.load(URLRequest(url: URL(string: "bento-tray://\(originHost)/index.html")!))}// MARK: - serving the deckdiff --git a/ios/BentoHost/Info.plist b/tray/BentoTray/Info.plistsimilarity index 96%rename from ios/BentoHost/Info.plistrename to tray/BentoTray/Info.plistindex 1cf75946..67f21e00 100644--- a/ios/BentoHost/Info.plist+++ b/tray/BentoTray/Info.plist@@ -2,7 +2,7 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>- <key>CFBundleDisplayName</key><string>Bento</string>+ <key>CFBundleDisplayName</key><string>Bento Tray</string><!-- Must be present and must reference the build setting: without it the apphas no bundle id and `simctl install` refuses it ("Missing bundle ID"). --><key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>diff --git a/ios/BentoHost/Resources/bridge.js b/tray/BentoTray/Resources/bridge.jssimilarity index 100%rename from ios/BentoHost/Resources/bridge.jsrename to tray/BentoTray/Resources/bridge.jsdiff --git a/ios/BentoHost/SceneDelegate.swift b/tray/BentoTray/SceneDelegate.swiftsimilarity index 100%rename from ios/BentoHost/SceneDelegate.swiftrename to tray/BentoTray/SceneDelegate.swiftdiff --git a/ios/README.md b/tray/README.mdsimilarity index 96%rename from ios/README.mdrename to tray/README.mdindex a3c6ee8b..1f42143b 100644--- a/ios/README.md+++ b/tray/README.md@@ -1,4 +1,4 @@-# bento/host — iOS+# bento/tray — iOSA thin native host that runs **any self-contained HTML document** and lets it**save itself in place** on iOS.@@ -70,7 +70,7 @@ of this bridge did exactly that and prompted on every single save.## Two implementation details that carry weight-- **The document is served through a custom scheme** (`bento-app://`), never+- **The document is served through a custom scheme** (`bento-tray://`), never`loadFileURL`. A `file://` page in WKWebView gets an opaque, unstable origin,which makes `localStorage` and IndexedDB unreliable — silently breaking theautosave backstop, the per-device collab member key, and language/motion@@ -92,10 +92,10 @@ Needs **full Xcode** (Command Line Tools alone is not enough) and XcodeGen:```shbrew install xcodegen-cd ios && xcodegen && open BentoHost.xcodeproj+cd tray && xcodegen && open BentoTray.xcodeproj```-`BentoHost.xcodeproj` is generated, never committed — a `.pbxproj` in git is a+`BentoTray.xcodeproj` is generated, never committed — a `.pbxproj` in git is amerge-conflict magnet.## State: scaffold, not shippablediff --git a/ios/project.yml b/tray/project.ymlsimilarity index 80%rename from ios/project.ymlrename to tray/project.ymlindex f46dd59b..115dc2bc 100644--- a/ios/project.yml+++ b/tray/project.yml@@ -1,17 +1,17 @@# XcodeGen spec — `brew install xcodegen && cd ios && xcodegen` produces-# BentoHost.xcodeproj. The project file is generated, never committed, so it+# BentoTray.xcodeproj. The project file is generated, never committed, so it# can't rot into a merge-conflict magnet the way .pbxproj does.-name: BentoHost+name: BentoTrayoptions:bundleIdPrefix: page.bentodeploymentTarget:iOS: "16.0" # WKURLSchemeHandler + modern UIDocumentBrowser behaviourtargets:- BentoHost:+ BentoTray:type: applicationplatform: iOSsources:- - path: BentoHost+ - path: BentoTraypreBuildScripts:# The seed shell for "new document". Copied from the current build rather# than committed: a 587KB binary in git would churn on every release, and@@ -20,7 +20,7 @@ targets:- name: Stage starter shellscript: |SRC="$SRCROOT/../slides/dist-single/Bento_Slides.bento.html"- DST="$SRCROOT/BentoHost/Resources/starter.bento.html"+ DST="$SRCROOT/BentoTray/Resources/starter.bento.html"if [ -f "$SRC" ]; thenmkdir -p "$(dirname "$DST")" && cp "$SRC" "$DST"elif [ ! -f "$DST" ]; then@@ -28,7 +28,7 @@ targets:fisettings:base:- INFOPLIST_FILE: BentoHost/Info.plist- PRODUCT_BUNDLE_IDENTIFIER: page.bento.host+ INFOPLIST_FILE: BentoTray/Info.plist+ PRODUCT_BUNDLE_IDENTIFIER: page.bento.trayTARGETED_DEVICE_FAMILY: "1,2" # iPhone and iPadSWIFT_VERSION: "5.0"