{"record":{"id":"a3bbca3dd3857632","repo":"Hmbown/CodeWhale","slug":"browser-action-click-takes-selector-or-point-not-both-pick","errorCode":null,"errorMessage":"browser action \"click\" takes selector or point, not both — pick one target","messagePattern":"browser action \"click\" takes selector or point, not both — pick one target","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/plugins/computer-use/src/tools.mjs","lineNumber":843,"sourceCode":"      if (repeat != null || target != null) throw bad(\"key with duration holds the key — repeat and target cannot be combined with it\");\n      if (!Number.isFinite(duration) || duration < 0.05 || duration > 30) throw bad(\"duration must be 0.05..30 seconds\");\n      return { name: \"hold_key\", args: { ...rest, duration } };\n    }\n    case \"browser\": {\n      const rest = { ...args };\n      delete rest.action;\n      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) {","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/plugins/computer-use/src/tools.mjs#L825-L861","documentation":"resolveTool's browser click case: both a CSS selector and a point {x,y} were given; the two targeting modes are mutually exclusive, and silently picking one would hide an ambiguous call, so it is rejected.","triggerScenarios":"Thrown at crates/tui/plugins/computer-use/src/tools.mjs:843 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly one target: either selector (non-empty CSS string) or point {x,y} with finite coordinates."],"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"}