Skip to content

feat: fix themes#2089

Merged
Davidknp merged 7 commits into
mainfrom
david/eng-1277-fix-light-mode-theme
May 18, 2026
Merged

feat: fix themes#2089
Davidknp merged 7 commits into
mainfrom
david/eng-1277-fix-light-mode-theme

Conversation

@Davidknp
Copy link
Copy Markdown
Collaborator

No description provided.

@Davidknp Davidknp marked this pull request as ready for review May 18, 2026 15:38
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Greptile Summary

This PR refactors the two application themes (emlight / emdark) from inline color(display-p3 …) values to a structured Radix-style palette of named variables (neutral, red, green, blue, yellow, etc.), then maps those palette entries to semantic-state tokens (foreground-success, background-warning, foreground-info, …). Component files across 41+ files are updated to replace hardcoded Tailwind color utilities with the new semantic tokens.

  • Palette + semantic layer (index.css): Introduces ~200 new palette variables per theme and ~20 new state tokens; removes the .task-tab-bar component block and its associated diff-glyph classes.
  • Component migrations: 40+ components swap hardcoded Tailwind palette classes for semantic counterparts, enabling all colour states to respond correctly to theme changes.
  • Incomplete migration: file-tabs.tsx (not changed in this PR) still references the two CSS variables deleted with .task-tab-bar, breaking the editor file-tab strip's background and active-tab styling.

Confidence Score: 3/5

The 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.

Important Files Changed

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

Comment thread src/renderer/features/tasks/view/tab-bar/tab-item-shell.tsx
Comment thread src/renderer/features/tasks/editor/editor-file-tree.tsx
Comment thread src/renderer/features/tasks/components/dev-server-pills.tsx
@Davidknp Davidknp merged commit 3147928 into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant