refactor(recordings): align transcription with shadcn UI - #30
Open
MapleEve wants to merge 1 commit into
Open
Conversation
❌ 16 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 3 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Pull request overview
本 PR 将 recordings 的转写(transcription)区域与骨架屏(skeletons)对齐到共享的 shadcn UI primitives,并将原先偏“源码形状守卫”的回归测试调整为基于实际渲染语义(data-slot / aria / data-control / data-state)的覆盖,从而更稳定地验证 UI 状态与交互控件。
Changes:
- 更新
TranscriptionSection的错误态与整体布局:使用 shadcnAlertDescription、新增“重试/收起错误”控制,并统一 badge 变体写法与 spacing。 - 简化并重排
transcription-skeletons的骨架结构与样式(grid/gap/尺寸),更贴近当前 Card/Skeleton primitives。 - 将两套 UI 回归测试改为 SSR 渲染组件并断言语义标记(data-control、data-slot、aria-*),同时覆盖 job display state 映射与 active job 判定。
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/features/recordings/components/transcription-section.tsx | 调整转写面板结构与错误态交互(retry/dismiss),并对齐 shadcn primitives 的布局与语义属性。 |
| src/features/recordings/components/transcription-skeletons.tsx | 重构转写相关 skeleton 结构与样式,简化占位实现并对齐 Card/Skeleton 组件用法。 |
| src/tests/recording-detail-copy-ui-regression.test.ts | 从源码字符串断言切换为 SSR 渲染断言,验证录音详情转写区在 loaded/failed/empty/loading 等状态下的语义输出。 |
| src/tests/full-ui-replacement-regression.test.ts | 同步采用 SSR 渲染断言方式,增强对转写区 primitives/语义标记与 job display state 的回归覆盖。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+23
| function renderRecordingTranscription( | ||
| props: React.ComponentProps<typeof TranscriptionSection>, | ||
| ) { | ||
| return renderToStaticMarkup( | ||
| React.createElement( |
Comment on lines
+38
to
+42
| function renderRecordingTranscription( | ||
| props: React.ComponentProps<typeof TranscriptionSection>, | ||
| ) { | ||
| return renderToStaticMarkup( | ||
| React.createElement( |
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.
Summary
Validation
No merge performed.