From b67faca60b21b0cf74d5c967f0f8d215ad601e93 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 20:30:49 +0530 Subject: refactor(domains): strip comment noise Removes module banners, step markers, and comments restating the code. Keeps one-line notes for safeJs's trust boundary, the select-match null sentinels, the TUI width clamp, the single-window tab rule, the input synthesis quirks (char events, keyCode, mousemove, focus, compositor), the stale AX value, ignored-wrapper recursion, and isolated-tab routing. Co-Authored-By: Claude Opus 5 (1M context) --- src/domains/form.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/domains/form.ts') diff --git a/src/domains/form.ts b/src/domains/form.ts index 78e3db1..b97b22d 100644 --- a/src/domains/form.ts +++ b/src/domains/form.ts @@ -18,16 +18,6 @@ const FillArgs = Type.Object({ value: Type.String({ description: "Value to set in the field" }), }); -/** - * Run an element-scoped function either against a CSS selector (querySelector + - * apply) or a ref (resolve to objectId, callFunctionOn with element as `this`). - * The shared `fnBody` is a function body where `this` is the target element and - * the single argument is the value — identical logic on both paths. Returns the - * function's return value (parsed) or a ToolErr. - * - * On the ref path a detached node yields a stale-ref error; on the selector path - * a missing element returns { status: "not_found" } from the function body. - */ const runOnElement = async ( client: BrowserClient, opts: { @@ -60,9 +50,7 @@ const runOnElement = async ( if (opts.selector === undefined) { return err({ kind: "invalid_state", message: "Provide either `ref` or `selector`." }); } - // Selector path: bind the same trusted function body to the matched element - // via .call(). fnBody is harness-authored (not user input); only the selector - // and value are interpolated, and those go through safeJs. + // fnBody is harness-authored, not user input; only the selector and value are interpolated, and those go through safeJs. const prelude = safeJs` (() => { const el = document.querySelector(${opts.selector}); @@ -232,7 +220,6 @@ const isSelectResult = (v: unknown): v is SelectResult => { return false; }; -// `this` is the