next/ and ios/: the next grain.social and the iOS app, drawn by HUD
MergedThis pull adds next/ (a Vite and Svelte shell over HUD's renderer), ios/, and a vendored copy of HUD at a named commit. It also adds vendor/hud.sh and a next check.
I read the files the pull's body points to: next/vite.config.ts, vendor/hud.sh and .knotless/workflows/next.yml. I did not read the rest of the diff: vendor/hud is HUD's code copied as it is, and I did not open ios/ or the other next/ files.
vite.config.ts: The aliases andresolve.dedupedo what the comments say.dedupemakes the vendored renderer'ssvelte,leafletandprotomaps-leafletimports resolve fromnext/node_modules.server.fs.allowcovers the repository root, so the dev server can servevendor/.hud.sh:set -euo pipefailis on and the commit is resolved to a full sha before anything is deleted. The old copy is removed only after the clone succeeds, andREADME.mdis kept. The script wipes everything else invendor/hud, so a file HUD removed goes too.next.yml: The path filter coversnext/**,vendor/**and the workflow file itself. The cache and the npm-ci step are keyed tonext/.
The next check is untested in CI, as the body says, and the iOS build runs only on a Mac. Both are stated openly, so I'm not asking for changes.
Since my approval at 80889bf, the only change is in the root vite.config.ts. fmt now also ignores ios/**/*.xcassets/**, so the formatter leaves Xcode's asset-catalog JSON alone. The change is small, matches the body's description, and doesn't affect what I approved earlier.
Since my approval at c79d9c4, the pull adds .knotless/workflows/next-deploy.yml, deploy/next-deploy.sh and a paragraph in AGENTS.md.
- Deploy workflow: It runs only on pushes to
feature/hud, onci.knotless.devalone, and the key is sealed to that runner and ref. A pull's run never gets the secret. The path filter and thesuperseded: finishsetting match what the comments say. next-deploy.sh: It hasset -euand refuses to run withoutnext/dist/index.html. The key goes to amktempfile with mode 600, removed by a trap. The script streams the tarball over ssh to the forced commandgrain-next-deploy <sha>.- Host key:
StrictHostKeyChecking=accept-newtrusts the box's host key on first connect. On a fresh runner that is trust-on-first-use. The host is a fixed IP and the key's forced command limits what it can do, so I don't think this needs to change. Pinning the host key later would be tighter.
It is untested until the first push, as the body says. I'm not asking for changes.
On the host key: left as accept-new for now, as the forced command bounds what the key can do. Pinning the box's key in next-deploy.yml (a known_hosts line, as the ssh-key step takes) is the tighter follow-on, best done once hetzner-infra's grain-next has settled.
- next/ and ios/: the next grain.social and the iOS app, drawn by HUD
- main
What changes
The next grain.social and the iOS app move in.
next/is the web shell that has lived in HUD'sapp/: a Vite and Svelte page with no server of its own, drawingnext/grain.social.json's tabs, each a nav stack of tool calls to a HUD server over/mcp,/oauth,/xrpc,/bloband/icon.ios/is HUD'sapp/ios, the same app drawn by HUDKit, made the next version of grain-ios: bundle id${BUNDLE_ID}(grain-ios'ssocial.grain.grainby default, as its justfile and ci_scripts set it), team${APPLE_TEAM_ID}, marketing version 10 (grain-ios is at 9), build 60, and an Xcode Cloudci_scripts/ci_post_clone.shthat generates the project. Its default server ishttps://next.grain.social.HUD is vendored.
vendor/hudis a copy of what both build from out of HUD's repository atb64cb1e7fc(vendor/hud/COMMIT):web/renderer/srcand itspackage.json,web/shared, andios/HUDKit.just vendor-hud <commit>(vendor/hud.sh) replaces it fromknotless://chadtmiller.com/hud. HUD's server is not here.vendor/svelte.config.jsandvendor/tsconfig.jsonhave the renderer compiled asnext/compiles it, rather than under grain's SvelteKit config at the root.The renderer's packages resolve from
next/node_modules. leaflet and protomaps-leaflet (and@types/leaflet) are innext/package.json, andresolve.dedupesends the renderer's imports of them and of svelte there, sonpm ciinnext/is the one install.Recipes and the check.
just next <HUD url>,just next-build,just ios,just vendor-hud <commit>. Thenextcheck (.knotless/workflows/next.yml) runs svelte-check and vite build on pulls into main andfeature/*touchingnext/,vendor/or itself. AGENTS.md says what each part is and how to move the copy. The root's vp lint and fmt leavenext/andvendor/alone, and fmt leavesios/'s asset catalogs to Xcode, and.dockerignorekeeps them out of grain-serve's image.next.grain.social deploys from feature/hud.
.knotless/workflows/next-deploy.ymlruns on ci.knotless.dev alone, on pushes tofeature/hudtouchingnext/,vendor/hud, or itself: it buildsnext/anddeploy/next-deploy.shsendsnext/distto grain's box, wheregrain-next-deploy(hetzner-infra's services/grain-next) swaps it in. Its key,GRAIN_NEXT_DEPLOY_KEY, is sealed to that runner and ref, and the box takes it only for that forced command. The HUD server behind it,hud-next, is deployed from hetzner-infra. Pulls never run it.Why
The HUD-drawn Grain becomes the next grain.social and the next grain-ios, so it lives in grain. HUD's repository is private and the runners give a step no way to read it (the runner's checkout does not fetch submodules, and a pull's run gets no credentials), so a submodule could not be built by the check; a copy at a named commit can, and moving it is one recipe.
How it was checked
On this Mac:
cd next && npm ci && npm run check && npm run build(svelte-check: 395 files, 0 errors, 0 warnings; vite build passes), from a freshnode_modulesand with no install at the root.just iosthenxcodebuild -scheme Grainfor the iOS simulator: BUILD SUCCEEDED, the appsocial.grain.grain10 (60) withgrain.social.jsonbundled; not installed on the simulator.vendor/hud.sh b64cb1e7fcwrote the copy. Thenextcheck passes on the runner, as do the rest.Shortcomings
ios/: the runners are Linux. Build it on a Mac before a pull that touches it.BUNDLE_ID=social.grain.next just iosinstalls beside it. Xcode Cloud has not been pointed atios/.next.grain.socialis not up yet, so the app's default server answers nothing until it is.Review
Start at
next/vite.config.tsandvendor/hud.sh; everything undervendor/hudis HUD's, copied as it is.