feat: 完成 Web UI 全量替换收口#22
Conversation
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 84.40% 84.47% +0.06%
==========================================
Files 75 75
Lines 2462 2492 +30
==========================================
+ Hits 2078 2105 +27
- Misses 384 387 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR completes the “Graphite Glass” Web UI replacement by migrating remaining legacy surfaces to the new tokenized UI primitives, while adding regression coverage for key UX flows (settings shell scrolling, dashboard overlays, copy actions, and AI rename preview/apply).
Changes:
- Replace remaining “warm hardware / MetalButton” UI usage with Graphite Glass primitives across auth/onboarding/dashboard/settings/recording detail surfaces.
- Add/adjust dashboard topbar overlays (search + activity), source-provider row bridging, copy-to-clipboard entrypoints, and AI rename preview/apply flow.
- Add multiple Vitest “UI regression” tests that lock in critical DOM structure/strings for the new UI.
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/features/dashboard/components/library-search.tsx | New controlled search overlay with keyboard navigation and result rendering. |
| src/features/dashboard/components/activity-overlay.tsx | New activity overlay derived from sync/transcription state. |
| src/features/settings/components/sections/data-sources-section.tsx | Updated data-source settings UX (status lanes, test/save messaging). |
| src/features/recordings/components/transcription-section.tsx | Updated transcript section including copy actions and error toasts. |
| src/app/api/recordings/[id]/rename/auto/route.ts | Supports auto-rename “preview vs apply” mode via request body. |
| src/features/recordings/components/ai-rename-preview-card.tsx | Shared UI card for AI rename preview/apply actions. |
| src/tests/full-ui-replacement-regression.test.ts | Regression coverage for token replacement + key flows (search, rename preview, safe source detail rendering). |
| src/tests/dashboard-ui-foundation.test.ts | Regression coverage for dashboard layout + provider rows. |
| src/tests/dashboard-search-ui-regression.test.ts | Regression coverage for search overlay + activity overlay wiring and states. |
| src/tests/settings-ui-replacement-regression.test.ts | Regression coverage for settings dialog fixed-height shell + data-source section affordances. |
| src/tests/recording-detail-copy-ui-regression.test.ts | Regression coverage for copy entrypoints + clipboard helper usage. |
| src/tests/rename-auto-route.test.ts | Updated route tests for preview/apply behavior and response shape (applied). |
| src/tests/react-surface-ssr.test.ts | SSR surface coverage updated to new components/props. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| return `${formatRelativeDistance(date, "zh-CN")}前`; | ||
| } catch { | ||
| return null; | ||
| } |
| { value: "all", label: "全部" }, | ||
| { value: "recording", label: "录音" }, | ||
| { value: "transcript", label: "逐字稿" }, | ||
| { value: "speaker", label: "说话人" }, | ||
| { value: "tag", label: "标签" }, |
| <span>{resultCountLabel}</span> | ||
| <span>最多显示 12 条</span> | ||
| </div> | ||
| <div className="overflow-hidden rounded-lg border border-border/60 bg-background/35"> |
| const handleCopyTranscript = useCallback(async () => { | ||
| if (!displayText.trim()) { | ||
| toast.error(t("transcription.noTranscript")); | ||
| return; |
| try { | ||
| return `${formatRelativeDistance(date, "zh-CN")}前`; | ||
| } catch { | ||
| return null; | ||
| } |
| const handleCopyTranscript = useCallback(async () => { | ||
| if (!displayText.trim()) { | ||
| toast.error(t("transcription.noTranscript")); | ||
| return; |
| const scheduleProviderActionMessageReset = (provider: SourceProvider) => { | ||
| window.setTimeout(() => setProviderActionMessage(provider, null), 2600); | ||
| }; |
| function getRemoteStatusText(job: ActivityTranscriptionJob) { | ||
| switch (job.remoteStatus) { | ||
| case "queued": | ||
| return "远端队列中"; | ||
| case "converting": |
| const scheduleProviderActionMessageReset = (provider: SourceProvider) => { | ||
| window.setTimeout(() => setProviderActionMessage(provider, null), 2600); | ||
| }; |
| function getRemoteStatusText(job: ActivityTranscriptionJob) { | ||
| switch (job.remoteStatus) { | ||
| case "queued": | ||
| return "远端队列中"; | ||
| case "converting": |
f4bda90 to
c0ab489
Compare
变更范围
验证
bun run format-and-lintbun run type-checkbun run testbun run test:coveragebun run build(通过;仍有 Next standalone trace 对.git/fsmonitor--daemon.ipc的非致命 copy warning)PLAYWRIGHT_SKIP_WEBSERVER=1 PLAYWRIGHT_BASE_URL=http://127.0.0.1:3001 PLAYWRIGHT_USE_SYSTEM_CHROME=1 bun run e2e#data-sources深链和固定滚动壳均 PASS。