Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1e125e1
Inbox mobile: attachments and annotation in the iPhone app (M2)
backnotprop Oct 8, 2026
b0f8419
iPhone app M2: the review's fixes (pin in sight, assets named with sp…
backnotprop Oct 8, 2026
4823f4c
iPhone app: the stored sources and computers read entry by entry, so …
backnotprop Oct 8, 2026
b61dbe2
iPhone app M2: an agent's page and what it embeds stay offline (the s…
backnotprop Oct 8, 2026
266e3b0
iPhone proof M2: commented text clear of the toolstrip on a slow runn…
backnotprop Oct 8, 2026
2eb4480
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
fdf0e27
iPhone app M2: WebSockets blocked with the rest of the network, and n…
backnotprop Oct 8, 2026
a719b36
iPhone app M2: ws and wss as a rule of their own (a content rule's ur…
backnotprop Oct 8, 2026
699078f
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
5c29e02
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
7c99ce9
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
d1c4bab
iPhone app M2: the surface loads as a thread's files show, a failed l…
backnotprop Oct 8, 2026
8fab59a
Ignore DerivedData folders kept inside a worktree
backnotprop Oct 8, 2026
dc03ea9
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
c0c4c60
iPhone proof M2: each class ends on a cold install (reinstalled, the …
backnotprop Oct 8, 2026
75e3dd3
iPhone app M2: a surface that loads and stays silent is loaded again;…
backnotprop Oct 8, 2026
2009d63
Merge remote-tracking branch 'origin/main' into feat/mobile-m2-attach…
backnotprop Oct 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ name: iPhone app
# plannotator binary is built first, then apps/ios/scripts/proof.ts starts it
# under a temp data dir, connects agents through `plannotator inbox mcp`, makes
# one simulator and runs `xcodebuild test` (the PlannotatorKit tests and the
# XCUITest flow: pair, list, picks, Send, Resolve, Delete, Remove) against that
# Inbox. M5: the relay runs under `wrangler dev` beside it with Apple played
# XCUITest flows: pair, list, picks, Send, Resolve, Delete, Remove; the
# attachments, annotated by touch and sent) against that Inbox. M5: the relay runs under `wrangler dev` beside it with Apple played
# locally, and the notification flow delivers the relay's exact push bodies
# with `xcrun simctl push`. One macOS runner, one simulator destination, no matrix. Runs only
# when the app, or the Inbox files its device door and pairing live in, could
# have changed. No signing, provisioning or TestFlight material is used.
# when the app, the Inbox files its device door and pairing live in, or the
# surface the app bundles could have changed. No signing, provisioning or TestFlight material is used.

on:
pull_request:
Expand All @@ -24,6 +24,9 @@ on:
- 'apps/hook/server/index.ts'
- 'apps/hook/server/inbox*'
- 'scripts/inbox-sim.ts'
- 'packages/inbox/surface/**'
- 'packages/inbox/attachments.ts'
- 'apps/inbox/surface*'
- 'apps/hook/hooks/mod/inbox*'
- 'apps/hook/hooks/mod/testing/**'
- 'apps/relay/**'
Expand All @@ -42,6 +45,9 @@ on:
- 'apps/hook/server/index.ts'
- 'apps/hook/server/inbox*'
- 'scripts/inbox-sim.ts'
- 'packages/inbox/surface/**'
- 'packages/inbox/attachments.ts'
- 'apps/inbox/surface*'
- 'apps/hook/hooks/mod/inbox*'
- 'apps/hook/hooks/mod/testing/**'
- 'apps/relay/**'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ packages/ui/components/html-viewer/bridge-script.lite.ts
/adr/research/SPIKE-bundle-optimization-theories-20260619-154926.md
/adr/research/SPIKE-local-app-annotation-20260810.md
/scripts/convert-themes.ts

# Xcode DerivedData a lane keeps inside its worktree (xcodebuild -derivedDataPath)
/derived*/
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ plannotator/
│ │ ├── stores/ # Storage backends (fs, kv, s3)
│ │ └── targets/ # Deployment entries (bun.ts, cloudflare.ts)
│ ├── inbox/ # The Plannotator Inbox window's Vite single-file build (packages/inbox); build:hook copies it to apps/hook/dist/inbox.html, and the phone's surface (build:surface) to apps/hook/dist/surface.html
│ ├── ios/ # The Plannotator iPhone app (SwiftUI, bundle id ai.plannotator.app, iOS 26): project.yml for XcodeGen and the generated Plannotator.xcodeproj (both committed), Plannotator/ (the app), PlannotatorKit/ (local Swift package: the device-door client, models, event stream, pairing link, Keychain, markdown splitter, the relay keys and push summary, and the Workspaces source: WorkspacesClient, WorkspacesSource, both behind SourceClient), PlannotatorNotifications/ (the notification service extension: opens a relay push with the device key and writes the lock screen's words and choices), PlannotatorUITests/ (the XCUITest proofs), scripts/proof.ts (runs the Inbox proof against a compiled Inbox), scripts/workspaces-proof.ts (the Workspaces proof against staging with a test account, local only) and scripts/gen-colors.ts (Colors.xcassets from packages/ui/themes/plannotator.css, `--check` for drift), Plannotator/PrivacyInfo.xcprivacy (the privacy manifest), APP-REVIEW.md (the App Review notes and privacy and export answers) and RELEASE.md (the release runbook the owner runs himself). Private; its own version line is MARKETING_VERSION in project.yml, outside the release-bumped files. See apps/ios/README.md
│ ├── ios/ # The Plannotator iPhone app (SwiftUI, bundle id ai.plannotator.app, iOS 26): project.yml for XcodeGen and the generated Plannotator.xcodeproj (both committed), Plannotator/ (the app; Attachments/ holds the surface host and the attachment screens), PlannotatorKit/ (local Swift package: the device-door client, models, event stream, pairing link, Keychain, markdown splitter, the relay keys and push summary, and the Workspaces source: WorkspacesClient, WorkspacesSource, both behind SourceClient), PlannotatorNotifications/ (the notification service extension: opens a relay push with the device key and writes the lock screen's words and choices), PlannotatorUITests/ (the XCUITest proofs), scripts/proof.ts (runs the Inbox proof against a compiled Inbox; scripts/fixtures holds the files the attachments proof's agent sends), scripts/workspaces-proof.ts (the Workspaces proof against staging with a test account, local only) and scripts/gen-colors.ts (Colors.xcassets from packages/ui/themes/plannotator.css, `--check` for drift), Plannotator/PrivacyInfo.xcprivacy (the privacy manifest), APP-REVIEW.md (the App Review notes and privacy and export answers) and RELEASE.md (the release runbook the owner runs himself). Private; its own version line is MARKETING_VERSION in project.yml, outside the release-bumped files. See apps/ios/README.md
│ ├── review/ # Standalone review server (for development)
│ │ ├── index.html
│ │ ├── index.tsx
Expand Down Expand Up @@ -2044,7 +2044,7 @@ Sorting and the rest:

**Server routes** are listed under "Inbox Server" in "Server API".

**On a phone**: `adr/implementation/inbox-mobile.md` is the wire contract the iPhone app and its server steps build against: the pairing offer, the device token door `/api/inbox/device/*`, the LAN listener, the relay, the surface bridge and the idempotency rule. Built (P1, P2, R1, R2): pairing, the door, the tailnet path, the LAN listener, and the relay's mailboxes, push and carriage; the iPhone app `apps/ios` (M1: pairing by QR or typed address and six digits, the list, threads, picks, Send, Resolve, Delete, Settings with the tailnet row; M3: the decision switch opening the decision card as a sheet, the Decisions tab per project, and New message from the reply bar to a live session, a menu when several are live, the desktop's "not running" words when none is; its proof is `bun apps/ios/scripts/proof.ts --binary <compiled plannotator>`, run by `.github/workflows/ios.yml`, whose New message steps drive live Claude Code sessions made of the mod's own code (`apps/hook/hooks/mod/testing/claude-session.ts`) and which also runs the relay under `wrangler dev`; M5: push registration from Settings' Allow notifications, the notification service extension, the lock-screen answer as one Send with the pick inside it, through the relay's command path when the computer cannot be reached; M7: Workspaces as a second source behind the `WORKSPACES_HOST` build setting (Debug and TestFlight on, Release off), see `apps/ios/README.md`). The Inbox writes no event when a thread is deleted: a phone learns it at its next read of that thread. Not built: the app's Wi-Fi path (pinned TLS and Bonjour), the relay as the app's reading transport (M6).
**On a phone**: `adr/implementation/inbox-mobile.md` is the wire contract the iPhone app and its server steps build against: the pairing offer, the device token door `/api/inbox/device/*`, the LAN listener, the relay, the surface bridge and the idempotency rule. Built (P1, P2, R1, R2): pairing, the door, the tailnet path, the LAN listener, and the relay's mailboxes, push and carriage; the iPhone app `apps/ios` (M1: pairing by QR or typed address and six digits, the list, threads, picks, Send, Resolve, Delete, Settings with the tailnet row; M2: attachments full screen in the bundled surface with comments by touch, the "N annotations" sheet, the changed line, Share, and annotations riding the next Send; M3: the decision switch opening the decision card as a sheet, the Decisions tab per project, and New message from the reply bar to a live session, a menu when several are live, the desktop's "not running" words when none is; its proof is `bun apps/ios/scripts/proof.ts --binary <compiled plannotator>`, run by `.github/workflows/ios.yml`, whose New message steps drive live Claude Code sessions made of the mod's own code (`apps/hook/hooks/mod/testing/claude-session.ts`) and which also runs the relay under `wrangler dev`; M5: push registration from Settings' Allow notifications, the notification service extension, the lock-screen answer as one Send with the pick inside it, through the relay's command path when the computer cannot be reached; M7: Workspaces as a second source behind the `WORKSPACES_HOST` build setting (Debug and TestFlight on, Release off), see `apps/ios/README.md`). The Inbox writes no event when a thread is deleted: a phone learns it at its next read of that thread. Not built: the app's Wi-Fi path (pinned TLS and Bonjour), the relay as the app's reading transport (M6).

**Phones** (`packages/server/inbox-devices.ts`, records in `packages/shared/inbox/devices.ts`; contract sections 1, 2 and 6).
- Pairing: Settings' "Pair a phone" calls `POST /api/inbox/pairing`, which opens one offer: a `plannotator://pair` link (drawn as a QR code with `uqr`, `packages/inbox/qr.ts`) carrying the computer's name, the tailnet address when it is on, the LAN address and the certificate's SHA-256 (`lan`, `fp`) when the Wi-Fi is on, a 32-byte secret and six digits. One offer is open at a time, in memory only. It closes when redeemed, when the window makes another, 10 minutes after it was made, or after 5 wrong codes: the two limits pairing needs, and the only ones. The phone redeems the secret or the digits at `POST /api/inbox/device/pair` for its own `tok_` bearer token, returned once.
Expand All @@ -2066,6 +2066,8 @@ Sorting and the rest:
- No network: CSP `default-src 'none'`, `connect-src 'none'`; an HTML page's folder loads from the shell's `plannotator-asset:` scheme. The system face on Plannotator's tokens; settings live in memory; diffs unified and wrapped.
- The bridge: `packages/core/inbox-surface-bridge.ts` (re-exported by `inbox-types`), the surface's end in `packages/inbox/surface/bridge.ts`. The composer is the shell's: the viewers report drafts through ui's `onHostDraft` seams, and `commit_annotation` draws the saved one.
- Proof: `tests/e2e/surface.spec.ts`, Playwright WebKit against the built file and a compiled Inbox (in `inbox-e2e.yml`).
- In the iPhone app (M2, `apps/ios/Plannotator/Attachments/SurfaceHost.swift`): one warm `WKWebView` loads the bundled file from `plannotator-surface://app/surface.html` (an Xcode build phase runs `build:surface` when its sources are newer and copies the file in); `plannotator-asset://inbox/api/html-assets/<token>/…` serves only the open page's own folder through the door, each answer under the surface's own CSP, and a content rule list blocks every http, https, ws and wss load in that web view (without it the surface is not loaded and files do not open). Bridge messages count only from the main frame (`frameInfo.isMainFrame`), and a `pin`, `selection` or `draft` for an HTML page only within about a second of the person's own touch on the web view. Links open only as `https` (Safari View Controller) or `mailto` (the mail sheet): a link in the surface's own markdown (a real tap), or a new window an agent's page opens within the touch window; every other navigation away from the surface is cancelled, and no URL from content reaches the app's own URL handler. An HTML page ends above the switch and any open comment panel, and the pin being written about is scrolled back into sight (ui's `ViewerHandle.revealPin`).
- Added for the phone (M2): `comment_selection` (Comment in the system edit menu; on a touch screen a markdown selection stays the system's until then, ui's `ViewerHandle.takeSelection`), `export_feedback` and `feedback` (Send's feedback text, built by `attachmentFeedback` as the window builds it), and ui's `HtmlViewer` `hostNavigates` (a tapped link in an agent's page opens as a new window the shell decides, never a frame message).

**Security**, on every request:
- The Host allowlist (`createRequestHostGuard({ localOnly: true })`).
Expand Down
Loading
Loading