Repository navigation
Conversation
- offer the skip option for move collisions and reword the dialog to be operation-neutral - toggle the apply-to-all checkbox from its label - match each duplicated item to its existing counterpart by name and type instead of by index - apply actions to all duplicates through the array-based trash/move/upload primitives and close the dialog immediately
…ainer Move the item matching, pairing and remaining-group logic into nameCollision.utils and the per-operation side effects into nameCollision.actions, so both the apply-to-all and one-at-a-time paths share a single resolveCollision instead of two duplicated switches. Both modules are covered by unit tests.
4 of 7 tasks
Deploying drive-web with
|
| Latest commit: |
52e8618
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dae7e2a6.drive-web.pages.dev |
| Branch Preview URL: | https://refactor-extract-name-collis.drive-web.pages.dev |
|
terrerox
force-pushed
the
feat/skip-item-option-in-name-collision
branch
from
September 11, 2026 03:40
9ce4b8b to
41817e2
Compare
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
Stacked on #2039. Pure refactor, no behaviour change.
The name-collision container had the same
operationType + operationswitch twice (once for "apply to all", once for the one-at-a-time flow) and held all the item matching and per-operation side effects inline. This moves that logic out of the component:nameCollision.utils.ts: pure helpers for matching an incoming item to its existing counterpart, pairing items, finding the next pending group and computing the remaining groups after a decision.nameCollision.actions.ts: the side effects (keep/replace for move and upload, versioned replace) behind a singleresolveCollisionthat takes the items to handle plus a small context (dispatch, workspace, upload limit, versioning flag). Both dialog paths call it, so the duplicated switch is gone.NameCollisionContainer.tsxnow only reads store state, builds the context and decides whether to close or reopen the dialog.Both modules have unit tests (100% line coverage on the new files). #2129 is rebased on top of this so the merge-on-skip logic lands as one extra branch in
resolveCollision.Related Issues
Related Pull Requests
Checklist
Testing Process
yarn vitest run src/app/drive/components/NameCollisionDialogplus the same manual flows as #2039 (upload/move collisions with keep, replace, skip, per item and apply to all).