fix: MiniApp interaction polish — backdrop close routing, publish-by-name - #1914
Merged
Merged
Conversation
Closing on mousedown unmounts the fullscreen backdrop in the middle of the press gesture. Pulling the hit target of an in-flight gesture out from over a cross-document iframe (a MiniApp) leaves the webview routing subsequent mousemoves against the stale layer: the MiniApp loses hover feedback and swallows an extra click until the next mousedown forces a fresh hit test — closing the bubble by clicking the MiniApp then took two more clicks before the app reacted again. Close on click instead, so the gesture completes on the backdrop before it unmounts. A ref armed on mousedown preserves the existing opening-phase protection: a press that began while the panel was still scaling up never closes it.
'Publish 循天问命' used to send the agent digging through the filesystem: the tool required app_id and its description pointed at 'the directory name under the miniapps data root', while the installed roster sat in the running MiniAppManager all along. - Add app_name: matched case-insensitively against manifest names in every locale (exact first, substring fallback); app_id becomes optional. - Every failure path (unknown name, ambiguous name, bad id, neither given) returns the installed 'id — name' roster so the model self-corrects on the next call instead of searching disk. - Tool description now says to resolve through the manager and never search the filesystem; screenshot validation moves after app resolution so name-only calls confirm the app before asking the user for screenshots. - Permission identity falls back to app_name; unit tests cover locale matching, substring fallback, ambiguity and the schema contract.
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.
Two host-side fixes surfaced while testing a MiniApp (the BaZi chart app).
1.
fix(web-ui): close floating mini chat backdrop on click, not mousedownProblem — with the floating mini chat open over a MiniApp, clicking a blank area of the MiniApp closes the bubble, but afterwards the MiniApp stops responding to hover entirely and it takes one extra click before clicks land in the app again.
Root cause — the fullscreen
bitfun-fmc__backdropclosed the panel ononMouseDown; the backdrop is conditionally rendered onisOpen, so it was unmounted in the middle of the press gesture. Pulling the hit target of an in-flight gesture out from over a cross-document iframe corrupts the webview's hover/hit-test routing: mousemoves keep routing against the stale layer and the next click is spent re-hit-testing.Fix — close on
onClickso the gesture completes on the backdrop before it unmounts. AbackdropArmedRefarmed on mousedown (only whenphase === 'open') preserves the existing opening-phase protection: a press that began while the panel was still scaling up can never close it on release.2.
feat(agentic): resolvePublishMiniApptarget by display nameProblem — asking the assistant to “publish 循天问命” sent it digging through the filesystem with find/glob: the tool required
app_idand its own description pointed at “the directory name under the miniapps data root”, while the installed roster sat in the runningMiniAppManagerall along.Fix
app_nameparameter: matched case-insensitively against manifest names in every locale (exact first, substring fallback);app_idbecomes optional.id — nameroster, so the model self-corrects on the next call instead of searching disk.app_name.Verification
tsc --noEmitclean (web-ui).cargo test -p bitfun-core miniapp_publish— 6/6 pass (locale matching, substring fallback, ambiguity, schema/permission contracts).