Skip to content

fix(browser): support 'url' param as alias for 'targetUrl'#29180

Closed
kevinWangSheng wants to merge 4 commits intoopenclaw:mainfrom
kevinWangSheng:fix/browser-url-param-alias
Closed

fix(browser): support 'url' param as alias for 'targetUrl'#29180
kevinWangSheng wants to merge 4 commits intoopenclaw:mainfrom
kevinWangSheng:fix/browser-url-param-alias

Conversation

@kevinWangSheng
Copy link
Copy Markdown
Contributor

Summary

Fixes #29136: browser tool open and navigate actions fail with 'targetUrl required' despite url parameter being provided

Changes

  • Add 'url' field to browser tool schema as alias for 'targetUrl'
  • Update open and navigate action handlers to accept both 'url' and 'targetUrl'

Testing

Build completed successfully.

Kevin Shenghui added 3 commits February 27, 2026 03:03
- Add support for parsing code/code_block tags in rich text posts
- Add support for parsing pre (preformatted text) tags with language
- Handle share_chat message type for forwarded/merged messages

Fixes: openclaw#28578
…oss-bot mention collision

When running multiple Telegram bot accounts in the same group,
the hasBotMention() function used String.includes() for mention
detection, which matches substrings instead of exact usernames.

This caused a bot to incorrectly believe it was mentioned when a
different bot with a longer username sharing the same prefix was
mentioned (e.g., @Gaian matching @gaianchat_bot).

Fix: Replace substring check with word-boundary check to ensure
@Gaian only matches when followed by non-word character or end of
string.

Fixes openclaw#29173
…vigate actions

- Add 'url' field to browser tool schema as alias for 'targetUrl'
- Update open and navigate action handlers to accept both 'url' and 'targetUrl'
- Fixes openclaw#29136: browser tool open and navigate actions fail with 'targetUrl required' despite url parameter being provided
@openclaw-barnacle openclaw-barnacle bot added channel: telegram Channel integration: telegram agents Agent runtime and tooling channel: feishu Channel integration: feishu size: XS labels Feb 27, 2026
…xec.ask is not set

When tools.exec.ask is missing from openclaw.json, the exec dispatch code
defaults to 'on-miss' instead of reading from exec-approvals.json defaults.

This fix adds fallback to exec-approvals.json defaults.ask when both
agentExec?.ask and cfg.tools?.exec?.ask are undefined.

Fixes: openclaw#29172
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93c64fe413

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +253 to +258
const idx = text.indexOf(mention);
// Use word-boundary check: mention must be followed by non-word char or end of string
// This prevents "@gaian" from matching "@gaianchat_bot"
if (
idx !== -1 &&
(idx + mention.length >= text.length || !/\w/.test(text[idx + mention.length]))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Continue scanning after a non-boundary mention match

The new boundary check only inspects the first indexOf match, so if the text contains an early prefix hit (for example @gaianchat_bot) and a later valid mention (@gaian), this branch returns false unless Telegram entities are present. In updates where entities/caption_entities are missing, legitimate bot mentions in group chats will be ignored and mention-gated handling can be skipped.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

This PR implements support for url parameter as an alias for targetUrl in browser tool's open and navigate actions, fixing #29136 where the browser tool failed when using url instead of targetUrl.

The browser tool changes are implemented correctly with proper backward compatibility - both parameters are now accepted, with url taking precedence when both are provided.

Note: This PR bundles three separate, unrelated fixes across different parts of the codebase:

  • Browser tool: url/targetUrl parameter aliasing
  • Telegram bot: Word-boundary check in mention detection (fixes false positive where @gaian would match @gaianchat_bot)
  • Feishu bot: Code block parsing and share_chat message handling

According to the repository guidelines (CLAUDE.md), "Group related changes; avoid bundling unrelated refactors." The PR title and description only mention the browser tool fix, but it includes unrelated Telegram and Feishu changes that should ideally be in separate PRs or at minimum documented in the PR description.

Confidence Score: 4/5

  • This PR is safe to merge with only minor concerns about PR organization
  • All three fixes are implemented correctly with sound logic. The browser tool aliasing is backward compatible, the Telegram word-boundary check prevents false positives, and the Feishu code block parsing is standard. Score is 4 instead of 5 due to: (1) bundling unrelated changes without documenting them in the PR description, which goes against repository guidelines, and (2) lack of test coverage for the new url parameter alias.
  • No files require special attention - all implementations are correct

Last reviewed commit: d1ce0b7

@vincentkoc
Copy link
Copy Markdown
Member

Thanks for the work here.

Closing this as superseded by #29260, which merged the browser url/targetUrl compatibility fix for this issue cluster.

This PR also includes additional unrelated changes. If you want those reviewed, please open a focused follow-up PR for just that scope and I’ll help route it quickly. If you think this should stay open, reply and we can reopen immediately.

@vincentkoc vincentkoc closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: feishu Channel integration: feishu channel: telegram Channel integration: telegram size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: browser tool open and navigate actions fail with "targetUrl required" despite url parameter being provided

2 participants