-
-
Notifications
You must be signed in to change notification settings - Fork 998
fix: fix sender speech disable #1398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @kimteayon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a bug related to the custom speech recognition disable logic within the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthrough修改了语音权限查询与合并允许逻辑:当 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 分钟
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request aims to fix a bug related to disabling custom speech recognition. The changes correctly prevent browser permission checks and adjust the speech availability logic when a custom speech configuration is provided. My review includes two main points: a high-severity issue with a missing dependency in a useEffect hook that could lead to bugs, and a suggestion to simplify a conditional expression for better readability. Overall, the core logic of the fix is sound, but the implementation detail in the useEffect needs to be addressed.
Bundle ReportChanges will decrease total bundle size by 1.18MB (-40.19%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: x-markdown-array-pushAssets Changed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/x/components/sender/useSpeech.ts (1)
40-68: 缺少 useEffect 依赖项useEffect 的依赖数组中缺少
allowSpeech。当allowSpeech在对象类型和非对象类型之间切换时(例如从true变为{ recording: false, onRecordingChange: ... }),Effect 不会重新执行,导致可能出现以下问题:
- 从非对象切换到对象时,权限监听器不会被清理
- 从对象切换到非对象时,权限检查不会被启动
应用以下修改来添加缺失的依赖项:
}; } - }, []); + }, [allowSpeech]);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/x/components/sender/useSpeech.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: size
- GitHub Check: build preview
- GitHub Check: test
- GitHub Check: Cloudflare Pages
size-limit report 📦
|
Deploying ant-design-x with
|
| Latest commit: |
90b6884
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fa0a5c8c.ant-design-x.pages.dev |
| Branch Preview URL: | https://fixsender.ant-design-x.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
packages/x/components/sender/__tests__/__snapshots__/demo-extend.test.ts.snapis excluded by!**/*.snappackages/x/components/sender/__tests__/__snapshots__/demo.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (1)
packages/x/components/sender/demo/suffix.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build preview
- GitHub Check: size
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Cloudflare Pages
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1398 +/- ##
==========================================
+ Coverage 94.04% 94.09% +0.05%
==========================================
Files 144 144
Lines 3710 3710
Branches 1041 1041
==========================================
+ Hits 3489 3491 +2
+ Misses 219 217 -2
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log
Summary by CodeRabbit
发布说明
✏️ Tip: You can customize this high-level summary in your review settings.