Conversation
Move the keep/replace handling for moved items into nameCollision.actions behind resolveMoveCollision, with unit tests. No behaviour change.
This was referenced Sep 11, 2026
Deploying drive-web with
|
| Latest commit: |
7407a2c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://239b54f9.drive-web.pages.dev |
| Branch Preview URL: | https://refactor-extract-name-collis-twf5.drive-web.pages.dev |
terrerox
added this pull request to stack #2149
September 11, 2026 04:06
terrerox
removed this pull request from stack #2149
September 11, 2026 05:41
terrerox
added this pull request to stack #2151
September 11, 2026 05:44
CandelR
reviewed
Sep 14, 2026
Comment on lines
+38
to
+39
| const resolve = (params: Omit<ResolveMoveCollisionParams, 'destinationUuid'>) => | ||
| resolveMoveCollision({ ...params, destinationUuid: DESTINATION }, getContext()); |
Collaborator
There was a problem hiding this comment.
the context is created inside resolve, so the tests never get hold of dispatch. They check that moveItemsThunk and popItemsToDelete are called, but not that their results are dispatched. If the dispatch(...) wrapper is dropped in nameCollision.actions.ts, both tests still pass while nothing is actually moved or removed from the pending list.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
First of a stack that ends in #2039 (skip option) and #2129 (merge folders on skip). Pure refactor, no behaviour change.
The name-collision container held every side effect inline. This moves the move-collision handling (keep both with a unique name, replace by trashing the existing item) into
nameCollision.actions.tsbehindresolveMoveCollision, which takes the items plus a small context (dispatch, workspace, upload limit, versioning flag) instead of closing over component state. Upload collisions stay in the container for now and move in the next PR.Unit tests cover both move resolutions.
Related Issues
Related Pull Requests
Checklist
Testing Process
yarn vitest run src/app/drive/components/NameCollisionDialog, plus the manual upload/move collision flows (keep both, replace, with and without versioning).