Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughAdded active and inactive tab-strip surface tokens to the shared theme for light and dark modes. Updated tab roots to use these tokens. Updated the active drop indicator to use Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the user impact, implementation, rationale, linked issue, testing, AI use, and checklist status. However, the required real-app before/after visual proof for this UI change is still missing, and manual testing is not confirmed. Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
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 |
# Conflicts: # src/renderer/src/components/tab-bar/drop-indicator.ts
|
Closing as superseded by #36561, which fixes the built-in color defaults (WCAG AA pairs, light-mode active tab and the TOC scrollbar). Thank you for this PR, it shaped the design. |
ELI5
In light mode the selected tab looked darker than the unselected ones, so the active tab appeared receded and an inactive tab looked selected. This makes the active tab read as active in both themes.
What Changed
The active tab used
color-mix(in srgb, var(--foreground) X%, var(--card))to highlight itself. In dark mode--foreground(#fafafa) is lighter than--card(#171717), so the mix lightens the active tab (correct). In light mode--foregroundis #0a0a0a and--cardis #fff (already max lightness), so the same mix darkens the active tab below the untouched-white inactive tabs (backwards). The bottom selection bar had the same problem at 60% mix.Fix (tokens only, no new colors):
main.css: theme-scoped--tab-strip-active-surface/--tab-strip-inactive-surface. In light mode the mix moves to the inactive tab (active stays pure--cardwhite); in dark mode it stays on the active tab exactly as before - same 6% magnitude, applied to the correct side per theme so active is always lighter than inactive.drop-indicator.ts: tab classes read the new tokens; the active-indicator bar usesbg-ring(STYLEGUIDE.md's documented token for active selection halos, a fixed per-theme gray) instead of the color-mix, so it can't flip direction.All three tab types (
SortableTab,EditorFileTab,BrowserTab) share these helpers, so the fix applies uniformly.Why
Per STYLEGUIDE.md, use existing tokens rather than inventing values. The bug was a color-mix formula that is only correct when
--foregroundis lighter than--card; scoping the surface tokens per theme fixes the direction without new color values.Linked Issue
Fixes #16283
Visual Proof
Validated on a static HTML mockup reproducing the exact
:root/.darktokens and Tailwind classes (before/after, both themes), rendered in-browser: light-mode active tab is now the brighter one with a subtle ring-gray underline; dark mode is visually unchanged. Real-app before/after screenshots still to attach (@BorjaLL).Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Updated
drop-indicator.test.tsassertions to the new tokens.pnpm typecheckexit 0;oxlint src/renderer/srcclean;vitest runontab-bar= 49 files / 391 tests pass.AI Disclosure
Implemented with Claude Code (Anthropic; Claude Sonnet). Root-cause analysis, the fix, and the tests were AI-generated and human-reviewed before opening.
Review
Agent skill upstream boundary
Notes
Tokens only; no component structure change. Light and dark both verified against the styleguide's surface roles.
Checklist
pnpm typecheck, lint, tests pass locally (CI covers build)Author