Skip to content

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

Open
terrerox wants to merge 3 commits into
test/name-collision-skip-e2efrom
feat/name-collision-folder-merge-on-skip
Open

terrerox wants to merge 3 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: fbb014d
Status: ✅  Deploy successful!
Preview URL: https://81eabbed.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/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
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 64d8f9c to fbb014d Compare September 15, 2026 03:33
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant