The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Revert "fix(website): route /pair to the web app, where a scanned sign-in QR is approved (#448)"
0xken154328434f4a3f
diff --git a/website/README.md b/website/README.mdindex 6869e93ac..98f7f0bfc 100644--- a/website/README.md+++ b/website/README.md@@ -10,8 +10,9 @@ retired; only the host routes below were kept.| Route | What ||---|---|-| `/`, `/s/:id`, `/pair`, `/auth/callback`, `/callback` | The Flutter app (`public/harness-web/index.html`, via `rewrites()` in `next.config.js`) |+| `/`, `/s/:id`, `/auth/callback`, `/callback` | The Flutter app (`public/harness-web/index.html`, via `rewrites()` in `next.config.js`) || `/download` (and `/install` → it) | Install page: CLI command and desktop downloads |+| `/pair` | Phone setup guidance — the mobile app and the desktop "add phone" dialog link here || `/desktop` | Desktop download page || `/desktop/download-macos`, `/desktop/download/linux-{x64,arm64}` | Redirect to the latest build in the desktop manifest || `/flash-circle.sh` | The dial firmware flasher script |diff --git a/website/next.config.js b/website/next.config.jsindex af38f74cf..4f036ab47 100644--- a/website/next.config.js+++ b/website/next.config.js@@ -56,9 +56,6 @@ module.exports = {beforeFiles: [{ source: '/', destination: '/harness-web/index.html' },{ source: '/s/:id', destination: '/harness-web/index.html' },- // A sign-in or pairing QR scanned with a phone's Camera app: the web app reads the code from- // the fragment (which never reaches this server), signs in if needed, and asks to approve.- { source: '/pair', destination: '/harness-web/index.html' },{ source: '/auth/callback', destination: '/harness-web/index.html' },// Local website previews use the SSO service's native loopback callback.{ source: '/callback', destination: '/harness-web/index.html' },diff --git a/website/src/app/pair/page.module.css b/website/src/app/pair/page.module.cssnew file mode 100644index 000000000..91292fc3f--- /dev/null+++ b/website/src/app/pair/page.module.css@@ -0,0 +1,40 @@+/* The same tokens and card shape as /connect and /desktop, so a page reached from a scanned code+ looks like the rest of Harness. */++.wrap {+ min-height: 100vh;+ display: grid;+ place-items: center;+ padding: 24px;+ background: var(--bg-base);+ color: var(--text-primary);+}++.card {+ width: min(440px, 100%);+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ gap: 14px;+ padding: 40px;+ border: 1px solid var(--border-default);+ border-radius: 20px;+ background: var(--bg-surface);+}++.badge {+ display: grid;+ place-items: center;+ width: 44px;+ height: 44px;+ margin-bottom: 4px;+ border-radius: 13px;+ border: 1px solid var(--border-default);+ background: var(--bg-elevated);+ color: var(--text-secondary);+}++.title { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }+.sub { margin: 0; color: var(--text-secondary); line-height: 1.55; }+.sub strong { color: var(--text-primary); font-weight: 600; }+.note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }diff --git a/website/src/app/pair/page.spec.tsx b/website/src/app/pair/page.spec.tsxnew file mode 100644index 000000000..164c4d594--- /dev/null+++ b/website/src/app/pair/page.spec.tsx@@ -0,0 +1,15 @@+import { render, screen } from "@testing-library/react";+import { describe, expect, it } from "vitest";+import PairPage from "./page";++describe("/pair — the desktop app's Add phone QR, scanned with the Camera app", () => {+ it("says to scan it from the Harness app, and asks for nothing", () => {+ render(<PairPage />);++ expect(screen.getByRole("heading", { name: "Scan this from the Harness app" })).toBeInTheDocument();+ expect(document.body).toHaveTextContent("Yes — scan to connect");+ // The fragment holds a one-time pairing code: nothing here may take input or show it back.+ expect(screen.queryByRole("textbox")).not.toBeInTheDocument();+ expect(screen.queryByRole("button")).not.toBeInTheDocument();+ });+});diff --git a/website/src/app/pair/page.tsx b/website/src/app/pair/page.tsxnew file mode 100644index 000000000..0e5b6bcf3--- /dev/null+++ b/website/src/app/pair/page.tsx@@ -0,0 +1,30 @@+import { Smartphone } from "lucide-react";+import styles from "./page.module.css";++/**+ * Where the desktop app's "Add phone" QR lands when it is scanned with the Camera app rather than+ * from inside Harness on the phone. The QR is `https://harness.autonomous.ai/pair#e=…&m=…&c=…`:+ * everything after the `#` is a one-time pairing code and an account, and a browser never sends the+ * fragment to this server. This page must never read it either — no script touches+ * `location.hash` — it only says where the code is meant to be scanned.+ */+export default function PairPage() {+ return (+ <main className={styles.wrap}>+ <section className={styles.card}>+ <div className={styles.badge}>+ <Smartphone size={20} strokeWidth={2} />+ </div>+ <h1 className={styles.title}>Scan this from the Harness app</h1>+ <p className={styles.sub}>+ Open Harness on your iPhone, tap <strong>Yes — scan to connect</strong>, and point it at the code on+ your Mac.+ </p>+ <p className={styles.note}>+ The code only works from the app: it pairs your phone with your computer, end-to-end encrypted.+ This page does not read it.+ </p>+ </section>+ </main>+ );+}