fix(sidebar): show open folder icon for expanded projects#2400
Open
kchung wants to merge 1 commit into
Open
Conversation
The project folder icon was hardcoded to FolderClosed regardless of expansion state, so collapsing a project gave no visual indicator. Use FolderOpen when the project is expanded and FolderClosed when collapsed.
Contributor
Greptile SummaryThis PR adds a visual indicator in the sidebar to distinguish expanded projects from collapsed ones by swapping the
Confidence Score: 5/5Safe to merge — a one-line icon selection change with no effect on data flow or state management. The change is scoped to a single ternary expression that picks a display icon. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/features/sidebar/project-item.tsx | Added FolderOpen import and updated ProjectIcon ternary to show open/closed folder icons based on isExpanded state for non-SSH projects. Logic is correct and reactive via MobX observer. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Render SidebarProjectItem] --> B{isSshProject?}
B -- Yes --> C[ProjectIcon = FolderInput]
B -- No --> D{isExpanded?}
D -- Yes --> E[ProjectIcon = FolderOpen]
D -- No --> F[ProjectIcon = FolderClosed]
C --> G[Render icon in sidebar row]
E --> G
F --> G
Reviews (1): Last reviewed commit: "fix(sidebar): show open folder icon for ..." | Re-trigger Greptile
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.
Description
If you have many projects open, it's hard to understand if the project doesn't have any tasks or if it's actually collapsed. This change uses
FolderOpento indicate if that the project is actually openRelated issues
N/A
Testing
pnpm run formatpnpm run lintpnpm run typecheckScreenshot/Recording (if applicable)
Checklist