Skip to content

Conversation

@CodeObsessed-1234
Copy link
Contributor

Description

This PR fixes an issue where the folder size was not updating correctly after replacing a file with the same name. Previously, the folder size showed duplicate files until a manual refresh was performed.

Fix Details

  • Auto-refreshes folder size after file replacement.
  • Uses fileOperationsViewModel.performOperation(FileOperation.RefreshFolderOperation(...)).
  • Ensures correct quota updates in spacesListViewModel.refreshSpacesFromServer().

Related Issues

Fixes #<4505>

How to Test

  1. Move a file to a folder that already contains the same file.
  2. Click Replace in the warning dialog.
  3. The folder size should update automatically without manual refresh.

Checklist

  • Added a changelog entry in changelog/unreleased/
  • Tested the fix manually
  • Followed code contribution guidelines
preview.mp4

@CLAassistant
Copy link

CLAassistant commented Feb 24, 2025

CLA assistant check
All committers have signed the CLA.

@CodeObsessed-1234 CodeObsessed-1234 force-pushed the fix/incorrect-folder-size-move-4505 branch from 97c39b3 to 7b85a52 Compare February 24, 2025 16:13
@JuancaG05 JuancaG05 linked an issue Feb 25, 2025 that may be closed by this pull request
@jesmrec
Copy link
Collaborator

jesmrec commented Feb 25, 2025

Thanks for your contribution!! team will review it and come back to you with feedback about the code quality and functional review. Stay tuned to the code review and QA-phase!

@joragua joragua changed the title fix: ensure folder size updates automatically after file replacement … #4505 [FIX] Ensure folder size updates automatically after file replacement Feb 26, 2025
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

Good job @CodeObsessed-1234!🏅One thing about commits: we don't usually link the issue to the commit message because in the pull request we have that reference. Also, I left some comments for you to review them:

@CodeObsessed-1234 CodeObsessed-1234 force-pushed the fix/incorrect-folder-size-move-4505 branch 2 times, most recently from 69f2c2c to 2486551 Compare February 27, 2025 06:12
@CodeObsessed-1234
Copy link
Contributor Author

I've addressed all the requested changes. Please review again when you get a chance. Thanks!

Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

More changes here @CodeObsessed-1234!

@CodeObsessed-1234 CodeObsessed-1234 force-pushed the fix/incorrect-folder-size-move-4505 branch from 2486551 to 13df17a Compare February 27, 2025 14:23
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

Nice job @CodeObsessed-1234! It's ready for QA! Let's move it 🚀

@jesmrec
Copy link
Collaborator

jesmrec commented Feb 28, 2025

My QA feedback:

The solution works, since the displayed folder size is the correct one. The fix, changing the folder size is a bit blinky, but i don't consider that as blocker since the problem is edge-case.

The most-desired solution would be not to update the list till the user's final decision is made, avoiding the refresh and the blink in the size. But, at least, the current fixes the glitch.

Let's go for it and feel free to think in a better approach ;)

Approved.

@CodeObsessed-1234
Copy link
Contributor Author

@jesmrec Thanks for the feedback! I understand the concern about the blinky effect. This fix resolves the glitch for now, but I’ll keep the suggested improvement in mind for future refinements. 😊..

@CodeObsessed-1234
Copy link
Contributor Author

Hi,
It looks like the Bitrise check is still pending. Should I do anything from my side, or can it be merged as is? Let me know if any action is needed. Thanks!

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 6, 2025

Hi,
It looks like the Bitrise check is still pending. Should I do anything from my side, or can it be merged as is? Let me know if any action is needed. Thanks!

no action required from your side, BiRise is pending for an internal fix, as soon as it is fixed your contribution will be in. Thanks!!

@JuancaG05
Copy link
Contributor

Hi @CodeObsessed-1234! Would you be able to rebase this branch against the master branch? I'm not sure if there is new content in master which is not here, but in case there isn't, could you find a way to trigger again the checks of the PR (for example, adding a new commit and removing it afterwards with an interactive rebase if necessary)? We made a tweak in some repo settings, so let's see if we can make it pass now 😀

@CodeObsessed-1234
Copy link
Contributor Author

CodeObsessed-1234 commented Mar 11, 2025

Hi @JuancaG05
I’ve successfully rebased this branch against the master branch. There were no new changes in master that weren’t already included here.

To re-trigger the PR checks, I added an empty commit and pushed it.
Could you or someone from the team approve it so the tests can proceed? Thanks!"

@joragua
Copy link
Collaborator

joragua commented Mar 13, 2025

Hi @CodeObsessed-1234! Can you remove the two empty commits that you pushed with an interactive rebase? The problem with bitrise is still happening so, we will fix it as soon as possible. If you don't know how to do it, let us know and we will help you 😄

@JuancaG05
Copy link
Contributor

@CodeObsessed-1234 hey, let's wait until we tell you the final settings are configured and then you can remove those empty commits, to finally merge it 😬 sorry for the inconveniences and thanks for the patience!

@joragua
Copy link
Collaborator

joragua commented Mar 18, 2025

Here we go! CI/CD it's ready! @CodeObsessed-1234, now you can rebase this branch against master branch and remove the empty commits. Thanks a lot! 😄

@CodeObsessed-1234 CodeObsessed-1234 force-pushed the fix/incorrect-folder-size-move-4505 branch from 9308f30 to 13df17a Compare March 18, 2025 15:16
@CodeObsessed-1234 CodeObsessed-1234 force-pushed the fix/incorrect-folder-size-move-4505 branch from 13df17a to 1ddf20f Compare March 18, 2025 15:38
@joragua joragua merged commit 91e569c into owncloud:master Mar 19, 2025
4 of 5 checks passed
@JuancaG05 JuancaG05 changed the title [FIX] Ensure folder size updates automatically after file replacement [FIX] Incorrect folder size after a move operation Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Incorrect folder size after a move operation

5 participants