{"record":{"id":"157a79485a40b6d4","repo":"Hmbown/CodeWhale","slug":"browser-action-type-requires-text","errorCode":null,"errorMessage":"browser action \"type\" requires text","messagePattern":"browser action \"type\" requires text","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/plugins/computer-use/src/tools.mjs","lineNumber":850,"sourceCode":"      switch (args.action) {\n        case \"start\":\n          if (rest.url != null && typeof rest.url !== \"string\") throw bad(\"browser start url must be a string\");\n          return { name: \"browser_start\", args: rest };\n        case \"status\": return { name: \"browser_status\", args: rest };\n        case \"navigate\":\n          if (typeof rest.url !== \"string\" || !rest.url.trim()) throw bad('browser action \"navigate\" requires url');\n          return { name: \"browser_navigate\", args: rest };\n        case \"click\": {\n          const hasSelector = typeof rest.selector === \"string\" && rest.selector.trim();\n          const hasPoint = rest.point != null && Number.isFinite(rest.point?.x) && Number.isFinite(rest.point?.y);\n          if (hasSelector && hasPoint) throw bad('browser action \"click\" takes selector or point, not both — pick one target');\n          if (!hasSelector && !hasPoint) throw bad('browser action \"click\" needs selector (CSS) or point {x,y}');\n          if (!hasSelector) delete rest.selector;\n          if (!hasPoint) delete rest.point;\n          return { name: \"browser_click\", args: rest };\n        }\n        case \"type\":\n          if (typeof rest.text !== \"string\" || !rest.text.length) throw bad('browser action \"type\" requires text');\n          return { name: \"browser_type\", args: rest };\n        case \"screenshot\": return { name: \"browser_screenshot\", args: rest };\n        case \"stop\": return { name: \"browser_stop\", args: rest };\n        default:\n          throw bad(`browser action must be start, status, navigate, click, type, screenshot or stop (got ${JSON.stringify(args.action)})`);\n      }\n    }\n    case \"trajectory\": {\n      const rest = { ...args };\n      delete rest.action;\n      switch (args.action) {\n        case \"start\": return { name: \"trajectory_start\", args: rest };\n        case \"stop\": return { name: \"trajectory_stop\", args: rest };\n        case \"status\": return { name: \"trajectory_status\", args: rest };\n        case \"replay\": return { name: \"trajectory_replay\", args: rest };\n        default:\n          throw bad(`trajectory action must be start, stop, status or replay (got ${JSON.stringify(args.action)})`);\n      }","sourceCodeStart":832,"sourceCodeEnd":868,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/plugins/computer-use/src/tools.mjs#L832-L868","documentation":"Validation error from the browser action resolver in resolveTool: the 'type' action maps to browser_type and must carry the text to type into the focused page element. It fires when the text field is absent, not a string, or a zero-length string, meaning a keystroke-injection request with no payload.","triggerScenarios":"Thrown at crates/tui/plugins/computer-use/src/tools.mjs:850 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass text as a non-empty string, e.g. {action:\"type\", text:\"hello\"}."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}