Skip to content

refactor(*): replace deprecated 'FormEvent' and 'MutableRefObject' types - #1631

Merged
tannerlinsley merged 2 commits into
mainfrom
refactor/react-submit-event-types
Nov 23, 2026
Merged

tannerlinsley merged 2 commits into
mainfrom
refactor/react-submit-event-types

Conversation

@sukvvon

@sukvvon sukvvon commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

@types/react 19 deprecates FormEvent and MutableRefObject.

  • 11 form submit handlers now take SubmitEvent instead of FormEvent.
  • ExecutionSessionPanel's processCommand is called from both a form onSubmit and a button onClick, so it takes SyntheticEvent.
  • WebContainerTerminal's renderedOutputRef uses RefObject, which is mutable in React 19 types.

Type-only change; the emitted JavaScript is the same.

Verification

  • tsc, oxlint and oxfmt pass; typescript/no-deprecated no longer reports FormEvent or MutableRefObject.

Summary by CodeRabbit

  • Refactor
    • Updated form and submission event types across chat, search, navigation, and showcase interactions.
    • Adjusted a terminal output reference type.
    • No user-facing behavior changes.

@sukvvon sukvvon self-assigned this Nov 23, 2026
@changeset-bot

changeset-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2a9b9c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c1b72ad0-8566-42f1-9529-3ffe08f1f0e6
Commits

Reviewing files that changed from the base of the PR and between eb64b50 and 2a9b9c2.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The pull request updates React event types for form handlers and changes a ref parameter type in a process-output callback. The supplied summaries report no runtime behavior changes.

Changes: React type annotation updates

Layer / File(s) Summary
Event and ref parameter types
src/chat/components/*, src/components/AiDock.tsx, src/components/ShowcaseSubmitForm.tsx, src/components/examples/SandboxBrowser.client.tsx, src/components/examples/WebContainerTerminal.client.tsx
Form handlers replace FormEvent with SubmitEvent or SyntheticEvent. renderProcessOutput replaces MutableRefObject with RefObject.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Suggested reviewers: tannerlinsley, ladybluenotes

Merge Risk: Minimal · previous review eb64b

This change only updates TypeScript type annotations for form handlers and one ref parameter, with no runtime behavior change. It poses minimal merge risk, and the reported type-check and lint results support it.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two deprecated React types the PR replaces, FormEvent and MutableRefObject. The raw summary and PR objectives confirm the change is a type-only swap to SubmitEvent, SyntheticEvent,…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two deprecated React types the PR replaces, FormEvent and MutableRefObject. The raw summary and PR objectives confirm the change is a type-only swap to SubmitEvent, SyntheticEvent, and RefObject across 11 form handlers and one ref. The title is conventional and specific, and it covers the main change without listing files.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3965167-cd38-4f71-853e-7402e7b2cdaa
Commits

Reviewing files that changed from the base of the PR and between d994265 and eb64b50.

Files selected for processing: 13

  • src/chat/components/ConversationSession.tsx
  • src/chat/components/DesktopBrowserPanel.tsx
  • src/chat/components/ExecutionSessionPanel.tsx
  • src/chat/components/KodyAddServer.tsx
  • src/chat/components/KodyCommunity.tsx
  • src/chat/components/KodyMail.tsx
  • src/chat/components/KodyMemorySearch.tsx
  • src/chat/components/KodyRunHistory.tsx
  • src/chat/components/RetryComposer.tsx
  • src/components/AiDock.tsx
  • src/components/ShowcaseSubmitForm.tsx
  • src/components/examples/SandboxBrowser.client.tsx
  • src/components/examples/WebContainerTerminal.client.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@github-actions

Copy link
Copy Markdown
Asset Main PR merge build Change
JavaScript 19580.39 KiB 19580.39 KiB 0.00 KiB (0.00%)
JavaScript (gzip) 6443.74 KiB 6443.76 KiB 🔴 +0.02 KiB (+0.00%)
CSS 823.32 KiB 823.32 KiB 0.00 KiB (0.00%)
CSS (gzip) 126.01 KiB 126.01 KiB 0.00 KiB (0.00%)
Page Main (gzip) PR merge build (gzip) Change
/ 595.03 KiB 595.01 KiB 🟢 -0.02 KiB (-0.00%)
/libraries 537.88 KiB 537.86 KiB 🟢 -0.03 KiB (-0.00%)
/start/latest 562.67 KiB 562.65 KiB 🟢 -0.02 KiB (-0.00%)
/router/latest 562.97 KiB 562.95 KiB 🟢 -0.02 KiB (-0.00%)
/query/latest 561.42 KiB 561.40 KiB 🟢 -0.02 KiB (-0.00%)
/table/latest 594.23 KiB 594.21 KiB 🟢 -0.02 KiB (-0.00%)
/charts/latest 643.53 KiB 643.50 KiB 🟢 -0.02 KiB (-0.00%)
/ai/latest 588.35 KiB 588.33 KiB 🟢 -0.02 KiB (-0.00%)
Docs article 548.94 KiB 548.92 KiB 🟢 -0.02 KiB (-0.00%)
Framework docs article 548.94 KiB 548.92 KiB 🟢 -0.02 KiB (-0.00%)
/blog 542.09 KiB 542.07 KiB 🟢 -0.02 KiB (-0.00%)
/maintainers 541.19 KiB 541.17 KiB 🟢 -0.02 KiB (-0.00%)
/showcase 539.14 KiB 539.12 KiB 🟢 -0.02 KiB (-0.00%)
/chat 537.61 KiB 537.59 KiB 🟢 -0.02 KiB (-0.00%)
/chat/c/:conversationId 538.33 KiB 538.32 KiB 🟢 -0.02 KiB (-0.00%)

Page sizes sum the JS and CSS in the TanStack Start manifest for each route and its layouts. Shared files count once per page.

Compared with main at b64bef2. Gzip sizes are summed per file. Build run

@tannerlinsley

Copy link
Copy Markdown
Member

The replacements keep the event handlers and ref writes unchanged. SyntheticEvent also preserves the shared form and button handler’s accepted event shape.

AI review notes: Read the complete 13-file diff at 2a9b9c2. Changes are imports and type annotations only; no event logic changed. CI passed. The report shows unchanged raw JavaScript and CSS, with gzip JavaScript +0.02 KiB within the existing budget policy. I did not run separate browser tests or an emitted-output comparison. CodeRabbit skipped this diff, which is not an independent approval.

@tannerlinsley
tannerlinsley merged commit 4996800 into main Nov 23, 2026
11 checks passed
@tannerlinsley
tannerlinsley deleted the refactor/react-submit-event-types branch November 23, 2026 18:00
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