fix: 输入框焦点样式 & Tailwind 类名拼写错误#110
Conversation
- Add focus:ring-2 focus:ring-brand-violet focus:border-transparent focus:outline-none to all text/url/password/select inputs in AIConfigPanel and WebDAVPanel to ensure visible focus feedback when alert dialogs dismiss - Fix bg-light-surfaceborder-black/[0.06] → bg-light-surface border-black/[0.06] typo (missing space) in AIConfigPanel, WebDAVPanel, GeneralPanel, RepositoryList, and AssetFilterManager — missing space caused Tailwind to treat the whole string as an invalid class, breaking background and border styles Fixes #103, #109
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughSeparated malformed Tailwind utility concatenations ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/settings/AIConfigPanel.tsx (1)
506-510:⚠️ Potential issue | 🟡 MinorSame class-concatenation bug still present in disabled-state styling (out of diff scope).
While fixing
bg-light-surfaceborder-black/[0.06], two additional missing-space bugs in this file were not addressed and continue to break utilities for the “View Default Prompt” button:
- Line 508:
dark:text-text-tertiarycursor-not-allowed— should be two classes.- Line 509:
text-gray-700hover:text-gray-900— should be two classes.Result: in disabled state the cursor is not
not-allowed, and in non-disabled state the gray text and hover color don't apply.🔧 Proposed fix
className={`flex items-center space-x-1 text-sm ${ showCustomPrompt - ? 'text-gray-400 dark:text-text-tertiarycursor-not-allowed' - : 'text-gray-700hover:text-gray-900 dark:text-text-tertiary dark:hover:text-gray-300' + ? 'text-gray-400 dark:text-text-tertiary cursor-not-allowed' + : 'text-gray-700 hover:text-gray-900 dark:text-text-tertiary dark:hover:text-gray-300' }`}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/settings/AIConfigPanel.tsx` around lines 506 - 510, The className string in the AIConfigPanel component for the "View Default Prompt" button has two concatenation bugs: when showCustomPrompt is true the classes are joined as "dark:text-text-tertiarycursor-not-allowed" and when false as "text-gray-700hover:text-gray-900", causing missing utilities; update the className construction in AIConfigPanel (the JSX using showCustomPrompt) to split those into separate classes — replace "dark:text-text-tertiarycursor-not-allowed" with "dark:text-text-tertiary cursor-not-allowed" and "text-gray-700hover:text-gray-900" with "text-gray-700 hover:text-gray-900" (preserving the existing dark: and dark:hover: classes that follow).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/components/settings/AIConfigPanel.tsx`:
- Around line 506-510: The className string in the AIConfigPanel component for
the "View Default Prompt" button has two concatenation bugs: when
showCustomPrompt is true the classes are joined as
"dark:text-text-tertiarycursor-not-allowed" and when false as
"text-gray-700hover:text-gray-900", causing missing utilities; update the
className construction in AIConfigPanel (the JSX using showCustomPrompt) to
split those into separate classes — replace
"dark:text-text-tertiarycursor-not-allowed" with "dark:text-text-tertiary
cursor-not-allowed" and "text-gray-700hover:text-gray-900" with "text-gray-700
hover:text-gray-900" (preserving the existing dark: and dark:hover: classes that
follow).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1e481992-3dbd-4942-9e1a-af1a3a48edb2
📒 Files selected for processing (5)
src/components/AssetFilterManager.tsxsrc/components/RepositoryList.tsxsrc/components/settings/AIConfigPanel.tsxsrc/components/settings/GeneralPanel.tsxsrc/components/settings/WebDAVPanel.tsx
- BackendPanel: add focus styles to the API_SECRET password input - CategoryPanel: add focus styles to 6 inputs: - Add category form: category name, icon, keywords (3 inputs) - Edit category inline form: icon, name, keywords (3 inputs) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
修复 Issue #103 和 #109 的根因:
alert()对话框消失后用户无法从视觉上确认焦点在哪bg-light-surfaceborder-black/[0.06]缺少空格,导致 Tailwind 将整个字符串当作无效类名处理,背景和边框样式失效Changes
AIConfigPanel.tsx
focus:ring-2 focus:ring-brand-violet focus:border-transparent focus:outline-noneWebDAVPanel.tsx
GeneralPanel.tsx / RepositoryList.tsx / AssetFilterManager.tsx
bg-light-surfaceborder-black/[0.06]→bg-light-surface border-black/[0.06])Test plan
Related Issues
Fixes #103, Fixes #109
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Style