Migrate to Jewel 0.34, IntelliJ IDEA 2025.3.3#925
Conversation
WalkthroughThe pull request updates the project to support IntelliJ IDEA 2025.3.3 and Jewel 0.34. Compose dependencies were upgraded from 1.9.0 to 1.10.0, with new catalog entries added for foundation, runtime, resources, UI, material3, and tooling-preview libraries. Compose dependency references across multiple build.gradle.kts files were refactored to use centralized version-catalog aliases. The compose-hot-reload plugin was removed from plugin declarations. Several Compose UI integrations were modified: focus-on-click behavior was removed from panel initialization, custom KotlinLogo icon implementation was deleted, and API signatures were updated to use key-based Icon references and language strings instead of ImageVector and MimeType parameters. Optional API opt-ins were added where needed. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt (1)
36-56:⚠️ Potential issue | 🟠 MajorGuard against
TextUnit.Unspecifiedfor placeholder size.On line 36,
iconSizedefaults tostyle.fontSize. If a style with unspecified font size is passed, lines 54–55 will propagate an invalid size intoPlaceholder, causing anIllegalArgumentExceptionduring layout. The Jetpack ComposePlaceholderAPI requires bothwidthandheightto be specified values insporem;TextUnit.Unspecifiedis not permitted.Resolve by checking if
iconSizeis unspecified and providing a fallback:Proposed fix
fun InlineIconText( text: String, key: IconKey, modifier: Modifier = Modifier, iconTint: Color = Color.Unspecified, style: TextStyle = JewelTheme.defaultTextStyle, iconSize: TextUnit = style.fontSize, textAlign: TextAlign = TextAlign.Unspecified, alternateText: String = "[icon]", ) { + val resolvedIconSize = if (iconSize.isUnspecified) 16.sp else iconSize + val parts = text.split(alternateText) @@ placeholder = Placeholder( - width = iconSize, - height = iconSize, + width = resolvedIconSize, + height = resolvedIconSize, placeholderVerticalAlign = PlaceholderVerticalAlign.TextCenter, ),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt` around lines 36 - 56, InlineIconText currently passes iconSize directly into Placeholder which can be TextUnit.Unspecified and crash; update the function to guard iconSize by detecting if iconSize == TextUnit.Unspecified (or style.fontSize is unspecified) and substitute a concrete fallback (e.g., style.fontSize.takeIf { it != TextUnit.Unspecified } ?: 16.sp or another sensible default) before building inlineContent; ensure the computed safe size variable is used for both width and height in InlineTextContent/Placeholder tied to INLINE_CONTENT_ID so Placeholder always receives a valid TextUnit.
🧹 Nitpick comments (2)
tools/idea-plugin/build.gradle.kts (1)
95-96: Use shared constants for IDEA target values to reduce drift risk.At Line 96 and Line 117, hardcoded target values are repeated. A local constant pair keeps this synchronized and easier to update.
♻️ Suggested refactor
+val targetIdeaVersion = "2025.3.3" +val targetIdeaSinceBuild = "253.31033.145" + intellijPlatform { buildSearchableOptions = false projectName = "valkyrie-plugin" pluginConfiguration { ideaVersion { // 2025.3.3 https://www.jetbrains.com/idea/download/other/ - sinceBuild = "253.31033.145" + sinceBuild = targetIdeaSinceBuild untilBuild = provider { null } } changeNotes = provider { changelog.render(Changelog.OutputType.HTML) } } @@ ides { create( type = IntelliJPlatformType.IntellijIdea, - version = "2025.3.3", + version = targetIdeaVersion, ) } }Also applies to: 117-117
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/idea-plugin/build.gradle.kts` around lines 95 - 96, Introduce shared constants for the IntelliJ target builds and replace the two hardcoded literals by referencing them: define top-level vals (e.g., ideaSinceBuild and ideaUntilBuild) in build.gradle.kts, assign the current "253.31033.145" and the matching until-build value to those constants, and then use those constants where sinceBuild and untilBuild are set (the occurrences of sinceBuild at the shown block and the other untilBuild/sinceBuild at the later occurrence around line 117) so updates only need to change the constants.README.md (1)
221-222: Clarify the 1.x compatibility range to avoid ambiguity.At Line 221,
1.0.0can be read as a single-version entry. Consider making the range explicit (e.g.,1.0.0 - 1.3.0) so users on intermediate versions don’t need to infer support.✏️ Suggested doc tweak
-| 1.0.0 | IntelliJ IDEA 2025.3, Android Studio Panda 1 | +| 1.0.0 - 1.3.0 | IntelliJ IDEA 2025.3, Android Studio Panda 1 |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 221 - 222, Update the ambiguous version row by changing the single "1.0.0" entry to an explicit compatibility range (for example "1.0.0 - 1.3.0") so it's clear which 1.x releases are supported; modify the table row containing the "1.0.0" string (and adjust the adjacent "IntelliJ IDEA 2025.3, Android Studio Panda 1" cell if needed) to reflect the chosen range format, ensuring consistency with the later "1.4.0" row.
🤖 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
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt`:
- Around line 36-56: InlineIconText currently passes iconSize directly into
Placeholder which can be TextUnit.Unspecified and crash; update the function to
guard iconSize by detecting if iconSize == TextUnit.Unspecified (or
style.fontSize is unspecified) and substitute a concrete fallback (e.g.,
style.fontSize.takeIf { it != TextUnit.Unspecified } ?: 16.sp or another
sensible default) before building inlineContent; ensure the computed safe size
variable is used for both width and height in InlineTextContent/Placeholder tied
to INLINE_CONTENT_ID so Placeholder always receives a valid TextUnit.
---
Nitpick comments:
In `@README.md`:
- Around line 221-222: Update the ambiguous version row by changing the single
"1.0.0" entry to an explicit compatibility range (for example "1.0.0 - 1.3.0")
so it's clear which 1.x releases are supported; modify the table row containing
the "1.0.0" string (and adjust the adjacent "IntelliJ IDEA 2025.3, Android
Studio Panda 1" cell if needed) to reflect the chosen range format, ensuring
consistency with the later "1.4.0" row.
In `@tools/idea-plugin/build.gradle.kts`:
- Around line 95-96: Introduce shared constants for the IntelliJ target builds
and replace the two hardcoded literals by referencing them: define top-level
vals (e.g., ideaSinceBuild and ideaUntilBuild) in build.gradle.kts, assign the
current "253.31033.145" and the matching until-build value to those constants,
and then use those constants where sinceBuild and untilBuild are set (the
occurrences of sinceBuild at the shown block and the other untilBuild/sinceBuild
at the later occurrence around line 117) so updates only need to change the
constants.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
README.mdbuild.gradle.ktsgradle/libs.versions.tomlsdk/compose/codeviewer/build.gradle.ktssdk/compose/foundation/build.gradle.ktssdk/compose/highlights-core/build.gradle.ktssdk/compose/icons/build.gradle.ktssdk/intellij/psi/imagevector/build.gradle.ktssdk/ir/compose/build.gradle.ktstools/compose-app/build.gradle.ktstools/idea-plugin/CHANGELOG.mdtools/idea-plugin/build.gradle.ktstools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ValkyrieToolWindow.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/DI.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/di/IntellijPlatformModule.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kttools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (1)
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kt
26dae5f to
816c31a
Compare
816c31a to
98f71e3
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt (1)
59-67:⚠️ Potential issue | 🔴 CriticalRemove
colorFilterparameter; usetintinstead for Jewel's Icon component.Jewel's
Iconcomposable does not accept acolorFilterparameter. Use thetintparameter directly instead. Replace the conditional logic with:Icon( modifier = Modifier.fillMaxSize(), key = key, contentDescription = null, tint = iconTint, )If you need special handling for
Color.Unspecified, it already represents "no tint" and is the default, so the conditional is unnecessary.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt` around lines 59 - 67, The Icon call in InlineIconText.kt currently passes a non-existent colorFilter parameter; replace that with the tint parameter by removing the conditional and using tint = iconTint on the Icon invocation (the Icon composable, the key argument and iconTint variable remain the same), since Color.Unspecified already denotes no tint and no extra branching is required.
🤖 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
`@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kt`:
- Around line 59-67: The Icon call in InlineIconText.kt currently passes a
non-existent colorFilter parameter; replace that with the tint parameter by
removing the conditional and using tint = iconTint on the Icon invocation (the
Icon composable, the key argument and iconTint variable remain the same), since
Color.Unspecified already denotes no tint and no extra branching is required.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: bd81fe96-d18c-473e-a002-a980b436cdb0
📒 Files selected for processing (21)
README.mdbuild.gradle.ktsgradle/libs.versions.tomlsdk/compose/codeviewer/build.gradle.ktssdk/compose/foundation/build.gradle.ktssdk/compose/highlights-core/build.gradle.ktssdk/compose/icons/build.gradle.ktssdk/intellij/psi/imagevector/build.gradle.ktssdk/ir/compose/build.gradle.ktstools/compose-app/build.gradle.ktstools/idea-plugin/CHANGELOG.mdtools/idea-plugin/build.gradle.ktstools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ValkyrieToolWindow.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/TextEditorWithImageVectorPreview.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/InlineIconText.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kttools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kttools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (1)
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/icons/KotlinLogo.kt
✅ Files skipped from review due to trivial changes (13)
- sdk/ir/compose/build.gradle.kts
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/TextEditorWithImageVectorPreview.kt
- build.gradle.kts
- sdk/compose/foundation/build.gradle.kts
- sdk/compose/icons/build.gradle.kts
- tools/idea-plugin/CHANGELOG.md
- sdk/compose/highlights-core/build.gradle.kts
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/LinkIcon.kt
- README.md
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/existingpack/ui/ChooseExistingPackFile.kt
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/ui/placeholder/ErrorPlaceholder.kt
- tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
- sdk/compose/codeviewer/build.gradle.kts
🚧 Files skipped from review as they are similar to previous changes (4)
- sdk/intellij/psi/imagevector/build.gradle.kts
- tools/compose-app/build.gradle.kts
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/jewel/highlight/CodeHighlight.kt
- gradle/libs.versions.toml
📝 Changelog
If this PR introduces user-facing changes, please update the relevant Unreleased section in changelogs: