fix(ui): resolve multiple UI/UX issues - Fix sidebar stuck state when… #225
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.
Summary
This PR fixes 4 critical UI/UX issues reported in the Studio interface, improving sidebar behavior, secret selection, layout responsiveness, and keyboard shortcuts.
Issues Fixed
Problem: The sidebar would expand and get stuck in an "open" state when a user CMD+clicked a link (e.g., "Secrets") to open it in a new tab. This happened because the click event triggered the route change logic before the browser opened the new tab. Solution:
Added a check in the navigation onClick handler to ignore state updates if modifier keys (CMD, Ctrl, Shift) are pressed.
Added event listeners (blur, visibilitychange) to auto-collapse the sidebar if the window loses focus while hovering. File: src/components/layout/AppLayout.tsx
Problem: Clicking the clear (X) button or "Clear Selection" in a secret dropdown did not clear the value. The selection would momentarily clear and then immediately revert to the previous value. Root Cause:
SecretSelect
onChange prop type was too strict (string instead of string | undefined).
ParameterField
had an auto-migration useEffect that treated undefined as an invalid value and automatically re-selected the first available secret. Solution:
Updated
SecretSelect
to accept undefined in onChange.
Added stopPropagation and preventDefault to partial-fix focus issues in dropdown.
Modified the auto-migration logic in
ParameterField
to ONLY run for non-empty string values (legacy name references), preventing it from overriding intentional clears. Files:
src/components/inputs/SecretSelect.tsx
,
src/components/inputs/LeanSelect.tsx
,
src/components/workflow/ParameterField.tsx
,
src/components/workflow/ConfigPanel.tsx
TopBar Layout Overlap
Problem: The Design/Execute toggle and action buttons overlapped or misaligned when the sidebar opened/closed because of absolute positioning. Solution: Refactored the TopBar layout to use Flexbox (flex-1, justify-center) instead of absolute positioning (left-1/2), ensuring components flow correctly without overlap regardless of available width. File: src/components/layout/TopBar.tsx
Text Input Undo/Redo Conflict
Problem: Pressing Cmd+Z/Cmd+Shift+Z while editing text inputs (e.g., node names) triggered the workflow graph undo/redo instead of the browser's native text undo. Solution: Added a check in the global keyboard handler to skip custom undo/redo logic if the active element is a text input, textarea, or contenteditable. File: src/features/workflow-builder/WorkflowBuilder.tsx
Testing
bun run testbun run lintbun run typecheckDocumentation
docs/guide.md) or checked that no updates are needed..ailogs when applicable.