fix(browser): support 'url' param as alias for 'targetUrl'#29180
fix(browser): support 'url' param as alias for 'targetUrl'#29180kevinWangSheng wants to merge 4 commits intoopenclaw:mainfrom
Conversation
- 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
…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
There was a problem hiding this comment.
💡 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".
| 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])) |
There was a problem hiding this comment.
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 SummaryThis PR implements support for The browser tool changes are implemented correctly with proper backward compatibility - both parameters are now accepted, with Note: This PR bundles three separate, unrelated fixes across different parts of the codebase:
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
Last reviewed commit: d1ce0b7 |
|
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. |
Summary
Fixes #29136: browser tool open and navigate actions fail with 'targetUrl required' despite url parameter being provided
Changes
Testing
Build completed successfully.