Skip to content

Conversation

@egorikftp
Copy link
Member

@egorikftp egorikftp commented Jan 13, 2026

Screenshot 2026-01-13 at 18 16 17

@egorikftp
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

This pull request refactors the Valkyrie codebase with several key changes: it relocates the rememberCodeHighlight function from the codeviewer module to the highlights-core module, adds a new excludeCompose() Kotlin extension for Gradle dependency exclusion, and significantly restructures the settings UI screens with a component-based architecture. Multiple UI components are removed and replaced with new composables including RadioButtonGroup, DropdownSettingsRow, and CheckboxSettingsRow. The changes add comprehensive localization support via property string resources, update navigation destinations, make ValkyrieBundle public with variadic parameter support in stringResource, and reorganize several settings screen implementations into a new package structure.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description contains only an image screenshot without any textual explanation of the changes, objectives, or context. This is too minimal to meaningfully convey information about the changeset. Add a textual description explaining the migration details, such as what Settings components were migrated to Jewel, any breaking changes, or key improvements from the migration.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Migrate Settings plugin to Jewel' clearly and concisely describes the main objective of the pull request, which is migrating the Settings plugin to the Jewel UI framework.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)

17-31: Potential recomposition issue with vararg as remember key.

Using emphasisLocation (a vararg/array) directly as a remember key can cause unnecessary recompositions because arrays are compared by reference, not by content. Each call with the same values may create a new array instance, invalidating the cache.

Consider using emphasisLocation.contentHashCode() or wrapping in a stable key, or document that callers must pass a stable array reference.

