feat: fix themes#2089
Conversation
Greptile SummaryThis PR refactors the two application themes (
Confidence Score: 3/5The theme refactor is thorough for the 42 changed files, but deleting the .task-tab-bar CSS block removed two CSS variables still consumed by the untouched file-tabs.tsx, causing the editor file-tab strip to render with no background and no active-tab distinction. The editor file-tab strip will visually break for every user who opens the code editor because the variables it depends on were deleted without updating the file. The issue is silent at build time and only appears at runtime. src/renderer/features/tasks/editor/file-tabs.tsx needs the same bg-background-secondary / bg-background-secondary-1 migration applied to tab-bar.tsx and tab-item-shell.tsx.
|
| Filename | Overview |
|---|---|
| src/renderer/index.css | Major theme overhaul: introduces a full Radix P3 color palette for both light and dark themes, adds new semantic state tokens, and removes the .task-tab-bar CSS block whose deletion breaks file-tabs.tsx. |
| src/renderer/features/tasks/editor/file-tabs.tsx | Not changed in this PR but broken by it: still references --task-tab-background and --task-tab-active-background CSS variables that were deleted from index.css. |
| src/renderer/features/tasks/view/tab-bar/tab-item-shell.tsx | Migrated to semantic tokens; has a duplicate hover:bg-* conflict where hover:bg-background-secondary-1 is dead code superseded by hover:bg-muted. |
| src/renderer/features/tasks/editor/editor-file-tree.tsx | Migrated added/modified/deleted file status colors to semantic tokens, but renamed status still uses hardcoded text-blue-500. |
| src/renderer/features/tasks/components/dev-server-pills.tsx | Replaced hardcoded colors with semantic info tokens; base border class removed while hover:border-border-info was kept, making the hover border a no-op. |
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
src/renderer/features/tasks/view/tab-bar/tab-item-shell.tsx:59
Two conflicting `hover:bg-*` classes are present in the same string. `twMerge` (used inside `cn()`) deduplicates conflicting Tailwind utilities by keeping the last one, so `hover:bg-muted` wins and `hover:bg-background-secondary-1` is dead code. The semantic-token version should be used consistently; remove the leftover `hover:bg-muted`.
```suggestion
'group relative flex h-full flex-col bg-background-secondary hover:bg-background-secondary-1 text-sm',
```
### Issue 2 of 3
src/renderer/features/tasks/editor/editor-file-tree.tsx:114
The `renamed` file status still uses the hardcoded `text-blue-500` Tailwind class while the other three statuses (`added`, `modified`, `deleted`) were migrated to semantic tokens in this PR. It will not respond to custom-theme palette changes.
```suggestion
fileStatus === 'renamed' && 'text-foreground-info'
```
### Issue 3 of 3
src/renderer/features/tasks/components/dev-server-pills.tsx:35
`hover:border-border-info` has no effect because the base `border` width class was removed. Without a `border` (setting `border-width: 1px`), changing the border color on hover is a no-op. Either add `border` back or remove the orphaned hover class.
```suggestion
className="flex h-7 rounded-lg items-center gap-1.5 border border-transparent bg-background-info hover:bg-background-info-hover hover:border-border-info px-2 text-xs text-foreground-muted transition-colors hover:text-foreground"
```
Reviews (1): Last reviewed commit: "fix: format" | Re-trigger Greptile
No description provided.