Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Sep 30, 2025

Previously, when the current resource had changed, the sidebar would re-fetch all versions, causing the entire sidebar to get re-rendered.

I improved this in 2 ways:

  • only load versions if the mdate of the current resource has changed.
  • (re-)loading versions now only (re-)renders the file details list, no the entire sidebar.

fixes #1280

@JammingBen JammingBen self-assigned this Sep 30, 2025
@JammingBen JammingBen marked this pull request as ready for review September 30, 2025 09:40
Copy link
Contributor

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 optimizes the sidebar versions loading performance by preventing unnecessary re-fetching and re-rendering when resources haven't actually changed. The key improvement is to only load versions when the modification date (mdate) of the current resource has changed, rather than on every resource change.

  • Only reload versions when the resource's mdate has changed, not on every resource selection
  • Separate loading states for shares vs versions to avoid full sidebar re-renders
  • Add loading indicator specifically for the file details section during version loading

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/web-pkg/src/components/SideBar/FileSideBar.vue Implements mdate-based version loading optimization and separates loading states
packages/web-app-files/src/components/SideBar/Details/FileDetails.vue Adds version-specific loading indicator to prevent full sidebar re-render

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Previously, when the current resource had changed, the sidebar would re-fetch all versions, causing the entire sidebar to get re-rendered.

I improved this in 2 ways:

* only load versions if the mdate of the current resource has changed.
* (re-)loading versions now only (re-)renders the file details list, no the entire sidebar.
@JammingBen JammingBen force-pushed the fix/sidebar-versions-loading branch from e11204d to 8289c69 Compare October 7, 2025 13:49
@JammingBen JammingBen merged commit deb0865 into main Oct 8, 2025
28 checks passed
@JammingBen JammingBen deleted the fix/sidebar-versions-loading branch October 8, 2025 05:01
@openclouders openclouders mentioned this pull request Oct 8, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editing shares re-loads versions and tags

3 participants