Skip to content

Chore: upgrade React, TypeScript and major dependencies to latest versionsFix/compose mail dependency upgrade#4

Open
reshalmenzes wants to merge 9 commits into
bron10:masterfrom
reshalmenzes:fix/compose-mail-dependency-upgrade
Open

Chore: upgrade React, TypeScript and major dependencies to latest versionsFix/compose mail dependency upgrade#4
reshalmenzes wants to merge 9 commits into
bron10:masterfrom
reshalmenzes:fix/compose-mail-dependency-upgrade

Conversation

@reshalmenzes
Copy link
Copy Markdown

Summary

This PR upgrades the project to the latest versions of React and other major dependencies, along with compatibility fixes required to keep the app fully functional post-upgrade.

Packages Upgraded

  • React & React DOM → v18
  • TypeScript → latest
  • React Router → v7
  • Redux & Redux-Saga → latest
  • Ant Design → v5
  • Puppeteer → latest
  • Jest & React Testing Library → latest
  • All @types/* packages updated

Breaking Changes Fixed During Upgrade

🐛 React 18 — new root API

  • Migrated from ReactDOM.render to createRoot in src/index.tsx
  • Removed deprecated src/reportWebVitals.ts (breaking changes in latest web-vitals)

🐛 Ant Design v5 — visibleopen on Modal

  • <Modal visible={...}> was renamed to <Modal open={...}> in v5
  • This was silently preventing the Compose Mail modal from opening
  • Fixed in: src/components/modal/default.tsx

🐛 React Router v7 — useParams typing changes

  • Updated useParams typing for compatibility
  • Fixed in: src/components/emails/view.tsx

🐛 localStorage API misuse (found during testing)

  • localStorage.currentUser = value was used instead of localStorage.setItem('currentUser', value)
  • Caused currentUser to not persist properly, breaking compose mail silently
  • Fixed in: src/services/api.ts, src/store/auth/reducer.ts

🐛 Modal reducer — default case forcing modal closed

  • The default case was returning { open: false }, closing the modal on every Redux action
  • CLOSE_MODAL case was missing entirely
  • Fixed in: src/store/modal/reducer.ts

Testing

  • App builds successfully after upgrade
  • Login and session persistence works
  • Compose Mail modal opens correctly
  • Can send and receive emails
  • Can view email detail
  • Logout works correctly

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