From b033b8e9da6830ccbc947d42fee667b3c17383b6 Mon Sep 17 00:00:00 2001 From: Palash Debnath Date: Wed, 1 Jul 2026 01:24:30 +0530 Subject: [PATCH] feat(ui): rewrite dub studio on clean shadcn, delete dub CSS (fast mode) (#818) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FAST-mode shadcn migration of the Dub Studio feature area. The dub components now style with Tailwind utilities on the OmniVoice palette tokens (bg/text/border via chrome-* + space/text vars) plus the src/ui shadcn primitives (Button/Badge/Progress/Segmented/Table), and the 800-line page stylesheet is gone. What changed - Deleted frontend/src/pages/DubTab.css (800 lines). The irreducible pieces that can't be utilities — keyframe motion (stepper spin, idle-drop pulse, skeleton shimmer), ::before stepper connectors, and a handful of rules that must override other *global* design-system classes (.studio-panel / .label-row / .override-toggle / .segment-del) — moved to a small co-located frontend/src/components/dub/dub.css. - Converted the dub-* presentational classes to inline utilities across DubFooter (footer panel, export-track chips, compression warn), DubLeftColumn (generating overlay, cast strip, the whole translation settings bar + fields), DubRightColumn (output-options rows, transcript body, glossary chip, bulk-select row), IdleSkeleton (speakers input, ingest opt-in, landing advanced, ghost footer + buttons), and TranscribeOverlay (stats row). - Rewrote FooterBtn off the global .btn-primary / .dub-footer-btn subsystem onto a Tailwind tone map (idle/danger/green/pink/amber/…), preserving the flat tinted-outline look. - Removed the dub-* fragments from src/index.css (tabular-nums group, focus-visible group, and the dub-split-grid / dub-settings-bar / dub-footer-btns responsive media queries — now inline max-[…] utils). Kept .btn-primary base (still used by ErrorBoundary) and all shared design-system classes. Left intact (reported): the segment-* subsystem (DubSegmentTable.jsx/css, DubSegmentRow.jsx/css, segment-* in index.css). It's the lowest-risk option for the core, most test-covered segment table; ModelsTable and EngineCompatibilityMatrix were verified NOT to consume segment-* (they use models-*/engine-matrix-*), so nothing else breaks. Behavior preserved exactly — every onClick/state/prop/hook untouched. Verified: vite build ✓, oxlint 0 ✓, oxfmt --check clean ✓, vitest 641/641 ✓, bun install --frozen-lockfile ✓. Eyeballed the idle dropzone and the loaded skeleton (stepper, settings bar, skeleton segment table, footer) in Chromium — palette + layout coherent. Co-authored-by: mergetest Co-authored-by: Claude Opus 4.8 (1M context) --- frontend/src/components/dub/DubFooter.jsx | 41 +- frontend/src/components/dub/DubLeftColumn.jsx | 107 ++- .../src/components/dub/DubRightColumn.jsx | 60 +- frontend/src/components/dub/FooterBtn.jsx | 44 +- frontend/src/components/dub/IdleSkeleton.jsx | 46 +- .../src/components/dub/TranscribeOverlay.jsx | 2 +- frontend/src/components/dub/dub.css | 269 ++++++ frontend/src/index.css | 40 +- frontend/src/pages/DubTab.css | 800 ------------------ frontend/src/pages/DubTab.jsx | 4 +- 10 files changed, 470 insertions(+), 943 deletions(-) create mode 100644 frontend/src/components/dub/dub.css delete mode 100644 frontend/src/pages/DubTab.css diff --git a/frontend/src/components/dub/DubFooter.jsx b/frontend/src/components/dub/DubFooter.jsx index b28e3e1b..9ff97d72 100644 --- a/frontend/src/components/dub/DubFooter.jsx +++ b/frontend/src/components/dub/DubFooter.jsx @@ -2,6 +2,15 @@ import { Check, AlertCircle } from 'lucide-react'; import { Badge } from '../../ui'; import DubFailureNotice from './DubFailureNotice'; +// Export-track toggle chips: flat pill outline, tinted by on/off/success state. +const TRACK_LABEL = + 'inline-flex items-center gap-[4px] px-[8px] py-[2px] border border-transparent rounded-[var(--chrome-radius-pill)] cursor-pointer transition-colors'; +const TRACK_ON = + 'text-[var(--chrome-fg)] border-[var(--chrome-border-strong)] bg-[var(--chrome-hover-bg)]'; +const TRACK_OFF = 'text-[var(--chrome-fg-dim)]'; +const TRACK_ON_SUCCESS = + 'text-[var(--chrome-severity-ok)] border-[color-mix(in_srgb,var(--chrome-severity-ok)_45%,transparent)] bg-[color-mix(in_srgb,var(--chrome-severity-ok)_10%,transparent)]'; + export default function DubFooter({ t, dubStep, @@ -15,7 +24,7 @@ export default function DubFooter({ translateQuality, }) { return ( -
+
{dubStep === 'done' && (
@@ -45,24 +54,33 @@ export default function DubFooter({ )} {/* Output options + Timing moved to the top of the right (transcript) section. */} {dubTracks.length > 0 && ( -
- {t('dub.export_tracks')} -