From a314b9a81eb76bad5e77be97bfc4f3f7f9d5d721 Mon Sep 17 00:00:00 2001 From: Factory Agent Date: Sat, 17 Oct 2026 04:20:14 +0700 Subject: [PATCH 1/2] Document off-machine UI proof rules --- AGENTS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9095c306451..c889d3e3ce9 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -167,6 +167,17 @@ Then follow post-install instructions (permissions / accessibility as prompted). **Do not** treat Vitest/jsdom or `cargo test` alone as sufficient for tray icon, DWM, WebView2 theme, float bar z-order, or settings chrome. **Do not** open issues/PRs against trycua/cua unless the user explicitly asks; use it as tooling. +### Off-machine proof (Cloudflare) + +Every Cloudflare runtime (Workers, Containers, Sandbox, Browser Rendering) is Linux. None can run the Tauri shell, WebView2, the tray, or DWM. Off-machine evidence supplements the CUA loop above; it never replaces it for tray, theme, float-bar, or window-chrome changes. + +- **What it can prove:** React surface layout, copy / i18n, rendered data, provider siloing, DOM and accessibility tree, and console errors (Browser Rendering's headless Chromium against a static frontend build); tray icon pixels from `codexbar::tray::{render_bar_icon_rgba, render_percent_icon_rgba}` exported without a desktop. +- **Frontend adapter:** mock the bridge with `mockIPC(handler, { shouldMockEvents: true })` and `mockWindows` from `@tauri-apps/api/mocks` (ships with `@tauri-apps/api`; no new dependency). The handler answers by command name from bridge-shaped fixtures (same shape as `CODEXBAR_SEED_USAGE_JSON`) that stay aligned with `types/bridge.ts`. Keep the mock out of the production bundle. +- **Fixtures only:** never upload real settings, cookies, tokens, account emails, or provider responses. +- **Labeling:** mark these screenshots in PRs as "Chromium (Linux), mocked IPC". Fonts, scrollbars, and DPI differ from WebView2. +- **Windows-only checks away from the dev machine:** use a Windows host (CircleCI `windows` orb or a disposable Windows VM) running the same rebuild → proof mode → CDP + CUA loop. Cloudflare may front that host (`cloudflared` tunnel behind Cloudflare Access) and store its artifacts, but the proof itself comes from Windows. +- **Account safety:** the Cloudflare account is shared with unrelated projects, and no Win-CodexBar resources exist on it yet. Read-only `list` / `get` calls are fine. Do not reuse, redeploy, or bind into another project's Workers, Browser Rendering bindings, or containers. Creating, deploying, or editing any Cloudflare resource needs explicit user approval in the current turn; never delete Cloudflare resources. Keep Cloudflare tokens out of the repo, logs, and PR text. + ## Commit & PR Guidelines From 41308b1862d8e31176134157c7f5fe17bd29b39d Mon Sep 17 00:00:00 2001 From: Factory Agent Date: Sat, 17 Oct 2026 04:26:20 +0700 Subject: [PATCH 2/2] Clarify proof fixture shapes --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c889d3e3ce9..68579880bd1 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -172,7 +172,7 @@ Then follow post-install instructions (permissions / accessibility as prompted). Every Cloudflare runtime (Workers, Containers, Sandbox, Browser Rendering) is Linux. None can run the Tauri shell, WebView2, the tray, or DWM. Off-machine evidence supplements the CUA loop above; it never replaces it for tray, theme, float-bar, or window-chrome changes. - **What it can prove:** React surface layout, copy / i18n, rendered data, provider siloing, DOM and accessibility tree, and console errors (Browser Rendering's headless Chromium against a static frontend build); tray icon pixels from `codexbar::tray::{render_bar_icon_rgba, render_percent_icon_rgba}` exported without a desktop. -- **Frontend adapter:** mock the bridge with `mockIPC(handler, { shouldMockEvents: true })` and `mockWindows` from `@tauri-apps/api/mocks` (ships with `@tauri-apps/api`; no new dependency). The handler answers by command name from bridge-shaped fixtures (same shape as `CODEXBAR_SEED_USAGE_JSON`) that stay aligned with `types/bridge.ts`. Keep the mock out of the production bundle. +- **Frontend adapter:** mock the bridge with `mockIPC(handler, { shouldMockEvents: true })` and `mockWindows` from `@tauri-apps/api/mocks` (ships with `@tauri-apps/api`; no new dependency). The handler answers by command name from fixtures whose shape matches that command's return type in `types/bridge.ts`; usage-snapshot fixtures use the `CODEXBAR_SEED_USAGE_JSON` shape. Keep the mock out of the production bundle. - **Fixtures only:** never upload real settings, cookies, tokens, account emails, or provider responses. - **Labeling:** mark these screenshots in PRs as "Chromium (Linux), mocked IPC". Fonts, scrollbars, and DPI differ from WebView2. - **Windows-only checks away from the dev machine:** use a Windows host (CircleCI `windows` orb or a disposable Windows VM) running the same rebuild → proof mode → CDP + CUA loop. Cloudflare may front that host (`cloudflared` tunnel behind Cloudflare Access) and store its artifacts, but the proof itself comes from Windows.