♻️ Suggested fix using contentHashCode
 `@Composable`
 fun rememberCodeHighlight(
     codeBlock: String,
     isLight: Boolean,
     vararg emphasisLocation: PhraseLocation,
 ): Highlights {
-    return remember(isLight, codeBlock, emphasisLocation) {
+    return remember(isLight, codeBlock, emphasisLocation.contentHashCode()) {
         Highlights.Builder()
             .code(codeBlock)
             .language(SyntaxLanguage.KOTLIN)
             .theme(SyntaxThemes.darcula(darkMode = !isLight))
             .emphasis(*emphasisLocation)
             .build()
     }
 }
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (2)

56-68: Clarify the split button click behavior.

Both onClick and secondaryOnClick are empty lambdas, making the button purely a dropdown trigger. If this is intentional (selecting from the menu is the only interaction), consider adding a brief comment explaining this design choice. Otherwise, you may want to wire these to meaningful actions or expose them as parameters.


100-103: Replace placeholder text in preview tooltip.

The tooltip text "kek" appears to be debug/placeholder content. Consider using a more descriptive string for the preview, or remove this tooltip demonstration if it's not needed.

                         Tooltip(
                             tooltip = {
-                                Text(text = "kek")
+                                Text(text = "Help tooltip example")
                             },
                         ) {
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (2)

147-148: Consider removing trailing GroupSpacing().

The GroupSpacing() after the last Group adds unnecessary bottom padding inside the scrollable container. If this is intentional for visual consistency, consider adding a comment to clarify.


186-198: Consider using exhaustive when for better maintainability.

The else -> {} branch silently ignores any unhandled SettingsAction types. While acceptable for a preview, using an exhaustive when (or adding a comment) would make it clearer when new actions need handling.

💡 Alternative approach
     val onAction = { action: SettingsAction ->
         when (action) {
             is UpdateOutputFormat -> outputFormat = action.outputFormat
             is UpdateUseComposeColors -> useComposeColors = action.useComposeColor
             is UpdatePreviewGeneration -> generatePreview = action.generate
             is UpdateFlatPackage -> useFlatPackage = action.useFlatPackage
             is UpdateExplicitMode -> useExplicitMode = action.useExplicitMode
             is UpdateAddTrailingComma -> addTrailingComma = action.addTrailingComma
             is UpdateIndentSize -> indentSize = action.indent
             is UpdatePreviewAnnotationType -> previewAnnotationType = action.annotationType
-            else -> {}
+            // Other actions not relevant to GeneratorSettings
+            else -> Unit
         }
     }
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (1)

114-122: Consider using localized strings in preview for consistency.

The preview uses hardcoded tab names while production code uses localized resources. This is acceptable for preview purposes, but using localized strings would ensure preview matches production behavior.

♻️ Optional: Use localized tab names in preview
 private fun SettingsScreenPreview() = PreviewTheme(alignment = Alignment.TopCenter) {
     var selectedTabIndex by rememberMutableState { 0 }
-    val tabNames = listOf("General", "Generator", "Preview", "About")
+    val tabNames = listOf(
+        message("settings.tab.general"),
+        message("settings.tab.generator"),
+        message("settings.tab.preview"),
+        message("settings.tab.about"),
+    )

     Tabs(

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae2484d and 8375312.

📒 Files selected for processing (34)
  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • sdk/compose/codeviewer/api/codeviewer.api
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • sdk/compose/highlights-core/api/highlights-core.api
  • sdk/compose/highlights-core/api/highlights-core.klib.api
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/icons/PlayForward.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/GeneralSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/general/GeneralSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/InfoSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/highlight/KtCodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (10)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/icons/PlayForward.kt
  • sdk/compose/codeviewer/api/codeviewer.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/GeneralSettingsScreen.kt
🚧 Files skipped from review as they are similar to previous changes (9)
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt
  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-01-13T10:00:32.135Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 807
File: tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt:19-22
Timestamp: 2026-01-13T10:00:32.135Z
Learning: The Highlights library used in the codebase does not support XML syntax highlighting. When displaying XML content (e.g., in XmlCodeViewer), Kotlin syntax highlighting is used as a fallback workaround.

Applied to files:

  • sdk/compose/highlights-core/api/highlights-core.api
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/highlight/KtCodeViewer.kt
  • sdk/compose/highlights-core/api/highlights-core.klib.api
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
📚 Learning: 2026-01-01T18:09:41.901Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 801
File: gradle/libs.versions.toml:14-14
Timestamp: 2026-01-01T18:09:41.901Z
Learning: In the Valkyrie project (ComposeGears/Valkyrie), compose-ui-tooling-preview must use version 1.10.0 (even though runtime Compose is 1.8.2) because 1.10.0+ provides unified KMP preview annotation support required for IntelliJ IDEA 2025.3+ preview functionality.

Applied to files:

  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
🧬 Code graph analysis (8)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/InfoSettingsRow.kt (1)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (2)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/highlight/KtCodeViewer.kt (1)
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)
  • rememberCodeHighlight (17-31)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (2)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (4)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (2)
  • message (22-23)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/TopAppBar.kt (1)
  • AppBarTitle (50-61)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/general/GeneralSettingsScreen.kt (4)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (2)
  • Group (24-47)
  • GroupSpacing (49-51)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (2)
  • stringResource (14-18)
  • message (22-23)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/InfoSettingsRow.kt (1)
  • InfoSettingsRow (17-37)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/platform/CurrentProject.kt (1)
  • rememberCurrentProject (7-12)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (3)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)
  • CheckboxSettingsRow (18-42)
⏰ 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). (1)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (32)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/InfoSettingsRow.kt (2)

17-37: LGTM!

The component is well-structured:

  • Proper use of @Nls annotations for IntelliJ i18n support
  • Clean slot-based API with nullable trailing composable
  • Appropriate use of CenterVerticalRow from the SDK with weight(1f) to push trailing content to the end
  • Safe null handling with ?.invoke()

39-50: Good preview coverage.

The preview demonstrates all the component's parameters including the optional trailing slot, wrapped in PreviewTheme for proper theming context.

sdk/compose/highlights-core/api/highlights-core.api (1)

1-5: LGTM!

The API dump correctly reflects the new rememberCodeHighlight function signature. The Compose compiler-generated parameters (Composer and int) are expected for composable functions, and existing public APIs are preserved.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/highlight/KtCodeViewer.kt (2)

14-24: LGTM!

Clean and focused composable component. The implementation correctly uses Jewel's typography system for consistent editor text styling and leverages the relocated buildAnnotatedString extension from highlights-core.


26-46: LGTM!

The preview provides a useful visual test case with representative code content and emphasis highlighting.

sdk/compose/highlights-core/api/highlights-core.klib.api (1)

11-11: LGTM!

The Kotlin/Wasm ABI dump correctly reflects the new rememberCodeHighlight function, maintaining consistency with the JVM API surface.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt (2)

1-1: LGTM!

Package restructuring to add the .ui subpackage aligns with the broader UI reorganization in this PR.


226-233: LGTM!

Changing visibility from internal to private is appropriate for preview functions, as they are only used for design-time visualization within this file.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (2)

15-15: LGTM!

The rename to CheckboxSettingsRow with proper import of Jewel's CheckboxRow resolves the previous naming collision. The wrapper adds value by including optional InfoText support.

Also applies to: 18-42


44-55: LGTM!

Preview function correctly renamed and visibility changed to private, consistent with the pattern across other files in this PR.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (2)

24-47: LGTM!

The extended API with startComponent and itemSpacing parameters improves flexibility while maintaining backward compatibility via defaults. The GroupHeader properly forwards the startComponent for rendering icons or other content alongside the header text.


53-75: LGTM!

Preview function properly demonstrates the new startComponent feature with an icon and uses the renamed CheckboxSettingsRow component, consistent with the migration pattern.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)

33-80: Consider potential recomposition overhead from position tracking.

The use of onGloballyPositioned with mutable state for offset and offsetInRoot will trigger recomposition whenever positions change. For settings screens where layout is typically static, this is likely fine. However, if this component is used in scrolling contexts or dynamic layouts, the repeated recompositions could impact performance.

If this becomes an issue, consider using Modifier.onPlaced or caching the offset calculation to avoid unnecessary recompositions.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (5)

1-44: LGTM!

Imports are well-organized and aligned with the Jewel migration. The separation of Jewel UI components and Valkyrie UI kit components is clear.


46-54: LGTM!

The navigation destination setup with explicit viewModelStoreOwner from navController() is correct for sharing the ViewModel across settings tabs.


90-121: LGTM!

The output format selection with tooltips containing code previews is well-implemented. The theme-aware syntax highlighting using !JewelTheme.isDark is correct.


152-172: LGTM!

The code hint strings clearly illustrate the difference between the two output formats, helping users understand their choice.


174-212: LGTM!

The preview is well-structured with proper state management using rememberMutableState. Making it private is appropriate since it's only used for development previews.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (3)

1-16: LGTM!

Imports are well-organized and the ExperimentalFoundationApi opt-in is appropriately included for Jewel's Tooltip component which relies on Compose Foundation's experimental tooltip APIs.


43-54: LGTM!

The preview is appropriately private and uses PreviewTheme for consistent styling. It demonstrates the component's usage clearly.


18-41: Approved: Well-structured composable with good accessibility support.

The component follows Compose conventions correctly with the modifier parameter positioned appropriately. The "accessibility.help" string resource is properly defined in the resource bundle, and the icon's content description is correctly configured for accessibility and i18n support.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)

16-17: LGTM! Well-structured API for both composable and non-composable contexts.

The changes correctly introduce:

  1. Vararg parameter support in stringResource for formatted messages
  2. Public visibility for ValkyrieBundle enabling direct message() calls in non-composable contexts (like remember blocks and click handlers)

The spread operator usage (*params) is correct for forwarding varargs.

Also applies to: 20-23

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/about/AboutSettingsScreen.kt (3)

30-32: LGTM!

Navigation destination declaration is consistent with the PR's migration pattern.


42-46: Good accessibility improvement.

Replacing contentDescription = null with a localized string resource improves screen reader support.


74-78: LGTM!

Preview visibility appropriately changed to private since it's only used for internal tooling.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/general/GeneralSettingsScreen.kt (4)

37-38: Correct usage of both localization APIs.

The import of ValkyrieBundle.message for non-composable contexts and stringResource for composable contexts demonstrates proper understanding of the API design.


77-84: Verify the mode fallback logic.

The initialMode is captured once on first composition. If mode becomes Unspecified, the UI falls back to showing initialMode. This works correctly for preserving display during transitions, but consider if Unspecified arriving later (e.g., after settings reset) should show the initial mode or a dedicated "unspecified" label.


133-144: Correct use of message() in non-composable lambda.

The onClick lambda is not a composable context, so using ValkyrieBundle.message() directly instead of stringResource() is the correct approach here.


151-155: Safe navigation handling.

The null-safe call on navController.parent ensures graceful handling when there's no parent controller.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (3)

25-26: LGTM!

Import paths correctly updated to reference the new subpackage locations for AboutSettingsScreen and GeneralSettingsScreen.


42-49: Correct use of message() in non-composable remember block.

Since remember lambdas execute outside composable context, using ValkyrieBundle.message() is appropriate here rather than stringResource().


54-57: Correct use of stringResource() in composable context.

The AppBarTitle call is within a composable scope, so stringResource() is the appropriate API choice.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
@tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt:
- Around line 18-42: Remove the obsolete CheckboxRow implementation
(CheckboxRow.kt) that conflicts with the new component; delete the
CheckboxRow.kt file entirely and update any remaining references to use the new
CheckboxSettingsRow and the Jewel CheckboxRow by ensuring import
org.jetbrains.jewel.ui.component.CheckboxRow is present in CheckboxSettingsRow;
verify no other files define or call the old CheckboxRow symbol so compilation
uses the imported Jewel CheckboxRow and the new CheckboxSettingsRow exclusively.
🧹 Nitpick comments (5)
tools/idea-plugin/build.gradle.kts (1)

19-32: Consider cleaning up or documenting commented exclusions.

The commented-out exclusions (lines 21-31) appear to be leftover references. If they serve as documentation for potential future exclusions, consider adding a brief comment explaining their purpose. Otherwise, removing dead commented code improves readability.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)

34-37: Consider localizing the content description.

The hardcoded "Help" string could be extracted to Valkyrie.properties for consistency with other UI strings, especially if localization is a future consideration.

♻️ Suggested change
             Icon(
                 key = AllIconsKeys.General.ContextHelp,
-                contentDescription = "Help",
+                contentDescription = stringResource("accessibility.help"),
             )
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)

33-33: Clarify or remove the @Suppress("UNUSED_PARAMETER") annotation.

All parameters appear to be used in the function body. If this suppress was added for a specific reason (e.g., menuContent lambda parameter naming), consider adding a comment explaining why, or remove it if it's no longer needed.

sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)

23-23: Consider the stability of vararg in remember keys.

Using emphasisLocation (a vararg/array) as a remember key works correctly because arrays use reference equality. However, if callers recreate arrays on each recomposition, this could cause unnecessary recomputations. This is likely fine for the current use cases where emphasis locations are typically stable.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (1)

56-56: Document which experimental API requires the opt-in.

The @OptIn(ExperimentalFoundationApi::class) annotation is added but it's not immediately clear which component requires it. Consider adding a brief comment indicating this is for Tooltip (used in RadioButtonTooltipRow) or another specific API to help future maintainers understand the dependency.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 308ee55 and ae2484d.

📒 Files selected for processing (30)
  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • sdk/compose/codeviewer/api/codeviewer.api
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • sdk/compose/highlights-core/api/highlights-core.api
  • sdk/compose/highlights-core/api/highlights-core.klib.api
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • tools/idea-plugin/build.gradle.kts
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/AboutSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt
  • tools/idea-plugin/src/main/resources/messages/Valkyrie.properties
💤 Files with no reviewable changes (8)
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SwitchOption.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/OutputFormatSection.kt
  • sdk/compose/codeviewer/api/codeviewer.klib.api
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/Common.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/IndentSizeSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/PreviewAnnotationSection.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/SelectableCard.kt
  • sdk/compose/codeviewer/api/codeviewer.api
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2026-01-13T10:00:23.462Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 807
File: tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt:19-22
Timestamp: 2026-01-13T10:00:23.462Z
Learning: The Highlights library used in the codebase does not support XML syntax highlighting. When displaying XML content (e.g., in XmlCodeViewer), Kotlin syntax highlighting is used as a fallback workaround.

Applied to files:

  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • sdk/compose/highlights-core/api/highlights-core.api
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
  • sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt
  • sdk/compose/highlights-core/api/highlights-core.klib.api
📚 Learning: 2025-10-21T20:55:27.073Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 651
File: tools/idea-plugin/build.gradle.kts:147-175
Timestamp: 2025-10-21T20:55:27.073Z
Learning: In Gradle Kotlin DSL (.gradle.kts) scripts, the types `org.gradle.api.artifacts.ArtifactCollection` and `org.gradle.api.artifacts.component.ModuleComponentIdentifier` are implicitly available and do not require explicit import statements.

Applied to files:

  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • tools/idea-plugin/build.gradle.kts
📚 Learning: 2026-01-01T18:09:41.901Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 801
File: gradle/libs.versions.toml:14-14
Timestamp: 2026-01-01T18:09:41.901Z
Learning: In the Valkyrie project (ComposeGears/Valkyrie), compose-ui-tooling-preview must use version 1.10.0 (even though runtime Compose is 1.8.2) because 1.10.0+ provides unified KMP preview annotation support required for IntelliJ IDEA 2025.3+ preview functionality.

Applied to files:

  • build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt
  • sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt
  • tools/idea-plugin/build.gradle.kts
📚 Learning: 2025-12-07T20:07:49.753Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 750
File: tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/internal/task/GenerateImageVectorsTask.kt:71-85
Timestamp: 2025-12-07T20:07:49.753Z
Learning: In the Valkyrie Gradle plugin (Kotlin), the `useFlatPackage` flag in `IconPackExtension` is only applicable when nested packs are configured. For single icon packs (without nested packs), the flag is intentionally not propagated to `ImageVectorGeneratorConfig` as there is no package hierarchy to flatten.

