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
Fix cursor position when editing a group chat name - #10872
Nice, focused fix. The root cause is the classic React Native footgun: a value-controlled TextInput on the old architecture re-renders on every keystroke and resets the caret to the end. Switching to defaultValue (uncontrolled) is exactly what this codebase prefers (see CLAUDE.md "Controlled vs Uncontrolled Inputs"), and the key={inputKey} remount handles the fact that the native bottom sheet keeps its children mounted between opens so an uncontrolled input wouldn't otherwise re-seed. The doc comment on the inputKey prop is clear and explains the why well. 👍
A few small observations, none blocking:
1. value now serves a narrower role - worth keeping in mind
After this change, value no longer drives the input contents; it's only used for the nameTooLong validation and is fed by onChangeText={setNewGroupName}. That's correct, but the prop name value reads as if it's the input's value. Not worth churn now, but if you wanted to be extra clear you could rename it to something like currentValue to signal it's the live validation value rather than the seed. Optional.
2. All open paths are covered
Both onPress handlers (the Pressable title at index.tsx:495 and the SettingsButton at :545) now route through openEditNamePrompt, and that's the only place editNamePrompt.open() is invoked, so the key bump + reseed happens on every open. Good - no stale-value path left behind.
3. Error reset relies on the next remount
In the onError handler (index.tsx:379) you setNewGroupName(groupName). Since the input is now uncontrolled, that state reset won't visually revert the field on its own - but the prompt is already closed at that point and the next open bumps inputKey, so the field reseeds correctly. Just confirming the behavior is intentional and fine.
4. Web is unaffected
On web the dialog unmounts its children on close, so the key bump is harmless/redundant there - no downside.
Overall this looks correct and minimal. LGTM.
· d/chat-edit-name
d/chat-edit-name - social-app PR #10872—3faca4b0
Deployed
Jun 11, 2026 by
arcalinea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Classic React Native…