Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

Rename the iOS host to bento/tray

nyblnet9890e0afde7e
diff --git a/.gitignore b/.gitignore
index 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.html
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md
index 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 is
one 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.swift
similarity index 100%
rename from ios/BentoHost/AppDelegate.swift
rename to tray/BentoTray/AppDelegate.swift
diff --git a/ios/BentoHost/BentoDocument.swift b/tray/BentoTray/BentoDocument.swift
similarity index 100%
rename from ios/BentoHost/BentoDocument.swift
rename to tray/BentoTray/BentoDocument.swift
diff --git a/ios/BentoHost/DocumentBrowserViewController.swift b/tray/BentoTray/DocumentBrowserViewController.swift
similarity index 100%
rename from ios/BentoHost/DocumentBrowserViewController.swift
rename to tray/BentoTray/DocumentBrowserViewController.swift
diff --git a/ios/BentoHost/EditorViewController.swift b/tray/BentoTray/EditorViewController.swift
similarity index 97%
rename from ios/BentoHost/EditorViewController.swift
rename to tray/BentoTray/EditorViewController.swift
index 5ea20190..cd3d1d58 100644
--- a/ios/BentoHost/EditorViewController.swift
+++ b/tray/BentoTray/EditorViewController.swift
@@ -64,7 +64,7 @@ final class EditorViewController: UIViewController, WKScriptMessageHandler, WKUR
override 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, WKUR
webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
webView.allowsBackForwardNavigationGestures = false
view.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 deck
diff --git a/ios/BentoHost/Info.plist b/tray/BentoTray/Info.plist
similarity index 96%
rename from ios/BentoHost/Info.plist
rename to tray/BentoTray/Info.plist
index 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 app
has 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.js
similarity index 100%
rename from ios/BentoHost/Resources/bridge.js
rename to tray/BentoTray/Resources/bridge.js
diff --git a/ios/BentoHost/SceneDelegate.swift b/tray/BentoTray/SceneDelegate.swift
similarity index 100%
rename from ios/BentoHost/SceneDelegate.swift
rename to tray/BentoTray/SceneDelegate.swift
diff --git a/ios/README.md b/tray/README.md
similarity index 96%
rename from ios/README.md
rename to tray/README.md
index a3c6ee8b..1f42143b 100644
--- a/ios/README.md
+++ b/tray/README.md
@@ -1,4 +1,4 @@
-# bento/host — iOS
+# bento/tray — iOS
A 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 the
autosave 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:
```sh
brew 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 a
merge-conflict magnet.
## State: scaffold, not shippable
diff --git a/ios/project.yml b/tray/project.yml
similarity index 80%
rename from ios/project.yml
rename to tray/project.yml
index 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: BentoTray
options:
bundleIdPrefix: page.bento
deploymentTarget:
iOS: "16.0" # WKURLSchemeHandler + modern UIDocumentBrowser behaviour
targets:
- BentoHost:
+ BentoTray:
type: application
platform: iOS
sources:
- - path: BentoHost
+ - path: BentoTray
preBuildScripts:
# 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 shell
script: |
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" ]; then
mkdir -p "$(dirname "$DST")" && cp "$SRC" "$DST"
elif [ ! -f "$DST" ]; then
@@ -28,7 +28,7 @@ targets:
fi
settings:
base:
- INFOPLIST_FILE: BentoHost/Info.plist
- PRODUCT_BUNDLE_IDENTIFIER: page.bento.host
+ INFOPLIST_FILE: BentoTray/Info.plist
+ PRODUCT_BUNDLE_IDENTIFIER: page.bento.tray
TARGETED_DEVICE_FAMILY: "1,2" # iPhone and iPad
SWIFT_VERSION: "5.0"