Skip to content

feat: runtime rearchitecture #2348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: runtime rearchitecture #2348

wants to merge 1 commit into from

Conversation

Yonom
Copy link
Member

@Yonom Yonom commented Aug 19, 2025

No description provided.

Copy link

changeset-bot bot commented Aug 19, 2025

⚠️ No Changeset found

Latest commit: 7db3e9a

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

Copy link
Contributor

Review Summary

🏷️ Draft Comments (2)

Skipped posting 2 draft comments that were valid but scored below your review threshold (>=13/15). Feel free to update them here.

packages/react-hook-form/src/useAssistantForm.tsx (1)

91-107: for (const name of _names.mount) iterates all mounted field names and checks DOM for each, which can be O(n) DOM lookups on large forms, causing measurable UI thread blocking for large forms.

📊 Impact Scores:

  • Production Impact: 3/5
  • Fix Specificity: 4/5
  • Urgency Impact: 2/5
  • Total Score: 9/15

🤖 AI Agent Prompt (Copy & Paste Ready):

Optimize DOM lookup in packages/react-hook-form/src/useAssistantForm.tsx lines 91-107. The current code iterates all mounted field names and performs a DOM lookup for each, which can cause UI thread blocking on large forms. Refactor to first collect all HTMLElement references, then iterate and perform the DOM lookup, reducing repeated property access and improving performance for large forms.

packages/react-langgraph/src/useLangGraphRuntime.ts (1)

31-45: getPendingToolCalls iterates all messages and all tool calls on every send, which can be O(n*m) for large threads, causing noticeable delays as message history grows.

📊 Impact Scores:

  • Production Impact: 2/5
  • Fix Specificity: 3/5
  • Urgency Impact: 2/5
  • Total Score: 7/15

🤖 AI Agent Prompt (Copy & Paste Ready):

Optimize `getPendingToolCalls` in packages/react-langgraph/src/useLangGraphRuntime.ts (lines 31-45). The current implementation iterates all messages and all tool calls on every send, which is O(n*m) and causes delays as message history grows. Refactor it to memoize results by message array reference and iterate messages in reverse, skipping already-resolved tool calls, to avoid unnecessary recomputation and improve performance for large threads.

Copy link
Contributor

Review Summary

🏷️ Draft Comments (1)

Skipped posting 1 draft comments that were valid but scored below your review threshold (>=13/15). Feel free to update them here.

packages/react/src/model-context/makeAssistantVisible.tsx (1)

32-32,54-54: setTimeout(resolve, 2000) in both click and edit tools introduces a fixed 2s delay per operation, causing significant UI latency and resource waste for frequent or batch actions.

📊 Impact Scores:

  • Production Impact: 3/5
  • Fix Specificity: 5/5
  • Urgency Impact: 3/5
  • Total Score: 11/15

🤖 AI Agent Prompt (Copy & Paste Ready):

In packages/react/src/model-context/makeAssistantVisible.tsx, lines 32 and 54, the code introduces a fixed 2-second delay with `await new Promise((resolve) => setTimeout(resolve, 2000));` in both the `click` and `edit` tool execute functions. This causes significant UI latency and resource waste, especially for frequent or batch operations. Reduce the delay to a minimal value (e.g., 100ms) or make it configurable, ensuring the UI remains responsive.

update type for ResourceFiber
add assistant-ui-react-core
wip
add client runtime layer
wip
wip
wip
wip
wip
drop react-core
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
wip
Copy link

trag-bot bot commented Aug 22, 2025

@trag-bot didn't find any issues in the code! ✅✨

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