Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (19)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (5)
WalkthroughUpdated several runtime dependency version ranges in package.json (cozy-bar, cozy-harvest-lib, cozy-search, cozy-sharing, cozy-ui, cozy-ui-plus, cozy-viewer). Removed useCozyTheme usage and theme.variant-driven conditional styling across multiple components, simplified related className logic, and removed variant from CozyTheme typings. Swapped cozy-ui Circle → Avatar in WallpaperItem. Added a new SvgWorkplaceText icon and adjusted BarComponent props in App to use appIcon/appTextIcon variants. Several CozyTheme usages no longer pass variant="normal". Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/Personalization/WallpaperItem.jsx (1)
65-87:⚠️ Potential issue | 🔴 CriticalReplace
colorprop withsx={{ bgcolor: 'var(--primaryColor)' }}orstyle={{ backgroundColor: 'var(--primaryColor)' }}.The
colorprop on the Avatar component does not control background color. In Material-UI (which cozy-ui is based on), background color must be set via thesxprop (usingbgcolor),styleprop (usingbackgroundColor), or a CSS class. Without this correction, the colored circular background behind the close button will not render, causing a visual regression from the previousCirclecomponent implementation.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Personalization/WallpaperItem.jsx` around lines 65 - 87, The Avatar is using a nonfunctional color prop so its background won't render; replace the color prop on the Avatar component with a background style (use sx={{ bgcolor: 'var(--primaryColor)' }} or style={{ backgroundColor: 'var(--primaryColor)' }}) so the circular background appears; update the Avatar JSX (the Avatar that wraps IconButton/CrossIcon in WallpaperItem.jsx) to remove color={'var(--primaryColor)'} and set the background via sx or style accordingly, preserving the existing className, size, and children.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 56: Multiple components still use the old useCozyTheme hook and
<CozyTheme variant=...> wrapper which are incompatible with cozy-ui-plus v6;
search for useCozyTheme and CozyTheme across the listed components
(AssistantMobileWrapper, AssistantDesktopWrapper, FooterLogo, IntentHandler,
KonnectorRoutes, Konnector, BackupNotification, Shortcut* files, SectionDialog,
WallpaperItem, AnnouncementsDialog, LogoutModal, BackgroundContainer) and
replace them with the new v6 theming API: update imports to the v6 exports
(replace useCozyTheme/CozyTheme imports from 'cozy-ui-plus' with the v6
equivalents, e.g., the new useTheme hook and ThemeProvider or Theme component
per the v6 migration guide), convert any <CozyTheme variant="..."> wrappers to
the new provider/wrapper pattern and map the old variant prop to the new theme
property (or call useTheme() in component to select styles), and update
types/usages in SectionDialog.tsx to the new theme types; after changes, run
linting, build and visual/manual checks (or Storybook) to confirm no
runtime/style regressions.
---
Outside diff comments:
In `@src/components/Personalization/WallpaperItem.jsx`:
- Around line 65-87: The Avatar is using a nonfunctional color prop so its
background won't render; replace the color prop on the Avatar component with a
background style (use sx={{ bgcolor: 'var(--primaryColor)' }} or style={{
backgroundColor: 'var(--primaryColor)' }}) so the circular background appears;
update the Avatar JSX (the Avatar that wraps IconButton/CrossIcon in
WallpaperItem.jsx) to remove color={'var(--primaryColor)'} and set the
background via sx or style accordingly, preserving the existing className, size,
and children.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 530ec08b-7e67-419c-a992-c1ac424749b0
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (6)
package.jsonsrc/components/HeroHeader/CornerButton.jsxsrc/components/HeroHeader/index.jsxsrc/components/Personalization/WallpaperItem.jsxsrc/containers/App.jsxsrc/cozy-ui.d.ts
💤 Files with no reviewable changes (2)
- src/containers/App.jsx
- src/cozy-ui.d.ts
| "cozy-ui-plus": "^4.0.0", | ||
| "cozy-viewer": "^26.2.0", | ||
| "cozy-ui": "^138.1.0", | ||
| "cozy-ui-plus": "^6.0.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Checking cozy-ui-plus theme API usage patterns..."
rg -n -C2 "from 'cozy-ui-plus/dist/providers/CozyTheme'|useCozyTheme|<CozyTheme[^>]*variant=|theme\.variant" --type=js --type=jsx --type=ts --type=tsxRepository: linagora/cozy-home
Length of output: 156
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Checking package.json at line 56 ==="
sed -n '55,57p' package.json
echo -e "\n=== Checking for cozy-ui-plus theme API usage patterns ==="
# Search for the problematic patterns without file type restrictions
rg "useCozyTheme|CozyTheme.*variant|theme\.variant" -n -C2
echo -e "\n=== Checking specific files mentioned in review ==="
echo "File: src/components/Assistant/AssistantMobileWrapper.jsx"
[ -f src/components/Assistant/AssistantMobileWrapper.jsx ] && sed -n '1,15p' src/components/Assistant/AssistantMobileWrapper.jsx || echo "File not found"
echo -e "\nFile: src/components/FooterLogo/FooterLogo.jsx"
[ -f src/components/FooterLogo/FooterLogo.jsx ] && sed -n '1,15p' src/components/FooterLogo/FooterLogo.jsx || echo "File not found"
echo -e "\nFile: src/containers/IntentHandler.jsx"
[ -f src/containers/IntentHandler.jsx ] && sed -n '45,55p' src/containers/IntentHandler.jsx || echo "File not found"Repository: linagora/cozy-home
Length of output: 9808
Complete the cozy-ui-plus v6 migration across the entire codebase.
After upgrading cozy-ui-plus to ^6.0.0 at line 56, extensive usage of useCozyTheme and <CozyTheme variant> patterns remains throughout the codebase. In addition to src/components/Assistant/AssistantMobileWrapper.jsx, src/components/FooterLogo/FooterLogo.jsx, and src/containers/IntentHandler.jsx, the following files also use these patterns: src/targets/intents/KonnectorRoutes.jsx, src/components/Konnector.jsx, src/components/BackupNotification/BackupNotification.jsx, src/components/Shortcuts/ShortcutActionsMenu.jsx, src/components/Shortcuts/ShortcutEditModal.jsx, src/components/Shortcuts/ShortcutCreateModal.jsx, src/components/Sections/SectionDialog.tsx, src/components/Personalization/WallpaperItem.jsx, src/components/Announcements/AnnouncementsDialog.tsx, src/components/HeroHeader/LogoutModal.tsx, src/components/BackgroundContainer.tsx, and src/components/Assistant/AssistantDesktopWrapper.jsx. Verify compatibility with v6 across all affected files or complete the migration to avoid runtime/style regressions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 56, Multiple components still use the old useCozyTheme
hook and <CozyTheme variant=...> wrapper which are incompatible with
cozy-ui-plus v6; search for useCozyTheme and CozyTheme across the listed
components (AssistantMobileWrapper, AssistantDesktopWrapper, FooterLogo,
IntentHandler, KonnectorRoutes, Konnector, BackupNotification, Shortcut* files,
SectionDialog, WallpaperItem, AnnouncementsDialog, LogoutModal,
BackgroundContainer) and replace them with the new v6 theming API: update
imports to the v6 exports (replace useCozyTheme/CozyTheme imports from
'cozy-ui-plus' with the v6 equivalents, e.g., the new useTheme hook and
ThemeProvider or Theme component per the v6 migration guide), convert any
<CozyTheme variant="..."> wrappers to the new provider/wrapper pattern and map
the old variant prop to the new theme property (or call useTheme() in component
to select styles), and update types/usages in SectionDialog.tsx to the new theme
types; after changes, run linting, build and visual/manual checks (or Storybook)
to confirm no runtime/style regressions.
BundleMonFiles updated (6)
Unchanged files (10)
Total files change -3.41KB -0.07% Groups updated (2)
Unchanged groups (1)
Final result: ✅ View report in BundleMon website ➡️ |
Manage breaking change from cozy-ui 137.
Summary by CodeRabbit
Chores
Style
New Features