Skip to content

chore: fix for bundle size#477

Merged
phodal merged 3 commits intophodal:masterfrom
unit-mesh:master
Dec 1, 2025
Merged

chore: fix for bundle size#477
phodal merged 3 commits intophodal:masterfrom
unit-mesh:master

Conversation

@phodal
Copy link
Owner

@phodal phodal commented Dec 1, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Unified UTF-8 font rendering across platforms with improved CJK character support.
  • Chores

    • Plugin rebranded to "AutoDev Next" with updated vendor contact information.
    • Reduced plugin distribution size through dependency and asset optimization.

✏️ Tip: You can customize this high-level summary in your review settings.

Renamed plugin to "AutoDev Next", updated vendor email, and revised description for clarity.
Introduce getUtf8FontFamily() for proper CJK/UTF-8 rendering on WASM using Noto Sans SC, while other platforms use system defaults. Also exclude heavy dependencies and large font assets from the IntelliJ plugin build to reduce size.
@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes implement a unified cross-platform UTF-8 font selection API via an expect/actual pattern, with WASM using Noto Sans SC and other platforms defaulting to system fonts. Plugin metadata is updated, build configurations are optimized for size, and font resolution is refactored across multiple UI components.

Changes

Cohort / File(s) Summary
Build Configuration & Optimization
mpp-idea/build.gradle.kts
Adds global dependency exclusions to remove heavy transitive dependencies (AWS SDKs, Tika, POI, PDFBox, etc.) across all configurations. Configures PrepareSandboxTask to exclude fonts, font resources, and desktop icons from plugin distribution.
Plugin Metadata
mpp-idea/src/main/resources/META-INF/plugin.xml
Updates plugin name to "AutoDev Next", changes vendor email to "h@phodal.com", and adjusts description text.
WASM Font Path
mpp-ui/build.gradle.kts
Modifies DownloadWasmFontsTask to place fonts in src/wasmJsMain/composeResources/font instead of src/commonMain/composeResources/font.
Cross-Platform UTF-8 Font API
mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.kt
mpp-ui/src/androidMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.android.kt
mpp-ui/src/iosMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.ios.kt
mpp-ui/src/jsMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.js.kt
mpp-ui/src/jvmMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.jvm.kt
mpp-ui/src/wasmJsMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.wasmJs.kt
Introduces new public composable expect function getUtf8FontFamily(): FontFamily in common module, with platform-specific implementations: WASM returns FontFamily(Font(Res.font.NotoSansSC_Regular)) for CJK support; Android, iOS, JS, and JVM return FontFamily.Default.
Font Integration
mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/agent/AgentMessageList.kt
mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/editor/DevInEditorInput.kt
Replaces platform-conditional font selection with unified getUtf8FontFamily() calls, removing old conditional logic and font resource dependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Platform-specific implementations: Verify that all 5 platform implementations (Android, iOS, JS, JVM, WASM) correctly implement the expect function with appropriate font selection logic, particularly WASM's use of NotoSansSC_Regular.
  • Build script exclusions: Confirm that global dependency exclusions do not inadvertently remove required transitive dependencies and that the PrepareSandboxTask exclusions align with plugin distribution requirements.
  • Font integration points: Ensure AgentMessageList and DevInEditorInput are calling the correct new function and that font resources are properly cleaned up.

Possibly related issues

Possibly related PRs

Poem

🐰 Across platforms hop, our fonts now agree,
WASM gets Noto Sans, others blend carefree,
Build size shrinks light, dependencies unwound,
A UTF-8 symphony, cross-platform sound! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82b8d18 and f74cbf1.

📒 Files selected for processing (11)
  • mpp-idea/build.gradle.kts (3 hunks)
  • mpp-idea/src/main/resources/META-INF/plugin.xml (1 hunks)
  • mpp-ui/build.gradle.kts (1 hunks)
  • mpp-ui/src/androidMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.android.kt (2 hunks)
  • mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/agent/AgentMessageList.kt (2 hunks)
  • mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/editor/DevInEditorInput.kt (2 hunks)
  • mpp-ui/src/commonMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.kt (2 hunks)
  • mpp-ui/src/iosMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.ios.kt (2 hunks)
  • mpp-ui/src/jsMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.js.kt (2 hunks)
  • mpp-ui/src/jvmMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.jvm.kt (2 hunks)
  • mpp-ui/src/wasmJsMain/kotlin/cc/unitmesh/devins/ui/compose/sketch/CodeFont.wasmJs.kt (1 hunks)

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

@phodal phodal merged commit ac43616 into phodal:master Dec 1, 2025
3 of 4 checks 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

Comments