feat(pageUI): set default visibility of floating button to hidden, only show during tool invocation#332
feat(pageUI): set default visibility of floating button to hidden, only show during tool invocation#332
Conversation
…ly show during tool invocation
WalkthroughA floating widget's default visibility state is changed from true to false in the pageUI component. The widget now initializes as hidden and displays only when status transitions to "run" via existing runtime logic. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/next-wxt/components/pageUI.vue (1)
40-52:⚠️ Potential issue | 🟠 MajorFloating button never auto-hides when tool invocation ends.
The PR states the button should "only show during tool invocation," but
visibleis set totrueonstatus === 'run'(line 43) and is never set back tofalsewhen the status returns to'ready'. The only way to hide the button is via the manual close button. If the intent is to auto-hide after the tool call completes, add anelsebranch:Proposed fix
const updateAnimationStatus = (data: { status: string; message: string }) => { if (data.status === 'run') { sendRuntimeMessage('focus-current-tab', data, 'content->bg') visible.value = true // Ensure visible when running + } else { + visible.value = false }If the current behavior (stay visible until manually closed) is intentional, consider updating the PR description/comment on line 19 to reflect that.
feat(pageUI): 将浮动按钮的默认可见性设置为隐藏,仅在工具调用期间显示
Pull Request (OpenTiny NEXT-SDKs)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information