Skip to content

fix: board icon emoji shows as unicode text on create modal#1023

Open
rusackas wants to merge 1 commit into
mainfrom
fix-board-emoji-initialvalue
Open

fix: board icon emoji shows as unicode text on create modal#1023
rusackas wants to merge 1 commit into
mainfrom
fix-board-emoji-initialvalue

Conversation

@rusackas
Copy link
Copy Markdown
Member

Problem

When opening the Create Agent modal in Settings, the board icon field displays the default emoji (📋) as raw unicode text (e.g. 📋) instead of rendering the actual emoji character. Once you pick an emoji from the picker, it displays correctly.

Root Cause

Form.Item name="icon" was missing initialValue="📋". Without it, Ant Design's form has no stored value for the field until the user interacts with it. FormEmojiPickerInput reads the form value via form.getFieldValue(fieldName), which returns undefined initially — falling through to the defaultEmoji prop. But the inner <Input> renders with the form's FieldContext, and without an initialValue the field value shown can differ from the prefix display.

Fix

Added initialValue="📋" to both the create and edit modal's Form.Item name="icon", matching the existing pattern in UsersTable.tsx (which correctly has initialValue="👤").

// Before
<Form.Item name="icon" noStyle>

// After  
<Form.Item name="icon" initialValue="📋" noStyle>

The edit modal already calls form.setFieldsValue({ icon: board.icon }) before opening, so initialValue there is redundant but harmless.

🤖 Generated with Claude Code

Without initialValue, Ant Design's Form.Item has no field value until
the user picks an emoji, causing FormEmojiPickerInput to display the
raw unicode fallback text instead of rendering the emoji character.

Matches the existing pattern in UsersTable.tsx (initialValue="👤").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs rebase but approved!

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