Applied to files:

  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt
  • tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt
🧬 Code graph analysis (8)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (1)
  • CheckboxRow (17-41)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (2)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (3)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)
  • CheckboxSettingsRow (18-42)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (2)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/theme/Theme.kt (1)
  • PreviewTheme (51-74)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/tooling/PreviewTheme.kt (1)
  • PreviewTheme (12-25)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)
sdk/compose/foundation/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/foundation/layout/Row.kt (1)
  • CenterVerticalRow (10-20)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (1)
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)
  • rememberCodeHighlight (17-31)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (8)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (2)
  • Group (21-39)
  • GroupSpacing (41-43)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/ValkyrieStrings.kt (1)
  • stringResource (14-18)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (1)
  • DropdownSettingsRow (34-80)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt (1)
  • RadioButtonGroup (21-38)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (1)
  • RadioButtonTooltipRow (17-40)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (1)
  • KtCodeViewer (14-24)
sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)
  • rememberCodeHighlight (17-31)
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt (1)
  • PreviewAnnotationSection (30-84)
⏰ 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). (1)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (35)
build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/extension/ModuleDependency.kt (1)

1-11: LGTM!

Clean extraction of the excludeCompose() helper to a shared convention module. This promotes reusability across multiple build scripts that may need the same Compose exclusions.

tools/idea-plugin/build.gradle.kts (2)

1-1: LGTM!

Correctly imports the extracted excludeCompose extension from the shared convention module.


55-58: LGTM!

The excludeCompose() extension is correctly applied to the foundation dependency, maintaining the same exclusion behavior as before while benefiting from the shared implementation.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxRow.kt (1)

43-54: LGTM!

The visibility change from internal to private for the preview function is appropriate. Preview composables are typically only used within their containing file for design-time rendering and don't need broader visibility.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ui/PreviewBgSection.kt (2)

1-1: LGTM!

Package reorganization to ...tabs.preview.ui improves module structure by grouping UI components in a dedicated subpackage.


224-232: LGTM!

Visibility narrowed to private for the preview function, consistent with the PR-wide pattern.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/SettingsScreen.kt (1)

110-121: LGTM!

Visibility narrowed to private for the preview function, consistent with the PR-wide pattern of restricting preview composables to file scope.

sdk/compose/codeviewer/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/codeviewer/CodeViewer.kt (1)

12-12: LGTM!

Import path updated to source rememberCodeHighlight from the new highlights.core module location. This aligns with the PR's consolidation of highlighting utilities.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/imagevectortoxml/conversion/ui/XmlCodeViewer.kt (1)

11-11: LGTM!

Import path updated to source rememberCodeHighlight from the new highlights.core module, consistent with the codebase-wide migration of this API.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/AboutSettingsScreen.kt (1)

74-78: LGTM!

Narrowing the preview function visibility from internal to private is appropriate since it's only used for IDE previews within this file. This aligns with the consistent visibility changes across other settings screen previews in this PR.

tools/idea-plugin/src/main/resources/messages/Valkyrie.properties (3)

28-29: LGTM!

New settings group keys are well-structured and follow the existing naming conventions.


37-37: LGTM!

The wording change from "Handle" to "Use" is clearer and more user-friendly.


43-45: LGTM!

New preview type options are appropriately named and support the AndroidX vs JetBrains preview annotation selection feature.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonTooltipRow.kt (2)

17-40: LGTM!

The composable is well-structured with proper parameter ordering following Compose conventions. The @OptIn(ExperimentalFoundationApi::class) is required for the Jewel Tooltip component.


42-53: LGTM!

Preview function is appropriately private and demonstrates the component usage clearly.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/RadioButtonGroup.kt (2)

21-38: LGTM!

Well-designed grouping component with appropriate use of @Nls annotation for IntelliJ plugin NLS compliance. The nested layout with proper indentation (16.dp start padding) creates clear visual hierarchy for grouped radio options.


40-60: LGTM!

The preview effectively demonstrates interactive state management with rememberMutableState, making it useful for visual testing during development.

sdk/compose/highlights-core/api/highlights-core.klib.api (1)

11-11: LGTM!

The rememberCodeHighlight function is appropriately added to the highlights-core public API. Centralizing this composable in the highlights-core module improves modularity by separating the highlighting concerns from the code viewer presentation layer.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/DropdownSettingsRow.kt (3)

