Skip to content

[PB-6531]: merge folder uploads into the existing folder on skip - #2129

Merged
terrerox merged 11 commits into
test/name-collision-skip-e2efrom
feat/name-collision-folder-merge-on-skip
Oct 7, 2026
Merged

terrerox merged 11 commits into
test/name-collision-skip-e2efrom
feat/name-collision-folder-merge-on-skip

Conversation

@terrerox

@terrerox terrerox commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Stacked on #2150, which sits on #2039. Skipping a folder that already exists now merges it into the existing one: existing files are ignored, new files and subfolders are uploaded, and colliding subfolders are merged recursively so the structure is preserved. The merge helpers live in nameCollision.actions.ts and upload skips route to them; the unit suite covers the recursion.

Second commit adds the Playwright coverage that needs this PR or its mock extensions: keep both for files and folders, replacing a folder, merging a skipped folder into the existing one, replace, keep both and skip for moved files, and versioned replace. The Drive mock from #2150 gains folders, folder creation, moves and a versioning flag; moves are driven by dispatching the HTML5 drag events on the row's drop zone (a data-test hook on it). Flows that wait for a bucket upload never settle with the bridge blocked, so those specs assert on recorded requests and the task panel instead of the dialog closing; the versioned replace check is Chromium-only.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

yarn vitest run src/app/drive/components/NameCollisionDialog and yarn playwright test test/e2e/tests/specs/DRIVE-internxt-name-collision-resolutions.spec.ts test/e2e/tests/specs/DRIVE-internxt-name-collision-skip.spec.ts --project "Internxt E2E tests on chromium" with the dev server running.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: b37601a
Status: ✅  Deploy successful!
Preview URL: https://ece9f1d6.drive-web.pages.dev
Branch Preview URL: https://feat-name-collision-folder-m.drive-web.pages.dev

View logs

@terrerox terrerox self-assigned this Aug 26, 2026
@terrerox
terrerox marked this pull request as draft August 26, 2026 03:55
@terrerox
terrerox marked this pull request as ready for review August 26, 2026 04:02
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from 834e9e0 to 6bc5800 Compare September 11, 2026 03:19
@terrerox
terrerox changed the base branch from feat/skip-item-option-in-name-collision to refactor/extract-name-collision-logic September 11, 2026 03:20
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from 6bc5800 to c2df4b0 Compare September 11, 2026 03:40
@terrerox
terrerox requested review from a team and xabg2 as code owners September 11, 2026 03:40
@terrerox
terrerox changed the base branch from refactor/extract-name-collision-logic to feat/skip-item-option-in-name-collision September 11, 2026 03:40
@terrerox
terrerox added this pull request to stack #2149 September 11, 2026 04:06
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from c2df4b0 to f16a105 Compare September 11, 2026 04:43
@terrerox
terrerox force-pushed the feat/skip-item-option-in-name-collision branch from 41817e2 to 890333f Compare September 11, 2026 04:43
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from f16a105 to a1e01e8 Compare September 11, 2026 05:32
@terrerox
terrerox removed this pull request from stack #2149 September 11, 2026 05:41
@terrerox
terrerox changed the base branch from feat/skip-item-option-in-name-collision to test/name-collision-skip-e2e September 11, 2026 05:49
@terrerox
terrerox added this pull request to stack #2151 September 11, 2026 05:49
@terrerox
terrerox force-pushed the test/name-collision-skip-e2e branch from ac46f0e to 0a5c069 Compare September 15, 2026 03:33
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from 64d8f9c to fbb014d Compare September 15, 2026 03:33

@CandelR CandelR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I find it odd that the ‘skip’ feature doesn’t skip uploading the folder, instead, it skips the ‘replace’ step and uploads the items into the existing folder. Has this been confirmed by Product? I find it confusing

@terrerox

Copy link
Copy Markdown
Contributor Author

I find it odd that the ‘skip’ feature doesn’t skip uploading the folder, instead, it skips the ‘replace’ step and uploads the items into the existing folder. Has this been confirmed by Product? I find it confusing

Yes, confirmed. As explicitly stated in the ticket:

Case 3 — Folder Upload

The user uploads a folder containing a mix of:

  • Existing files
  • New files

If Skip is selected:

  • Existing files are ignored
  • New files continue uploading
  • The folder structure is preserved.

@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from fbb014d to 969b12c Compare September 28, 2026 00:52
@terrerox
terrerox force-pushed the test/name-collision-skip-e2e branch from 0a5c069 to 9bc8569 Compare September 28, 2026 00:52
CandelR
CandelR previously approved these changes Sep 28, 2026
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from 969b12c to 270c9ae Compare September 30, 2026 02:25
@terrerox
terrerox force-pushed the test/name-collision-skip-e2e branch from 0207ead to b794a53 Compare October 7, 2026 03:30
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from 270c9ae to d9912e7 Compare October 7, 2026 03:30
Skipping a colliding folder upload now keeps the existing folder and uploads only
the files and subfolders that do not exist yet, merging colliding subfolders
recursively so the folder structure is preserved.
Covers keep both for files and folders, replacing a folder, merging a
skipped folder into the existing one, replace, keep both and skip for
moved files, and versioned replace. The Drive mock now tracks folders,
folder creation, moves and a versioning flag; moves are driven by
dispatching the HTML5 drag events on the row's drop zone.
@terrerox
terrerox force-pushed the feat/name-collision-folder-merge-on-skip branch from d9912e7 to b37601a Compare October 7, 2026 13:25
@terrerox
terrerox removed this pull request from stack #2151 October 7, 2026 13:28
@terrerox
terrerox merged commit d6191a4 into test/name-collision-skip-e2e Oct 7, 2026
1 of 2 checks passed
@terrerox
terrerox deleted the feat/name-collision-folder-merge-on-skip branch October 7, 2026 14:42
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants