-
Notifications
You must be signed in to change notification settings - Fork 1
fix(mpp-idea): replace Material Icons with local IdeaComposeIcons #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fix NoClassDefFoundError for androidx/compose/material/icons/Icons in IntelliJ IDEA Compose environment. The mpp-ui module uses Material Icons which are not available in IntelliJ's Jewel UI environment. This fix creates a local icon provider (IdeaComposeIcons) that defines icons using ImageVector paths, avoiding the dependency on Material Icons. Icons provided: - Settings (gear/cog) - Build (wrench) - Error (circle with exclamation) - CheckCircle (circle with checkmark)
WalkthroughIntroduces a new custom icon set for IntelliJ IDEA Compose UI by creating Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review completed. 1 suggestions posted.
Comment augment review to trigger a new review at any time.
| } | ||
|
|
||
| /** | ||
| * Error icon (circle with X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KDoc says "Error icon (circle with X)" but the vector draws an exclamation mark inside a circle; consider updating the comment to match the icon.
🤖 Was this useful? React with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.kt (1)
117-151: Nit: KDoc forErroricon doesn’t match actual glyphThe KDoc says “Error icon (circle with X)”, but the path defines a circle with an exclamation mark (
!). Consider updating the comment (or the path) so the description matches the actual icon.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentApp.kt(4 hunks)mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.kt(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
Use
expect/actualfor platform-specific code in KMP projects (e.g., file I/O on JVM/JS/Wasm)
Files:
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.ktmpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentApp.kt
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: phodal/auto-dev-sketch PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-30T02:30:49.805Z
Learning: Applies to **/src/{androidMain,desktopMain}/**/*.kt : For Compose (Desktop/Android), use `AutoDevColors` from `cc.unitmesh.devins.ui.compose.theme` or `MaterialTheme.colorScheme`
📚 Learning: 2025-11-30T02:30:49.805Z
Learnt from: CR
Repo: phodal/auto-dev-sketch PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-30T02:30:49.805Z
Learning: Applies to **/src/{androidMain,desktopMain}/**/*.kt : For Compose (Desktop/Android), use `AutoDevColors` from `cc.unitmesh.devins.ui.compose.theme` or `MaterialTheme.colorScheme`
Applied to files:
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.ktmpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentApp.kt
📚 Learning: 2025-11-30T02:30:49.805Z
Learnt from: CR
Repo: phodal/auto-dev-sketch PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-30T02:30:49.805Z
Learning: Applies to {mpp-ui/src/jsMain/typescript/**/*.{ts,tsx},**/src/{androidMain,desktopMain}/**/*.kt} : DO NOT hardcode colors (e.g., `Color(0xFF...)` or `#hex`). Always use design tokens for consistency across platforms
Applied to files:
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentApp.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build (223)
- GitHub Check: Build (241)
🔇 Additional comments (2)
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaAgentApp.kt (1)
283-307: Icon usages correctly migrated toIdeaComposeIconsAll four icon call sites now consistently use
IdeaComposeIconsand continue to rely on Jewel/AutoDev color tokens for tinting. This cleanly removes the Material Icons dependency from this screen without changing behavior.Also applies to: 350-355, 388-393, 460-469
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.kt (1)
17-184: Local ImageVector icons successfully decouple from Material Icons
IdeaComposeIconsdefines four lazily-initialized 24dpImageVectoricons (Settings, Build, Error, CheckCircle) with inline paths, removing any runtime dependency onandroidx.compose.material.icons. This aligns with the IntelliJ/Jewel environment and eliminates theNoClassDefFoundError. All previous references toAutoDevComposeIconsand Material Icons have been removed from the codebase.
Problem
The IntelliJ plugin was crashing with:
Root Cause
The
mpp-uimodule'sAutoDevComposeIconsusesandroidx.compose.material.icons.Icons(Material Icons), which is available for Android/Multiplatform but not in IntelliJ's Compose environment (Jewel UI).Solution
Created a local icon provider
IdeaComposeIconsinmpp-ideathat defines icons usingImageVector.Builderwith path-based vector graphics, avoiding the dependency on Material Icons.Changes
Created
IdeaComposeIcons.kt- A new icon provider that usesImageVector.Builderwith paths:Settings- gear/cog iconBuild- wrench iconError- circle with exclamation markCheckCircle- circle with checkmarkUpdated
IdeaAgentApp.kt:AutoDevComposeIconsAutoDevComposeIcons.XtoIdeaComposeIcons.XTesting
ImageVectorpaths which work with Jewel'sIconcomposablePull Request opened by Augment Code with guidance from the PR author
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.