From 8f7b242610aeaa5dde6dd87f72da3b3bf1d9fefb Mon Sep 17 00:00:00 2001 From: Palash Debnath Date: Wed, 1 Jul 2026 22:06:56 +0530 Subject: [PATCH] fix(theme): remove stray token-border frames + make accent family theme-track (#864) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task 1 — physically remove the token-based structural border utilities that kept rendering stray frames (history panels, cards, rows, settings) whenever a `--*-border` token didn't resolve transparent (theme re-declare, or bare `border` = currentColor under Tailwind v4). Converted every `border[-trbl]-[var(--chrome-border…)]` / `[var(--color-border…)]` (83 occurrences across 32 components/pages) to `border-transparent` — keeps the 1px box (no layout shift, matches the badge.tsx convention), drops the frame, and active/selected state stays visible via the existing bg-tint/text cues. Also converted button.tsx's `border-border`/`border-input` variants and Panel's header divider. Kept: focus-visible rings, aria-invalid, dashed drop-zones, and the waveform/segment editor. Strengthened tests/test_no_literal_borders.py with `test_no_token_border_utilities_in_jsx` so a reintroduced token border fails CI (allowlists the editor + shadcn form-control primitives). Task 2 — aliased the accent family in the base :root to the themed brand token (`--chrome-accent: var(--color-brand)`, `-bg`/`-border` via color-mix), so donate/support/commercial CTAs, active tabs, .btn-primary, status pills and GoalBar/Pip track the active theme instead of the fixed pink. Replaced the hardcoded `#d3869b`/`#f3a5b6`/`rgba(243,165,182,…)` pinks and the DONATE_HUE constant in SupportPage.jsx with `var(--color-brand)` tints. Co-authored-by: mergetest Co-authored-by: Claude Opus 4.8 (1M context) --- frontend/src/components/BatchAddDialog.jsx | 2 +- frontend/src/components/CompareModal.jsx | 2 +- frontend/src/components/ErrorBoundary.jsx | 2 +- frontend/src/components/ExportModal.jsx | 10 ++-- frontend/src/components/GlossaryPanel.jsx | 4 +- .../src/components/KeyboardCheatsheet.jsx | 4 +- frontend/src/components/MultiLangPicker.jsx | 6 +- frontend/src/components/VoicePreview.jsx | 6 +- frontend/src/components/WorkspaceVoices.jsx | 4 +- frontend/src/components/clone/ActionBar.jsx | 2 +- .../components/clone/DesignMethodPanel.jsx | 6 +- frontend/src/components/clone/ScriptPanel.jsx | 10 ++-- frontend/src/components/dub/DubFooter.jsx | 7 +-- frontend/src/components/dub/DubLeftColumn.jsx | 16 +++-- .../src/components/dub/DubRightColumn.jsx | 4 +- frontend/src/components/dub/FooterBtn.jsx | 5 +- frontend/src/components/dub/IdleSkeleton.jsx | 4 +- .../src/components/gallery/ArchetypesZone.jsx | 12 ++-- .../src/components/gallery/ImportsZone.jsx | 4 +- .../components/profile/ProfileActivity.jsx | 2 +- .../components/settings/SettingsSearch.jsx | 2 +- .../components/settings/SettingsSidebar.jsx | 2 +- .../settings/primitives/Collapsible.jsx | 4 +- .../settings/primitives/SettingRow.jsx | 2 +- .../settings/primitives/SettingsInput.jsx | 2 +- .../settings/primitives/SettingsSection.jsx | 4 +- frontend/src/components/ui/button.tsx | 10 ++-- frontend/src/index.css | 12 +++- frontend/src/pages/CloneDesignTab.jsx | 2 +- frontend/src/pages/Launchpad.jsx | 4 +- frontend/src/pages/Projects.jsx | 2 +- frontend/src/pages/SupportPage.jsx | 12 ++-- frontend/src/ui/Panel.jsx | 8 +-- frontend/src/ui/Tabs.jsx | 4 +- tests/test_no_literal_borders.py | 59 +++++++++++++++++-- 35 files changed, 146 insertions(+), 95 deletions(-) diff --git a/frontend/src/components/BatchAddDialog.jsx b/frontend/src/components/BatchAddDialog.jsx index 78b843d9..2bab2904 100644 --- a/frontend/src/components/BatchAddDialog.jsx +++ b/frontend/src/components/BatchAddDialog.jsx @@ -91,7 +91,7 @@ export default function BatchAddDialog({ className={`flex cursor-pointer flex-col items-center justify-center gap-[6px] rounded-[10px] border-2 border-dashed px-4 py-7 text-[0.82rem] transition-all hover:border-[var(--chrome-accent)] hover:bg-white/[0.02] hover:text-[var(--chrome-fg)] ${ dragOver ? 'border-[var(--chrome-accent)] bg-white/[0.02] text-[var(--chrome-fg)]' - : 'border-[var(--chrome-border)] text-[var(--chrome-fg-muted)]' + : 'border-transparent text-[var(--chrome-fg-muted)]' }`} onDragOver={(e) => { e.preventDefault(); diff --git a/frontend/src/components/CompareModal.jsx b/frontend/src/components/CompareModal.jsx index be6c1976..fe47b120 100644 --- a/frontend/src/components/CompareModal.jsx +++ b/frontend/src/components/CompareModal.jsx @@ -128,7 +128,7 @@ export default function CompareModal({