Narrow source tab transcription interface - #38
Conversation
Reviewer's GuideRefactors the SourceTab component to take a narrow, explicit UI contract instead of the full transcription hook, moving derived state (canTranscribe, progress) into SourceTab and reusing a shared hasAsrApiKey helper in Home while wiring the hook’s fields into the new props shape. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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.
Code Review
This pull request refactors how transcription flow state and actions are passed from the Home page to the SourceTab component. Instead of passing the entire transcriptionFlow object, the props are now grouped into nested input, run, and actions objects, and some local state derivations are moved directly into SourceTab. The reviewer suggests flattening these props instead of grouping them into nested objects, as creating new object literals on every render in the parent component degrades performance by breaking reference stability and rendering optimizations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Bot review 处理完毕:
本地验证:npm test 通过;npm run build 通过。 |
|
Bot review 处理完毕:Gemini 关于 SourceTab props 扁平化的两条建议已采纳,threads 已 resolved;最新 npm test 与 npm run build 已通过,PR checks 当前全绿。 |
3255cd0 to
a951161
Compare
2ba40c5 to
6677e7c
Compare
对应 Issue
Closes #27
变更
SourceTab改为显式 props,不再通过Pick<ReturnType<typeof useTranscriptionFlow>>绑定整个转录 hook 返回形状。SourceTab只接收渲染所需的输入状态、运行状态和少量用户动作。Home不再为来源页派生canTranscribe/ indeterminate progress,而是把展示所需状态传给SourceTab,由来源页组件完成本地展示判断。Home的 ASR key 判断改为复用hasAsrApiKey。验证
npm testnpm run build依赖
Summary by Sourcery
Narrow the
SourceTabtranscription interface to explicit UI state and actions and simplify its integration inHome.Enhancements:
SourceTabprops to accept only display-related input/run state and UI actions instead of the full transcription hook.canTranscribeand progress display locally withinSourceTabbased on provided state.hasAsrApiKeyinHomeand pass minimal state intoSourceTab.