56-68: Empty onClick and secondaryOnClick handlers may confuse users.

The OutlinedSplitButton has empty click handlers, which means clicking the button text does nothing—only the dropdown arrow works. If this is intentional (dropdown-only behavior), consider adding a brief comment explaining this design choice for maintainability.


44-77: LGTM on the offset calculation logic.

The approach of using onGloballyPositioned to align the InfoText with the split button is a reasonable solution for dynamic alignment. The density conversion and relative offset calculation are correctly implemented.


82-115: Preview implementation looks good.

The preview demonstrates the component's functionality well, including the dropdown menu with tooltip integration.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/Group.kt (1)

47-58: LGTM on the component migration and visibility change.

The switch from CheckboxRow to CheckboxSettingsRow aligns with the new settings UI components, and narrowing the preview visibility to private is consistent with the pattern across this PR.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/creation/common/util/IconPackTooltipContent.kt (1)

8-8: LGTM on the import path update.

The import change correctly reflects the relocation of rememberCodeHighlight to the highlights-core module.

sdk/compose/highlights-core/api/highlights-core.api (1)

4-4: LGTM on the public API addition.

The new rememberCodeHighlight function is correctly exposed in the public API surface, enabling consistent code highlighting across modules.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/hightlight/KtCodeViewer.kt (2)

14-24: LGTM on the KtCodeViewer implementation.

Clean and focused component that renders highlighted code using Jewel's typography and the highlights library.


26-46: Preview demonstrates the component well.

The preview provides a good example of how to use KtCodeViewer with rememberCodeHighlight.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/preview/ImageVectorPreviewSettingsScreen.kt (2)

21-22: LGTM on the component migration.

The switch to CheckboxSettingsRow and the addition of PreviewBgSection import align with the settings UI migration to Jewel components.

Also applies to: 47-58


72-72: LGTM on the visibility change.

Narrowing the preview function visibility to private is consistent with the pattern across this PR.

sdk/compose/highlights-core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/compose/highlights/core/Common.kt (1)

17-31: LGTM on the new rememberCodeHighlight composable.

The implementation correctly uses remember with appropriate keys. The centralization of this function in the highlights-core module is a good architectural decision for reuse across the codebase.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/uikit/CheckboxSettingsRow.kt (1)

44-55: LGTM!

The preview demonstrates interactive state management with rememberMutableState and covers both the checkbox and info text rendering.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/ui/PreviewAnnotationSection.kt (2)

30-84: LGTM!

The component is well-structured with:

  • Clean separation between the main toggle and conditional radio group
  • Appropriate animation combinations (expand + fade)
  • Consistent tooltip pattern using KtCodeViewer with theme-aware highlighting

86-104: LGTM!

The hint strings correctly showcase the import difference between AndroidX (androidx.compose.ui.tooling.preview.Preview) and JetBrains Desktop (androidx.compose.desktop.ui.tooling.preview.Preview) preview annotations.

tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/settings/tabs/generator/GeneratorSettingsScreen.kt (3)

63-149: LGTM!

The UI is well-organized with:

  • Logical grouping of code style vs. ImageVector generation settings
  • Clean use of VerticallyScrollableContainer for overflow handling
  • Proper wiring of all settings to their respective SettingsAction callbacks
  • Consistent use of the new UI components (CheckboxSettingsRow, DropdownSettingsRow, RadioButtonGroup)

152-172: LGTM!

The hint strings clearly illustrate the difference between the backing property pattern (with null check and private field) and the lazy delegate pattern, helping users understand the output format options.


174-212: LGTM!

The preview function provides comprehensive interactive testing with:

  • Individual rememberMutableState for each setting
  • Complete onAction handler covering all relevant SettingsAction types
  • Proper reconstruction of GeneratorSettings from local state

This allows for full UI interaction testing in preview mode.

@egorikftp egorikftp force-pushed the task/jewel_migration branch 4 times, most recently from 6c32147 to 8375312 Compare January 14, 2026 20:42
@egorikftp
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@egorikftp egorikftp force-pushed the task/jewel_migration branch from 8375312 to 60b5246 Compare January 14, 2026 20:49
@egorikftp egorikftp force-pushed the task/jewel_migration branch from 60b5246 to a6648b4 Compare January 14, 2026 20:51
@egorikftp egorikftp merged commit 9df2012 into feature/idea/jewel-migration Jan 15, 2026
3 checks passed
@egorikftp egorikftp deleted the task/jewel_migration branch January 15, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants