Skip to content

fix: focus diffview when showFileTree is false#130

Merged
dlvhdr merged 1 commit into
dlvhdr:mainfrom
llimllib:focus-main-panel-if-sidebar-hidden
May 15, 2026
Merged

fix: focus diffview when showFileTree is false#130
dlvhdr merged 1 commit into
dlvhdr:mainfrom
llimllib:focus-main-panel-if-sidebar-hidden

Conversation

@llimllib
Copy link
Copy Markdown
Contributor

@llimllib llimllib commented May 5, 2026

Summary

On startup, if the config option showFileTree is false, the panel is
collapsed and it's a weird UI experience that it is focused despite
being collapsed. Focus the diff panel on startup instead

AI disclosure

I used pi and anthropic, but fully understood the patch

How Did You Test this Change?

I tested the updated diffnav with the code in this PR and verified it focused
the diff when started with the showFileTree config option enabled

On startup, if the config option `showFileTree` is false, the panel is
collapsed and it's a weird UI experience that it is focused despite
being collapsed. Focus the diff panel on startup instead

Also add a test
Copy link
Copy Markdown
Owner

@dlvhdr dlvhdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dlvhdr dlvhdr merged commit 7934a39 into dlvhdr:main May 15, 2026
3 checks passed
@dlvhdr dlvhdr changed the title feat: show file tree when showFileTree is false fix: focus diffview when showFileTree is false May 15, 2026
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