| Filename | Latest commit message | Latest commit date |
|---|---|---|
* iOS: Send feedback form that posts to Bellhop Adds a Send feedback form to the Hex app (never the keyboard) that sends one report to Bellhop, Anomaly's feedback inbox, following blhp.app/docs/feedback's "Building a feedback form" checklist: - Entry points: a Send feedback row on Home's Privacy policy / Support / Acknowledgements card, and one at the end of Settings › Experiments. Both are absent in a build without a report key. - The form: Problem / Idea / Question / Other, an optional subject, the message, pictures (Hex's own key window drawn just before the form opens, removable with one tap; more from the permission-free photo picker, up to 5), an optional email, Send anonymously (hides the email and drops email and install id), and what is sent in plain words. Limits are checked before sending (message 20,000, subject 200, 5 pictures, 10 MiB each, 20 MiB in all); every picture is re-encoded as JPEG at 80% with its longest side at most 2048 px (HEIC included). - Sending: multipart/form-data with a payload JSON part and screenshot parts, an Idempotency-Key made at the tap and reused for every retry, visible upload progress, network failures and 5xx retried 4 times with 1/2/4 s backoff, 409 request_pending and 429 retried after Retry-After, other 4xx never retried. 401 and 403 feedback_disabled are logged as a fault and shown as "unavailable"; 413, 415, 429 and offline get kind words. A thank-you says, when the answer has email "pending", that a reply comes by email and the address needs confirming once. - Payload: message, subject, category, app, device (model identifier, BCP 47 locale), metadata (screen, dictation_language, speech_model), email and a random install id kept in Hex's UserDefaults. No user, no logs, nothing Hex keeps on the phone. - Report key: BELLHOP_REPORT_KEY in HEXMobile/Feedback.xcconfig (empty in git), set by a gitignored Feedback.local.xcconfig or by ci_post_clone.sh from Xcode Cloud's BELLHOP_REPORT_KEY secret, read at run time from Info.plist's BellhopReportKey. No key lives in Swift. - Debug-only launch arguments (--feedback-log-request, --feedback-key, --feedback-endpoint, --feedback-drop-first-response, --feedback-broken-image) for simulator proof of each path. - Simplified Chinese for every new string; docs in ios/docs/settings-and-home.md. Verified on the Studio's iPhone 17 Pro simulator (iOS 27.2) through the form itself: a send with picture and email got 201 #3, email "pending"; an anonymous send got 201 #4, email "none", with no email or install_id in the payload; a dropped first answer was retried with the same key and got the same #5; a wrong key got one 401 and "unavailable"; a refused connection was tried 4 times (0, +1, +3, +7 s) with one key, then said offline; a half-cut picture got one 415. The keyboard appex has no Bellhop key or address. code-shape.py --check passes. No unit test: no existing HEXMobileTests file covers the app's networking. * Privacy: say what Send feedback sends, when and to whom The app's Privacy page and the website's privacy policy (site/src/iphone.ts) said Hex collects no data. With Send feedback that's no longer exact, so: - Settings › Privacy gets a Feedback note (only in builds with a report key): nothing is sent until Send; then the message, pictures kept, email if given and details about Hex and the iPhone go to Anomaly's feedback inbox; dictations, typing and what Hex learned never do. - The policy's summary, card line (CARD_VERSION 2) and description now say Hex sends only the feedback you choose to send; a new "Feedback you send" section lists every field, when (only on Send), to whom (Anomaly's feedback inbox, Bellhop), what anonymous drops, and what is never included; "no servers your words could be sent to" and the children line are reworded to stay true. The header comment that checks claims against ios/ names the new request. Verified: site bun test passes (20/20) and renderPrivacy renders the new section; the Privacy page's string has its Simplified Chinese. * iOS feedback: the email decides anonymous, no Send anonymously switch Ryan: one thing instead of two. The optional email now decides: - An email given: not anonymous; the email and the install id are sent, as before. - No email: "anonymous": true, no email and no install id (none is made for an anonymous send), no user, nothing identifying in metadata. - A typed email that isn't an address stops Send; once they leave the field the form says "That isn't an email address. Fix it, or clear it to send without one." It is never sent broken or as anonymous by accident. Removed: the Send anonymously switch and its strings. Added one line under the email field, "With an email, the team can reply. Without one, your feedback is anonymous.", and the what-is-sent paragraph follows the field (the install id is named only with an email). The website policy's feedback section now covers Hex on iPhone and on Android together, for the Android form being built alongside. Simplified Chinese for the new strings; docs updated. Verified on the Studio's iPhone 17 Pro simulator through the form: with ryan@anoma.ly and Hex's window picture, 201 #6, email "pending", payload with email and install_id; with no email, 201 #7, email "none", payload "anonymous": true and no email, install_id or user. No existing HEXMobileTests file covers the feedback payload, so no test case changed. * iOS feedback: ship the report key in Feedback.xcconfig The key only came from a gitignored local file or an Xcode Cloud secret that doesn't exist, so a TestFlight build would have had no Send feedback row. Bellhop report keys are publishable and safe to ship inside an app, and Android keeps its key in android/gradle.properties, so: - HEXMobile/Feedback.xcconfig now sets BELLHOP_REPORT_KEY. The optional include of Feedback.local.xcconfig stays after it, so a local file or ci_post_clone.sh (from an Xcode Cloud BELLHOP_REPORT_KEY secret, if one is ever set) overrides it, for a rotation. Still no key in Swift; it reaches the app as Info.plist's BellhopReportKey. - ci_post_clone.sh and the docs say so; rotation: new key, revoke the old in Bellhop › Settings › Report keys, change the xcconfig, ship a build. - FeedbackSender logs "feedback sent as #<number>" (notice, public), so a Release build's send can be traced to its issue. Verified from a clean tree of this commit (git archive, no local override) on the Studio: a Release simulator build's Info.plist carries the key, the app shows Send feedback on Home and a send through the form got 201. |
||
| .. | ||
| perf | ||
| public | ||
| scripts | ||
| src | ||
| .gitignore | ||
| bun.lock | ||
| cloudflare.config.ts | ||
| index.html | ||
| labs.test.ts | ||
| package.json | ||
| README.md | ||
| strobe.json | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| worker.test.ts | ||
| worker.ts | ||
Hex website
https://anoma.ly/hex is the one Hex site (dev: https://dev.anoma.ly/hex).
bun run dev starts Vite. bun run build [--mode dev] checks TypeScript and
builds Cloudflare Build Output with base /hex/; bun run check:downloads
checks that every download link serves a file. cloudflare.config.ts defines
both Workers. CI deploys them, never a laptop: Site builds without secrets and
.github/release/deploy-site.sh deploys the verified Build Output
(cf deploy --prebuilt --mode <mode>), refusing any Worker, route, or binding
other than this config's (docs/releasing.md). worker.ts serves the
site and, at /hex/files/, the release files: the installers and legacy
appcast built with the site, the dev notes from the Release workflow's
dev-notes branch, and the frozen 2.3.1 feeds and artifacts read from
hex-production-files. It 301s other hosts and plain HTTP to the canonical
host.
The download section (src/Download.tsx) is one install switcher and nothing
else: macOS, Windows, and Linux tabs of equal width with a sliding pill, each
with every way to install there in at most three rows (Mac: DMG, Homebrew;
Windows: installer, PowerShell script; Linux: script, package, binary), a small
switch inside a row where it has variants (x64/ARM64 for the Windows installer
and the Linux binary, which the Linux packages follow too; Debian, Fedora, Nix,
and AUR for the Linux package), and the download button or copyable command.
All three stacks share one grid cell, so switching tabs never moves the page.
An Intel Mac sees that Hex requires Apple silicon instead of a download. It
selects the visitor's OS and architecture on first paint and refines them with
UA client hints. Versions, URLs, and commands live in src/release.ts; file
links name /hex/download/<target>, which the Worker sends to the stable
release once there is one and to the newest dev build until then. The AUR
package appears from the first build after a stable release, which pushes
hex-bin. Add
?platform=mac|mac-intel|windows-x64|windows-arm64|linux|linux-arm64|mobile
to see each default. The hero's key and its "Hold …" line follow the selected
tab, so clicking Windows reads Alt and clicking Linux reads Alt+Space; until a
tab is clicked they follow the detected platform.
The hero is a show (src/shout/, plain JS): Kit's notifications pile up around a
floating head that answers them out loud, dictates prompts into an OpenCode window
that fixes the complaints, powers up, and finally sprays the inbox clean. WebGPU
renders it, with a Canvas 2D fallback (?canvas2d forces it).
- The prerendered page shows
public/shout-idle.webp, a still of the idle head, in.show__head. The engine chunk loads when the browser is idle or the visitor reaches for the key (phones wait for the tap), then draws the same head into that box (the canvas reads the box, 3.2 head radii wide, so nothing moves). The keycap names the selected OS's shortcut: ⌥ option on the Mac, alt on Windows, and alt + space on Linux. The key the show shatters keeps that legend too (start({ key })reachescards.makeKeycap, which draws the ⌥ glyph only for option). - Nothing audible or heavy loads before the key press: the voice bank and its
manifest are fetched on start, the opening clips first. The sound toggle in the
header remembers its choice in
localStorage. - It pauses when the tab is hidden or the hero is off screen, runs the idle head at
30 fps on a timer (no frame callback between its frames), caps the pixel ratio
(1.5 on phones), and thins the messages on small screens. The option key's glow
pulses at 30 fps from
src/glow.ts, set by the key until the engine runs and then by the engine in the head's frame: as a CSS animation it restyled the page on every vsync. Reduced motion keeps the still until the key is pressed, then runs only the calm stage with no shake or flashes. - Dax, Jay and Frank (teammates) appear with their real X avatars; everyone else is
invented with a generated portrait (
src/shout/assets/people.webp). Brand glyphs are Simple Icons (CC0) and Lucide (ISC); OpenCode's mark is from opencode.ai.
VITE_SHOUT_CAPTURE=1 builds a capture variant with a deterministic frame stepper
(?capture, window.__shout) and an audio play log; production builds strip it.
Regenerate the idle still after changing the head:
VITE_SHOUT_CAPTURE=1 bunx vite --port 5531
HEX_SITE_URL=http://127.0.0.1:5531 bun run generate:poster
Performance
perf/hex.bench.ts is a strobe bench: load to
the live head, the idle head for 8 s, and the first 20 s of the show after a click
on the key. strobe.json builds the site and serves the Build Output under /hex/
with perf/serve.ts. strobe builds and serves both variants with this checkout's
strobe.json and perf/, so any commit works as the base. From the repository root:
strobe bench site/perf/hex.bench.ts --base origin/dev --head .
strobe bench site/perf/hex.bench.ts --head . --check # each case once, pass or fail
strobe report experiment <exp_…> --format pr --update-pr <n> # the results block in PR n
In a PR, write your own text (what strobe showed, what changed) and let
--update-pr place strobe's generated results block: it replaces only its own
block after a rerun. Don't edit inside it. The bench's expect refuses a block
whose page isn't the landing page (WrongScreen).
The show draws at its own frame rate, not the display's: canvas.frames and
canvas.interval.p95 count the show's WebGPU frames, where presented frames count
the display's refreshes. gpu.compile is the GPU process's shader and pipeline work
during a load.
Social image
The Open Graph and Twitter image is public/og.png (1200 × 630): the app icon,
the name, and one line. scripts/og/hex-icon.png is the 1024 px icon exported
from the built app (iconutil -c iconset Hex.app/Contents/Resources/AppIcon.icns).
Regenerate with bun run generate:og, bump the ?v= on both image tags in
index.html, rebuild, deploy, and fetch the published PNG.
The Labs pages (/hex/labs, /hex/labs/<id>) each have their own card,
drawn at build by scripts/labs.ts with satori and resvg (no browser): the
icon, "Hex Labs", the lab's title and line, and its OSes. Their ?v= is a
hash of what the card shows. src/labs.json comes from the app's Labs
registry; never edit it by hand (HEX_UPDATE_LABS_JSON=1 scripts/check labs::web from the repository root rewrites it).
Messages also plays public/og.mp4 (og:video) inline on a loop in place of the
image; other apps keep the PNG. It's a 4.5 s, 1200 × 630, 60 fps silent H.264
loop: the icon speaks and the words pile up under it
(scripts/og-video/hex-pour.js, matter.js physics, deterministic per frame so
the last frame meets the first). bun run generate:og-video [hex-line|hex-key]
renders it through Chromium and ffmpeg; bump the ?v= on both og:video tags
after changing it. The Worker answers Range requests for .mp4, which Safari
and AVFoundation need.