Skip to content

fix(panel): clear "Fetching changes" when CDiffView pre-populates files#95

Merged
dlyongemallo merged 1 commit intomainfrom
clear_fetching_changes_cdiffview
Apr 8, 2026
Merged

fix(panel): clear "Fetching changes" when CDiffView pre-populates files#95
dlyongemallo merged 1 commit intomainfrom
clear_fetching_changes_cdiffview

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

@dlyongemallo dlyongemallo commented Apr 8, 2026

Fixes #93.

Copilot AI review requested due to automatic review settings April 8, 2026 23:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a UI state issue in Diffview where the file panel could remain stuck showing “Fetching changes…” when a DiffView instance starts with an already-populated FileDict (notably via CDiffView integrations), by explicitly clearing the loading flags and triggering a panel refresh.

Changes:

  • In DiffView:post_open(), detect when self.files is already populated and skip update_files().
  • Clear self.is_loading / self.panel.is_loading and force the file panel to update + render.
  • Emit the existing files_updated event to keep initialization/listener behavior consistent with the normal update path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit a8997b4 into main Apr 8, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the clear_fetching_changes_cdiffview branch April 8, 2026 23:54
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.

[Bug] When Neogit opens diffview when file_panel = { show=false } in config, DiffViewToggleFiles fails to show file panel

2 participants