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
[BUG] AI-instruction-tip (lightbulb) input glitches in Settings → Labels #829
In Settings → Labels, each label has a lightbulb button ("Add AI instruction tip"). Pressing it makes the tip input box glitch out. Easily and consistently reproducible.
Reproduce...
Open Settings → Labels.
Click the lightbulb ("Add AI instruction tip") on a label row.
The tip input glitches (misbehaves on open / focus / value).
Likely cause (from a quick code read)
In packages/ui/components/Settings.tsx (~lines 1474–1598), the labels list:
Uses key={index} for mapped rows (React anti-pattern — inputs can attach to the wrong row when the list changes mid-edit).
Conditionally remounts the tip input on toggle ({isEditingTip && (...)}) with an autoFocus that can race the state update.
Fires two unbatched state updates on click (setEditingTipIndex then setEditingTipValue).
Switching to stable keys (label id) and avoiding the remount/focus race likely resolves it.
Activity
Fix flickering AI-tip input in label settings (backnotprop#830)
Squashed commit of the following: