fix(FN-725): sync isExpanded and isDisclosureExpanded states in QuickEntryBox
- Fix state desync between isExpanded and isDisclosureExpanded in QuickEntryBox component - Ensure both states update together to prevent UI inconsistencies - Add regression tests for state synchronization scenarios - Add 72 lines of new test coverage in QuickEntryBox.test.tsx
This commit is contained in:
@@ -473,8 +473,11 @@ export function QuickEntryBox({ onCreate, addToast, tasks = [], availableModels,
|
||||
const showExpandedControls = isDisclosureExpanded;
|
||||
|
||||
const toggleExpanded = useCallback(() => {
|
||||
setIsDisclosureExpanded((prev) => !prev);
|
||||
setIsExpanded((prev) => !prev);
|
||||
setIsDisclosureExpanded((prev) => {
|
||||
const next = !prev;
|
||||
setIsExpanded(next);
|
||||
return next;
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@@ -493,7 +496,7 @@ export function QuickEntryBox({ onCreate, addToast, tasks = [], availableModels,
|
||||
data-testid="quick-entry-input"
|
||||
rows={1}
|
||||
aria-controls="quick-entry-controls"
|
||||
aria-expanded={isExpanded}
|
||||
aria-expanded={isDisclosureExpanded}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user