From 2728fd6747403af61df294a9fb0c301282eef2fd Mon Sep 17 00:00:00 2001 From: NiveditJain Date: Wed, 9 Sep 2026 12:52:25 +0530 Subject: [PATCH 1/4] docs: add the Reo.dev beacon to the documentation site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mintlify includes any `.js` in the content directory on every page, once per full page load — there is no head-injection key in `docs.json` — so a root file is the entire install, and it is the form Reo's own Mintlify guide prescribes. The loader is kept byte-for-byte as Reo issues it so it stays diffable against the vendor snippet. Verified end-to-end against `mintlify dev` in the `Dockerfile.docs` container: the snippet is inlined on `/`, `/reference/overview`, `/zh/start/quickstart` and `/ja`, so it covers the generated locales too. `__tests__/docs/reo.test.ts` drives the script in a DOM and asserts the client ID in the CDN URL is the same one handed to `Reo.init`. Analytics is the archetype of code that fails silently: a mismatched pair still loads a working script, it just reports to nobody, and the only symptom is a dashboard that stays empty for weeks. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01UubDs9Br3Leg6GCtkdQ3Kg --- CHANGELOG.md | 1 + __tests__/docs/reo.test.ts | 132 +++++++++++++++++++++++++++++++++++++ docs/reo.js | 28 ++++++++ 3 files changed, 161 insertions(+) create mode 100644 __tests__/docs/reo.test.ts create mode 100644 docs/reo.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b4f6dd..11063bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Docs +- The Reo.dev beacon runs on the documentation site, as `docs/reo.js`. Mintlify includes any `.js` in the content directory on every page — there is no head-injection key in `docs.json` — so a root file is the whole install, and it is the form Reo's own Mintlify guide prescribes. The loader is kept byte-for-byte as Reo issues it so it stays diffable against the vendor snippet; `__tests__/docs/reo.test.ts` drives it in a DOM and asserts the client ID in the CDN URL is the same one handed to `Reo.init`, because a mismatched pair loads a working script that reports to nobody and the only symptom is an empty dashboard weeks later - The 1.0.2 documentation overhaul is reverted: `docs/` and `README.md` go back byte-for-byte to the commit #756 merged onto, along with the 14 generated locales and 14 translated READMEs #759 regenerated from those English sources. The release half of #756 stays — `package.json` and the Cargo workspace are untouched, since they have moved on to 1.0.4-beta.0 and the release tag the CLI builds its daemon download URL from is that npm version. Under `## 1.0.2` the heading and its release narrative stay, because 1.0.2 did ship; the `### Docs` entries underneath described the overhaul and go with it. Leaving the locales in place was the alternative considered and rejected: the nightly translate job is content-hash cached, so pages whose pre-overhaul English hashes it had already seen would have been skipped rather than repaired, stranding every non-English reader on a translation of text that no longer exists (#773) - The landing page no longer opens with the harness paragraph claiming that "the same events, the same policies, and the same session history apply to every one" of the twelve. Removed from `docs/index.mdx` and all 14 locales (#773) diff --git a/__tests__/docs/reo.test.ts b/__tests__/docs/reo.test.ts new file mode 100644 index 00000000..0316d915 --- /dev/null +++ b/__tests__/docs/reo.test.ts @@ -0,0 +1,132 @@ +/** + * `docs/reo.js` — the Reo.dev beacon on the documentation site. + * + * Analytics is the archetype of code that fails silently: the docs render + * identically whether the beacon loaded, loaded under someone else's client ID, + * or never ran at all. Nobody notices from the page — only from a dashboard + * that stays empty, weeks later, with no way to tell a quiet week from a broken + * install. + * + * So this drives the script the way a browser does — eval it into a DOM, catch + * the `