Skip to content

[HDX-3981] Upgrade Mantine v7 to v9#2096

Merged
kodiakhq[bot] merged 9 commits intomainfrom
branclon/HDX-3981-upgrade-mantine-v9
Apr 13, 2026
Merged

[HDX-3981] Upgrade Mantine v7 to v9#2096
kodiakhq[bot] merged 9 commits intomainfrom
branclon/HDX-3981-upgrade-mantine-v9

Conversation

@brandon-pereira
Copy link
Copy Markdown
Member

Summary

Upgrade all @mantine/* packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current.

Breaking changes resolved

v7 → v8 changes:

  • DateTimePicker/DateInput onChange now returns a date string instead of a Date object — updated handlers in AlertScheduleFields.tsx and SourceForm.tsx
  • Updated postcss-preset-mantine to ^1.18.0

v8 → v9 changes:

  • Collapse: renamed in prop to expanded (11 instances across 10 files)
  • Grid: removed deprecated overflow="hidden" prop (5 instances, 3 files) — v9 uses native CSS gap instead of negative margins
  • Text/Anchor: renamed color prop to c style prop (7 instances, 5 files)
  • SourceSchemaPreview: replaced removed TextProps color key with React.CSSProperties
  • Theme: set defaultRadius: 'sm' in both theme configs to preserve existing visual appearance (v9 changed default from sm to md)
  • Updated test for Collapse visibility behavior change in jsdom

Not affected (verified)

  • No @mantine/carousel or @mantine/tiptap usage — embla and Tiptap migrations not needed
  • No TypographyStylesProvider, Spoiler, positionDependencies, useFullscreen, useMouse, useMutationObserver, or zodResolver from @mantine/form usage
  • All useLocalStorage calls from @mantine/hooks already provide defaultValue
  • react-hook-form-mantine has a peer dep mismatch (expects @mantine/core ^7.0.0) but its thin wrappers are compatible at runtime

How to test locally or on Vercel

  1. Start the dev stack with yarn dev
  2. Navigate through key pages: search, dashboards, alerts, services dashboard, Kubernetes pages
  3. Verify Collapse animations work correctly (alert details, nav sub-menus, advanced settings)
  4. Verify Grid layouts render properly on services dashboard side panels
  5. Verify no visual regressions in border-radius, spacing, or color across components

References

Upgrade all @mantine/* packages from v7.17.8 to v9.0.0, resolving all
breaking changes from both the v7→v8 and v8→v9 migration paths.

Breaking changes addressed:
- Collapse: rename `in` prop to `expanded` (11 instances across 10 files)
- Grid: remove deprecated `overflow="hidden"` prop (5 instances, 3 files)
- Text/Anchor: rename `color` prop to `c` (7 instances, 5 files)
- DateTimePicker/DateInput: onChange now returns string instead of Date
- SourceSchemaPreview: replace removed TextProps `color` key with React.CSSProperties
- Theme: set defaultRadius to 'sm' to preserve existing visual appearance
- Update postcss-preset-mantine to ^1.18.0
- Update test for Collapse visibility behavior change in jsdom
@brandon-pereira brandon-pereira added the ai-generated AI-generated content; review carefully before merging. label Apr 10, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Apr 13, 2026 3:58pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: ae88f5b

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

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor
@hyperdx/otel-collector Minor

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

E2E Test Results

All tests passed • 129 passed • 3 skipped • 1107s

Status Count
✅ Passed 129
❌ Failed 0
⚠️ Flaky 4
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

…ignment (HDX-3981)

- Replace react-hook-form-mantine with Controller from react-hook-form
  and direct Mantine components (NativeSelect, NumberInput, Select)
- Remove react-hook-form-mantine dependency entirely
- Fix E2E test locators: Mantine v9 Select renders role='combobox'
  instead of role='textbox'
- Fix Tabs label alignment: restore left-aligned text in tab labels
  (v9 changed default to text-align: center)
…(HDX-3981)

Mantine v9 DateInput onChange now returns strings instead of Date objects.
This broke the TimePicker which passes form values to date-fns functions
(format, add, sub) and calls .getTime() on them.

- Add toDate() helper to convert string values back to Date objects
- Override DateInputCmp onChange to convert before storing in form
- Guard handleApply, handleMove, and mode-switch with toDate()
- Guard useTimePickerForm onValuesChange date comparison
@brandon-pereira brandon-pereira requested review from a team and dhable and removed request for a team April 10, 2026 21:42
@brandon-pereira brandon-pereira marked this pull request as ready for review April 10, 2026 21:42
@brandon-pereira brandon-pereira removed the ai-generated AI-generated content; review carefully before merging. label Apr 10, 2026
@github-actions github-actions Bot added the review/tier-4 Critical — deep review + domain expert sign-off label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

🟡 Tier 3 — Standard

Introduces new logic, modifies core functionality, or touches areas with non-trivial risk.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: Full human review — logic, architecture, edge cases.
SLA: First-pass feedback within 1 business day.

Stats
  • Files changed: 34
  • Lines changed: 739 (+ 22 in test files, excluded from tier calculation)
  • Branch: branclon/HDX-3981-upgrade-mantine-v9
  • Author: brandon-pereira

To override this classification, remove the review/tier-3 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions github-actions Bot added review/tier-3 Standard — full human review required and removed review/tier-4 Critical — deep review + domain expert sign-off labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

PR Review

Well-executed migration. All documented breaking changes (Collapse inexpanded, Grid overflow, colorc, DateInput onChange, theme radius) are handled consistently. A few items worth checking:

  • ⚠️ SourceForm.tsx DateInput value inconsistencyvalue={field.value ? new Date(field.value) : undefined} passes a Date object to Mantine v9 DateInput. TimePicker.tsx's DateInputCmp wrapper explicitly converts Date→string (value instanceof Date ? value.toISOString() : ...) before passing to DateInput, suggesting v9 expects strings. SourceForm.tsx skips this conversion; verify the date field renders correctly, or apply the same toISOString() pattern used in DateInputCmp.

  • ⚠️ NumberInput + Controller field spread<NumberInput {...field} /> passes field.onChange (react-hook-form signature) as NumberInput's onChange. Mantine v9's NumberInput calls onChange(value: string | number), not a React event. This works at runtime (Controller accepts any value) but may generate TypeScript errors. Consider wrapping: onChange={(val) => field.onChange(val)}.

  • ℹ️ WebhookChannelForm name prop type → typed as string but asserted as Path<T> internally (name! as Path<T>). Pre-existing pattern, not a regression, but callers lose type safety on the name field.

✅ Collapse/Grid/color migrations, theme defaults, test updates, and react-hook-form-mantine Controller replacements all look correct.

- DateInputCmp: remove `as any` cast by giving the wrapper its own typed
  props (Date ↔ string conversion in both value and onChange directions)
- Collapse test: assert aria-hidden attribute for collapsed/expanded state
  instead of dropping the assertion entirely
- Alerts.tsx: make WebhookChannelForm and AlertChannelForm generic over
  FieldValues, removing Control<any>
@kodiakhq kodiakhq Bot merged commit 0bfec14 into main Apr 13, 2026
17 checks passed
@kodiakhq kodiakhq Bot deleted the branclon/HDX-3981-upgrade-mantine-v9 branch April 13, 2026 16:03
knudtty pushed a commit that referenced this pull request Apr 16, 2026
## Summary

Upgrade all `@mantine/*` packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current.

### Breaking changes resolved

**v7 → v8 changes:**
- `DateTimePicker`/`DateInput` `onChange` now returns a date string instead of a `Date` object — updated handlers in `AlertScheduleFields.tsx` and `SourceForm.tsx`
- Updated `postcss-preset-mantine` to ^1.18.0

**v8 → v9 changes:**
- `Collapse`: renamed `in` prop to `expanded` (11 instances across 10 files)
- `Grid`: removed deprecated `overflow="hidden"` prop (5 instances, 3 files) — v9 uses native CSS `gap` instead of negative margins
- `Text`/`Anchor`: renamed `color` prop to `c` style prop (7 instances, 5 files)
- `SourceSchemaPreview`: replaced removed `TextProps` `color` key with `React.CSSProperties`
- Theme: set `defaultRadius: 'sm'` in both theme configs to preserve existing visual appearance (v9 changed default from `sm` to `md`)
- Updated test for Collapse visibility behavior change in jsdom

### Not affected (verified)
- No `@mantine/carousel` or `@mantine/tiptap` usage — embla and Tiptap migrations not needed
- No `TypographyStylesProvider`, `Spoiler`, `positionDependencies`, `useFullscreen`, `useMouse`, `useMutationObserver`, or `zodResolver` from `@mantine/form` usage
- All `useLocalStorage` calls from `@mantine/hooks` already provide `defaultValue`
- `react-hook-form-mantine` has a peer dep mismatch (expects `@mantine/core ^7.0.0`) but its thin wrappers are compatible at runtime

### How to test locally or on Vercel

1. Start the dev stack with `yarn dev`
2. Navigate through key pages: search, dashboards, alerts, services dashboard, Kubernetes pages
3. Verify Collapse animations work correctly (alert details, nav sub-menus, advanced settings)
4. Verify Grid layouts render properly on services dashboard side panels
5. Verify no visual regressions in border-radius, spacing, or color across components

### References

- Linear Issue: https://linear.app/clickhouse/issue/HDX-3981/upgrade-mantine-v7-v9
- [Mantine v9 Changelog](https://mantine.dev/changelog/9-0-0/)
- [7.x → 8.x Migration Guide](https://mantine.dev/guides/7x-to-8x/)
- [8.x → 9.x Migration Guide](https://mantine.dev/guides/8x-to-9x/)
Copilot AI pushed a commit that referenced this pull request Apr 20, 2026
## Summary

Upgrade all `@mantine/*` packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current.

### Breaking changes resolved

**v7 → v8 changes:**
- `DateTimePicker`/`DateInput` `onChange` now returns a date string instead of a `Date` object — updated handlers in `AlertScheduleFields.tsx` and `SourceForm.tsx`
- Updated `postcss-preset-mantine` to ^1.18.0

**v8 → v9 changes:**
- `Collapse`: renamed `in` prop to `expanded` (11 instances across 10 files)
- `Grid`: removed deprecated `overflow="hidden"` prop (5 instances, 3 files) — v9 uses native CSS `gap` instead of negative margins
- `Text`/`Anchor`: renamed `color` prop to `c` style prop (7 instances, 5 files)
- `SourceSchemaPreview`: replaced removed `TextProps` `color` key with `React.CSSProperties`
- Theme: set `defaultRadius: 'sm'` in both theme configs to preserve existing visual appearance (v9 changed default from `sm` to `md`)
- Updated test for Collapse visibility behavior change in jsdom

### Not affected (verified)
- No `@mantine/carousel` or `@mantine/tiptap` usage — embla and Tiptap migrations not needed
- No `TypographyStylesProvider`, `Spoiler`, `positionDependencies`, `useFullscreen`, `useMouse`, `useMutationObserver`, or `zodResolver` from `@mantine/form` usage
- All `useLocalStorage` calls from `@mantine/hooks` already provide `defaultValue`
- `react-hook-form-mantine` has a peer dep mismatch (expects `@mantine/core ^7.0.0`) but its thin wrappers are compatible at runtime

### How to test locally or on Vercel

1. Start the dev stack with `yarn dev`
2. Navigate through key pages: search, dashboards, alerts, services dashboard, Kubernetes pages
3. Verify Collapse animations work correctly (alert details, nav sub-menus, advanced settings)
4. Verify Grid layouts render properly on services dashboard side panels
5. Verify no visual regressions in border-radius, spacing, or color across components

### References

- Linear Issue: https://linear.app/clickhouse/issue/HDX-3981/upgrade-mantine-v7-v9
- [Mantine v9 Changelog](https://mantine.dev/changelog/9-0-0/)
- [7.x → 8.x Migration Guide](https://mantine.dev/guides/7x-to-8x/)
- [8.x → 9.x Migration Guide](https://mantine.dev/guides/8x-to-9x/)
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-3 Standard — full human review required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants