Skip to content

chore: update Mantine to 9.1.0#2921

Merged
davydkov merged 1 commit into
mainfrom
cranky-khorana-efc06c
Apr 25, 2026
Merged

chore: update Mantine to 9.1.0#2921
davydkov merged 1 commit into
mainfrom
cranky-khorana-efc06c

Conversation

@davydkov

Copy link
Copy Markdown
Member

Summary

  • Bump pnpm mantine catalog from 8.3.18 to 9.1.0 (latest major).
  • Adapt three Mantine 9 breaking changes:
    • SegmentedControl no longer accepts component — drop redundant component={m.div} (the <m.div> wrapper already provides motion).
    • useTree's return type no longer exposes setHoveredNode — drop the tree.setHoveredNode = noop workaround.
    • useMutationObserver(cb, opts, target) 3-arg form moved to its own hook useMutationObserverTarget in v9.
  • React 19.2.4 already meets v9's >= 19.2 requirement; no @mantine/form usage; no Spoiler.initialState or positionDependencies to migrate.
  • Visible behavior change: the light variant of Buttons / Alerts / ActionIcons now renders with solid colors instead of transparency. Adopting v9 defaults rather than opting back in via v8CssVariablesResolver.

Test plan

  • pnpm typecheck — clean
  • pnpm test --no-typecheck — 2338 tests pass (225 files)
  • pnpm build — clean
  • Dev server smoke-tested: projects overview, diagram view, NotFound page (Alert + Button with variant="light") all render without console errors

🤖 Generated with Claude Code

Bump catalog from 8.3.18 to 9.1.0 and adapt to breaking API changes:
- Drop redundant `component={m.div}` from `SegmentedControl` (already
  wrapped in `<m.div>`) — prop removed in v9.
- Remove `tree.setHoveredNode = noop` workaround — property is no longer
  on `UseTreeReturnType` in v9.
- Switch the 3-arg `useMutationObserver(cb, opts, target)` to
  `useMutationObserverTarget` (target moved to its own hook in v9).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Apr 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c0f7e65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@likec4/diagram Patch
@likec4/style-preset Patch
@likec4/core Patch
likec4 Patch
@likec4/playground Patch
@likec4/spa Patch
@likec4/react Patch
@likec4/vscode-preview Patch
@likec4/styles Patch
@likec4/config Patch
@likec4/generators Patch
@likec4/language-server Patch
@likec4/language-services Patch
@likec4/layouts Patch
@likec4/leanix-bridge Patch
@likec4/mcp Patch
@likec4/vite-plugin Patch
likec4-vscode Patch
@likec4/docs-astro Patch
@likec4/lsp Patch
@likec4/log Patch
@likec4/tsconfig Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR upgrades Mantine from version 8.3.18 to 9.1.0 across the workspace and removes several deprecated API overrides: SegmentedControl component wrappers and Tree hover handlers that are no longer necessary, while also migrating a MutationObserver hook to its updated equivalent.

Changes

Cohort / File(s) Summary
Mantine Version Upgrade
.changeset/update-mantine-to-9.md, pnpm-workspace.yaml
Bumps Mantine packages to 9.1.0 and documents changes to light variants of Buttons, Alerts, and ActionIcons switching from transparent to solid colors.
SegmentedControl Component Override Removal
packages/diagram/src/navigationpanel/comparepanel/LayoutTypeSwitcher.tsx, packages/diagram/src/navigationpanel/walkthrough/DynamicViewControls.tsx
Removes explicit component={m.div} override from SegmentedControl, allowing it to use default internal rendering.
Tree Hover Handler Removal
packages/diagram/src/overlays/element-details/TabPanelDeployments.tsx, packages/diagram/src/overlays/element-details/TabPanelStructure.tsx, packages/diagram/src/overlays/relationships-browser/SelectElement.tsx, packages/diagram/src/search/components/ElementsColumn.tsx, packages/likec4-spa/src/components/sidebar/DiagramsTree.tsx
Removes no-op setHoveredNode function assignments from Tree instances, reverting to default hover behavior.
MutationObserver Hook Migration
packages/diagram/src/shadowroot/styles.css.ts
Replaces useMutationObserver with useMutationObserverTarget hook while maintaining the same observation configuration and color scheme update logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: upgrading Mantine to version 9.1.0, which is the primary focus of the entire changeset.
Description check ✅ Passed The description is comprehensive and complete, covering the summary, specific breaking changes addressed, test results, and a clear explanation of the migration approach taken.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cranky-khorana-efc06c

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.changeset/update-mantine-to-9.md (2)

