Skip to content

Fix warnings after React 19#585

Open
kneth wants to merge 7 commits into
masterfrom
kneth/fix-warnings-after-React-19
Open

Fix warnings after React 19#585
kneth wants to merge 7 commits into
masterfrom
kneth/fix-warnings-after-React-19

Conversation

@kneth
Copy link
Copy Markdown
Member

@kneth kneth commented Apr 24, 2026

Summary of changes

After #553, we saw many warnings and errors in the console when running test.

Instead of upgrading Ant Design (as outlined in ), AntD 5 can be compatible with React 19 with the right package. Other warnings are silenced only in the tests.

The branch is tested with https://github.com/crate/cloud-ui.

It might be easier to review commit-by-commit instead of file-by-file.

Question to reviewer(s): Do we want to keep files in .planning/codebase?
(files used by get-shit-done)

Checklist

  • Link to issue this PR refers to:
  • Relevant changes are reflected in CHANGES.md.
  • Added or changed code is covered by tests.
  • Required Grand Central APIs are already merged.

@kneth kneth self-assigned this Apr 24, 2026
@kneth kneth requested review from juanpardo and plaharanne April 24, 2026 14:52
@@ -0,0 +1,88 @@
# Architecture
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.

Did you commit the files of .planning/codebase on purpose? Is it for the developers or for AI? We should probably organize a meeting with the team to decide our practices.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added them on purpose but also asked about them in the description when creating the PR to kickstart the conversation within the team

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.

oops, my bad, I missed it in the description

@plaharanne
Copy link
Copy Markdown
Contributor

Just a side note, it's no big deal, we usually use rebase over merge.
https://crateio.atlassian.net/wiki/spaces/TeamDBCloud/pages/859340803/git+Workflow+for+craties

@goat-ssh goat-ssh requested a review from joncombe May 6, 2026 07:00
kneth and others added 5 commits May 11, 2026 10:56
Initialize activeTab state synchronously via lazy initializer instead
of undefined, and remove redundant defaultValue prop from Radix Tabs
Root. Eliminates the React warning in CrateTabsShad and SQLResults tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds autoResetPageIndex: false to prevent @tanstack/table-core from
scheduling page-index resets via Promise.resolve() microtasks. Those
deferred updates fired outside act() in synchronous tests, causing
console warnings in SQLResultsTable and SQLResults test suites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a console.error spy in beforeAll to filter the "trigger element
and popup element should in same shadow root" warning emitted by
@rc-component/trigger in jsdom. The warning is a React 19 passive
effect timing issue (dev-mode only) and does not affect test outcomes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oads

Eliminates the jsdom 'Not implemented: navigation' error in tests by
removing bare <a href="data:..."> elements from SQLResultsTable. Download
is now triggered via URL.createObjectURL + a transient anchor, keeping
large data payloads out of the DOM. Tests updated to verify Blob type;
test/setup.ts gains URL and anchor-click mocks required by jsdom.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kneth kneth force-pushed the kneth/fix-warnings-after-React-19 branch from 7c56b08 to 3ba3ca8 Compare May 11, 2026 09:06
…ct() warnings

antd's static message/notification APIs use an internal `act` that defaults to
a plain pass-through. In a React 19 test environment, this causes
"not configured to support act(...)" warnings because state updates happen
outside React's act scope.

Wire antd's `actWrapper` to RTL's `act` (which sets IS_REACT_ACT_ENVIRONMENT=true)
so all antd state updates are correctly batched. Using RTL's act rather than
React's raw act is required because the IS_REACT_ACT_ENVIRONMENT flag must be
set when act() fires or React still warns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kneth
Copy link
Copy Markdown
Member Author

kneth commented May 12, 2026

Closing in favor of #592

@kneth kneth mentioned this pull request May 12, 2026
4 tasks
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.

2 participants