You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c42b027
Browse filesBrowse the repository at this point in the historyBrowse files
- Adopt text typed into the server-rendered composer before hydration; the dropped input event left state empty and the next render wiped the text
- Restore a saved draft after hydration instead of in the initial render, which mismatched the server HTML and regenerated the composer on every reload with a draft
- Share one useHydrated hook across the composer, organization home, and theme toggle
- Mobile E2E: wait for the draft to overflow its editor instead of measuring once, and check a saved draft returns after a reload without a hydration error
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/use-prompt-editor.test.tsx
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/use-prompt-editor.ts
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1056,6 +1056,15 @@ export function usePromptEditor({
1056
1056
setValueState(textarea.value)
1057
1057
},[])
1058
1058
1059
+
// Keystrokes typed into the server-rendered textarea before hydration never
1060
+
// reach React. Compared with the mounted value: `valueRef` leads the DOM
1061
+
// while an edit made during mount is still uncommitted.
0 commit comments