1-8: Consider minor bumps given the visible UI change.

The changeset body itself documents a user-visible behavior change for Button/Alert/ActionIcon variant="light" (transparent → solid). For published packages whose consumers render these components (notably @likec4/diagram and likec4), a minor bump communicates that more accurately than patch. @likec4/core and @likec4/style-preset may stay patch if they don't surface the change directly.

Proposed change
 ---
-'@likec4/diagram': patch
+'@likec4/diagram': minor
 '@likec4/style-preset': patch
 '@likec4/core': patch
-'likec4': patch
+'likec4': minor
 ---
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/update-mantine-to-9.md around lines 1 - 8, Update the changeset
so package bump types reflect the visible UI change: change the entries for
'@likec4/diagram' and 'likec4' from "patch" to "minor" to indicate a
user-visible behavior change in Button/Alert/ActionIcon variant="light", while
leaving '@likec4/core' and '@likec4/style-preset' as "patch" if they do not
directly surface the component behavior.

8-8: Optional: tighten wording.

Minor copy nit — "Buttons, Alerts, and ActionIcons" reads a bit oddly when referring to component names. Consider phrasing in terms of the variant="light" prop on the three components.

Proposed wording
-Update Mantine to 9.1.0. The `light` variant of Buttons, Alerts, and ActionIcons now uses solid colors instead of transparency.
+Update Mantine to 9.1.0. The `variant="light"` of `Button`, `Alert`, and `ActionIcon` now uses solid colors instead of transparency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/update-mantine-to-9.md at line 8, Reword the sentence to
reference the variant prop instead of listing component names awkwardly: change
the line to say that the variant="light" prop on the Button, Alert, and
ActionIcon components now uses solid colors instead of transparency (use the
singular component names Button, Alert, ActionIcon and the exact prop
variant="light" to make the meaning clear).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.changeset/update-mantine-to-9.md:
- Around line 1-8: Update the changeset so package bump types reflect the
visible UI change: change the entries for '@likec4/diagram' and 'likec4' from
"patch" to "minor" to indicate a user-visible behavior change in
Button/Alert/ActionIcon variant="light", while leaving '@likec4/core' and
'@likec4/style-preset' as "patch" if they do not directly surface the component
behavior.
- Line 8: Reword the sentence to reference the variant prop instead of listing
component names awkwardly: change the line to say that the variant="light" prop
on the Button, Alert, and ActionIcon components now uses solid colors instead of
transparency (use the singular component names Button, Alert, ActionIcon and the
exact prop variant="light" to make the meaning clear).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a1ae9b7-31ef-4777-91e4-ad69bfb5535e

📥 Commits

Reviewing files that changed from the base of the PR and between 66d6f60 and c0f7e65.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .changeset/update-mantine-to-9.md
  • packages/diagram/src/navigationpanel/comparepanel/LayoutTypeSwitcher.tsx
  • packages/diagram/src/navigationpanel/walkthrough/DynamicViewControls.tsx
  • packages/diagram/src/overlays/element-details/TabPanelDeployments.tsx
  • packages/diagram/src/overlays/element-details/TabPanelStructure.tsx
  • packages/diagram/src/overlays/relationships-browser/SelectElement.tsx
  • packages/diagram/src/search/components/ElementsColumn.tsx
  • packages/diagram/src/shadowroot/styles.css.ts
  • packages/likec4-spa/src/components/sidebar/DiagramsTree.tsx
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (7)
  • packages/diagram/src/overlays/element-details/TabPanelStructure.tsx
  • packages/diagram/src/navigationpanel/walkthrough/DynamicViewControls.tsx
  • packages/diagram/src/search/components/ElementsColumn.tsx
  • packages/diagram/src/overlays/element-details/TabPanelDeployments.tsx
  • packages/likec4-spa/src/components/sidebar/DiagramsTree.tsx
  • packages/diagram/src/overlays/relationships-browser/SelectElement.tsx
  • packages/diagram/src/navigationpanel/comparepanel/LayoutTypeSwitcher.tsx

@davydkov davydkov merged commit 5f46082 into main Apr 25, 2026
18 checks passed
@davydkov davydkov deleted the cranky-khorana-efc06c branch April 25, 2026 20:43
@likec4-ci likec4-ci Bot mentioned this pull request Apr 25, 2026
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