fix(nav-panel): add collapsible chevron indicator to workspace section header - #2135
Open
xielixing wants to merge 1 commit into
Open
fix(nav-panel): add collapsible chevron indicator to workspace section header#2135xielixing wants to merge 1 commit into
xielixing wants to merge 1 commit into
Conversation
…n header SectionHeader now renders a ChevronRight icon that rotates based on isOpen state for collapsible sections (not just scene-entry sections). Collapsed state shows chevron pointing right; expanded shows rotated 90deg. Also auto-expands workspace section when a new workspace is added, so newly created workspaces are immediately visible even if the user had previously collapsed the section. Fixes GCWing#976
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix: Workspace section collapsed/expanded states look identical (#976)
Problem
The workspace section header in the NavPanel uses
collapsiblemode withoutonSceneOpen, so theChevronRightindicator was never rendered. Users could collapse/expand the section but had no visual cue showing the current state — collapsed and expanded headers looked identical.Additionally, when a user manually collapsed the workspace section and then added a new workspace, the section stayed collapsed, making the new workspace invisible until the user manually expanded it.
Root Cause
In
SectionHeader.tsx, the chevron indicator was gated behindonSceneOpen ?(line 63), so collapsible-only sections (workspace, assistant sessions) never showed an indicator.Changes
SectionHeader.tsx— Render the chevron for bothonSceneOpenandcollapsiblesections. Added--collapsedand--expandedCSS modifier classes that rotate the chevron based onisOpenstate.NavPanel.scss— Addedtransform: rotate(0deg)for collapsed state andtransform: rotate(90deg)for expanded state, with the existingtransition: transformproviding smooth animation.MainNav.tsx— Added auseEffectthat auto-expands the workspace section when a new workspace is added (tracksnormalWorkspacesList.length), so newly created workspaces are immediately visible even if the user had previously collapsed the section.Validation
tsc --noEmit— no errors in changed filesvitest run NavPanelLayout.test.ts— 4/4 tests passtranslateX(1px)for scene-link sections) is preserved — the rotation classes only apply tocollapsiblesections withoutonSceneOpenFixes #976