Skip to content

React 19 upgrade#751

Merged
feruzm merged 5 commits into
developfrom
r19
Apr 10, 2026
Merged

React 19 upgrade#751
feruzm merged 5 commits into
developfrom
r19

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented Apr 10, 2026

Summary by CodeRabbit

  • Chores

    • Upgraded React runtime to 19.1.1 and corresponding type packages; bumped framer-motion, react-in-viewport, and @ecency/hive-tx across packages; package versions updated.
  • Refactor

    • Tightened TypeScript typings and initialized/refined internal refs across many UI components; improved popover-confirm prop typing to preserve child click handlers.
  • Documentation

    • Added HTML edge caching guidance, cache-control rules, observability headers, and invalidation/verification instructions.
  • Tests

    • Added unit tests for popover-confirm interaction and click-forwarding behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f36dde27-65d5-4d2d-a74e-826463366e50

📥 Commits

Reviewing files that changed from the base of the PR and between 228965b and bfaf113.

📒 Files selected for processing (4)
  • packages/sdk/CHANGELOG.md
  • packages/sdk/package.json
  • packages/wallets/CHANGELOG.md
  • packages/wallets/package.json

📝 Walkthrough

Walkthrough

Bumps React/react-dom and related types; adds explicit JSX imports across many files; initializes and narrows numerous React refs to null/undefined for stronger TypeScript safety; tightens PopoverConfirm children typing and forwards original child onClick; adds README caching docs and a Vitest spec for PopoverConfirm.

Changes

Cohort / File(s) Summary
Dependency updates
apps/web/package.json, packages/ui/package.json, packages/sdk/package.json, packages/wallets/package.json, apps/self-hosted/package.json, apps/self-hosted/hosting/api/package.json
Upgrade React/ReactDOM to ^19.1.x and matching @types/*; bump @ecency/hive-tx, @ecency/sdk, framer-motion, react-in-viewport and package versions.
Explicit JSX imports (many components)
apps/web/src/app/.../*, apps/web/src/features/.../*, apps/web/src/app/decks/.../*, apps/web/src/features/ui/.../*
Added JSX to React imports so files reference JSX.Element explicitly; purely typing import changes, no runtime behavior changes.
Ref initialization & nullability changes
apps/web/src/app/decks/_components/deck-smooth-scroller.tsx, .../profile/.../step-3-review-keys.tsx, .../hive-engine-chart.tsx, .../deck-threads-column.tsx, .../deck-threads-form-toolbar-image-picker.tsx, .../trading-view-widget.tsx, .../waves-list-view.tsx, .../hive-market-rate-listener.tsx, .../feedback-message.tsx, .../purchase-qr-builder.tsx, .../scroll-to-top/index.tsx, .../video-upload-threespeak/*, .../use-tts.ts
Initialized refs explicitly (to null or undefined) and adjusted ref types to allow null/undefined, aligning TypeScript with lifecycle and guarding clearTimeout/clearInterval calls.
Prop/type tightening (behavioral change)
apps/web/src/features/ui/popover-confirm/index.tsx
Narrowed children prop to expect optional onClick; cloned child now forwards original onClick before toggling popover; containerRef relaxed to allow null.
Docs & tests
README.md, apps/web/src/specs/features/ui/popover-confirm.spec.tsx
Added HTML Edge Caching documentation and a Vitest + React Testing Library spec for PopoverConfirm verifying click-forwarding and visibility toggling.

Sequence Diagram(s)

(Skipped — changes are primarily typing/refactor, a small behavioral change limited to child onClick forwarding; no multi-component sequential flow needing visualization.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • React 19 upgrade #751 — React 19 upgrade; overlaps the same dependency bumps and many identical JSX/type edits.
  • Cache #740 — Related middleware/cache-control and README cache policy updates referenced in this change.
  • Manage/add keys improved #717 — Edits the same profile add-keys step file; may conflict with ref/typing changes.

Poem

🐇 I hopped through imports, typed each JSX line,
I tucked null in refs so their states align.
Packages raised their hats and jumped up one degree,
I forwarded onClicks and polished type safety.
🥕 — cheers from a punctual rabbit

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'React 19 upgrade' accurately captures the main change: upgrading React and related dependencies from v18 to v19 across multiple package.json files and updating imports throughout the codebase.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch r19

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[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/specs/features/ui/popover-confirm.spec.tsx`:
- Around line 33-37: Remove the local i18next mock call (the vi.mock("i18next",
...) block) from apps/web/src/specs/features/ui/popover-confirm.spec.tsx and
rely on the existing global mock in setup-any-spec.ts; if you need a different
translation behavior for this spec, add a targeted override only for the
component-specific dependency rather than re-mocking i18next globally in the
spec.

In `@README.md`:
- Around line 107-109: The README has inconsistent cache durations: the phrase
"CF edge serves cached HTML for up to the `s-maxage` window (1h for post pages,
7d for static pages)" conflicts with the `static` tier `s-maxage` documented
later as 24h. Update the earlier mention of "7d for static pages" to match the
`static` tier `s-maxage` of 24h (and ensure the later `static` tier lines still
document SWR as 7d), and also fix the other occurrence noted around the `static`
tier description so both places consistently state s-maxage = 24h for static
pages.
- Around line 129-134: The fenced code block showing cache headers in README.md
lacks a language tag which triggers MD040; update that block (the
triple-backtick fence surrounding the Cache-Control/X-Cache-* lines) to include
a language identifier (preferably "http") so the block becomes ```http ... ```,
ensuring proper linting and tooling compatibility.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a59b88a8-4635-4a40-a9e5-cfca106675a5

📥 Commits

Reviewing files that changed from the base of the PR and between d937f5d and 65548fd.

📒 Files selected for processing (4)
  • README.md
  • apps/web/public/sw.js
  • apps/web/src/features/ui/popover-confirm/index.tsx
  • apps/web/src/specs/features/ui/popover-confirm.spec.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/features/ui/popover-confirm/index.tsx

Comment thread apps/web/src/specs/features/ui/popover-confirm.spec.tsx Outdated
Comment thread README.md
Comment thread README.md Outdated
@feruzm feruzm added the patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR label Apr 10, 2026
@feruzm feruzm merged commit 64d5335 into develop Apr 10, 2026
@feruzm feruzm deleted the r19 branch April 10, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bug fixes and patches (1.0.0 → 1.0.1), add this only if any packages/ have patch changes in PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant