fix(inputs): cap room-name / display-name length client-side (H10)

The room-name (settings + create-room) and display-name inputs had no client-side
length guard, so an over-long value only failed after a server round-trip. Add
maxLength={255} (matching the existing inline-rename cap in RoomNavItem; under
Synapse's 256 max_displayname_length). Also clamp the emoji-picker prepend in the
two room-name fields, since programmatic setState isn't constrained by the DOM
maxLength and could otherwise push past the cap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 20:58:10 -04:00
co-authored by Claude Opus 4.8
parent 3f9fea1cf2
commit f9c03d5e33
3 changed files with 9 additions and 2 deletions
@@ -285,6 +285,7 @@ function ProfileDisplayName({ profile, userId }: ProfileProps) {
onChange={handleChange}
variant="Secondary"
radii="300"
maxLength={255}
style={{ paddingRight: config.space.S200 }}
readOnly={changingDisplayName || disableSetDisplayname}
after={