Repository navigation
fix(policy): keep a chat's send button a commit when only its history shows prices - #134
Merged
Merged
Conversation
… shows prices
Tapping "发送" in Meituan's 小美 chat asked as a payment ("Pay: “发送”?")
because any commit on a screen that shows an amount was a payment, and
the chat's history listed prices.
A button whose label says only "send" (Send, 发送, 發送, 傳送, 送信, 보내기,
전송 and the like) on the row of the screen's one text field (search
boxes aside) now stays a commit when the amount is only in static text.
It stays a payment when the amount is in its label or in any text
field, when a field holds a number alone, in a finance or store app,
without such a composer (a wallet's confirmation page), when there are
two fields, when bounds are missing, or when the label says more
("Send money", "发送红包").
Fixes #132
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #132
The bug
In Meituan's 小美 AI chat (
com.meituan.android.beam), tapping发送asked as a payment ("Pay: “发送”?", rule Payments).发送is a commit, anddetectmakes any commit a Payment whenscreenHasCurrencyfinds an amount anywhere on the screen. The chat's history showed ¥ prices, so a harmless question needed a payment approval.The exception
sendsChatMessageininternal/policy/detect.go. An amount in static text elsewhere on the screen no longer makes a tap a payment when all of these hold:AllowBlockedincluded);The tap stays a Commit, so the person's rules for commits still apply (preset 1 still asks "Commits"). Nothing else changes: an amount in the button's own label, a label that moves money (
commitPartsmoney), a money icon, and installs keep their payment checks as before. Swipes (sliders) are unchanged.What stays a payment (tested)
0.5 ETH), and one with a bare0.5in a field on the Send button's row转你 ¥200)Tests that are now a commit, not a payment: the 小美 case, WeChat with prices in history (Chinese and English), and a chat with a search box at the top. They fail on
main("ask Payments") and pass here.make checkpasses.DESIGN.md (
paymentkind) and SKILL.md (what waits for the person) mention the exception in one sentence each.Limits
Suggested release notes
🤖 Generated with Claude Code