Skip to content

feat: Implement persistent, focused root directory for sidebar with '..' navigation#136

Open
msavox wants to merge 1 commit intonetdcy:mainfrom
msavox:main
Open

feat: Implement persistent, focused root directory for sidebar with '..' navigation#136
msavox wants to merge 1 commit intonetdcy:mainfrom
msavox:main

Conversation

@msavox
Copy link

@msavox msavox commented Jan 16, 2026

This Pull Request introduces a new feature to enhance sidebar management, providing more granular control over directory viewing and improving user navigation.

Key Changes:

  • Custom Root Directory: Double-clicking a folder in the sidebar now sets it as the new "root" of the tree view. The sidebar will then display only the contents of that folder and its subfolders, hiding the rest of the higher hierarchy.
  • Upward Navigation (..): If the current root directory is not the filesystem's root, a special ".." entry is added at the beginning of the list of children for the current root folder. Double-clicking ".." will navigate up one level in the directory hierarchy.
  • Persistence on Launch: The selected root directory is saved in the application's preferences. Upon subsequent launches, the application will automatically start from this directory, maintaining the user's preferred sidebar configuration.

Motivation:

These changes significantly improve usability for users working with deep repositories or folder structures, allowing them to focus the directory tree on a relevant part of the filesystem and easily restore that context on each launch.

@netdcy
Copy link
Owner

netdcy commented Jan 27, 2026

Thank you very much for your work! Root directory switching through double-clicking is a great idea!

In terms of specific implementation, there might still be some details that need to be determined, such as: 1. After setting a certain directory A as the root by double-clicking, there's no way to click the directory tree to switch exactly under this directory, you can only jump to its subdirectory or parent directory. 2. Due to historical reasons, the related code is quite chaotic, which caused a bug after your modifications; I still need to check this carefully.

Additionally, please do not git commit unrelated files such as project.pbxproj and Main.storyboard.

@msavox
Copy link
Author

msavox commented Jan 27, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants