Narrow polish tab interfaces - #34
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideNarrowed the polish-related props consumed by TranscriptionTab and PolishTab to small, explicit interfaces decoupled from the full usePolishFlow return type, and wired them to the domain-level PolishResult type instead of the hook. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
More reviews will be available in 34 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 decouples the PolishTab and TranscriptionTab components from the usePolishFlow hook. Instead of deriving types using Pick<ReturnType<typeof usePolishFlow>, ...>, the types PolishTabPolishFlow and TranscriptionTabPolishFlow are now explicitly defined with their required properties. There are no review comments, and I have no feedback to provide.
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.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Now that
TranscriptionTabPolishFlowandPolishTabPolishFlowboth describe parts of the polish flow, consider extracting a shared interface/type (e.g. a smallerPolishActionstype) to avoid duplicating thepolishText/polishingshape in multiple components. - Since
PolishTabPolishFlowis now a hand-written structural type, you may want to colocate it with the domain types (e.g. nearPolishResult) or export it from a shared module so the hook and components depend on the same contract and are less likely to drift over time.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `TranscriptionTabPolishFlow` and `PolishTabPolishFlow` both describe parts of the polish flow, consider extracting a shared interface/type (e.g. a smaller `PolishActions` type) to avoid duplicating the `polishText`/`polishing` shape in multiple components.
- Since `PolishTabPolishFlow` is now a hand-written structural type, you may want to colocate it with the domain types (e.g. near `PolishResult`) or export it from a shared module so the hook and components depend on the same contract and are less likely to drift over time.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Bot review 处理记录:
验证: |
aeaa7c4 to
2a2ece1
Compare
5ad235d to
505b367
Compare
关联 issue
Refs #28
依赖关系
这个 PR 叠在 #32 (
codex/polish-run-module) 之上,因为它收窄的是 #21 润色运行模块之后的 UI 消费接口。#32 合并并 retarget 后,本 PR 再 rebase/retarget 到对应 base。
改动内容
TranscriptionTab不再通过ReturnType<typeof usePolishFlow>派生 props,而是显式声明只需要polishText和polishing。PolishTab不再通过ReturnType<typeof usePolishFlow>派生 props,而是显式声明润色页需要的最小 interface。PolishTab只依赖领域状态PolishResult,避免重新耦合到 hook 的完整返回形状。验证
rg "ReturnType<typeof usePolishFlow>|import type \\{ usePolishFlow \\}" components无匹配npm testnpm run buildSummary by Sourcery
Narrow the polish-related tab components to depend on explicit minimal polish flow interfaces instead of the full usePolishFlow hook return type.
Enhancements: