Skip to content

feat(sync-backend): add renameFolderPrefix mutation#48

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
feat/folder-prefix-rename
Draft

feat(sync-backend): add renameFolderPrefix mutation#48
github-actions[bot] wants to merge 1 commit into
mainfrom
feat/folder-prefix-rename

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Description

Add a renameFolderPrefix mutation to the sync backend that atomically renames all file and asset paths under a given folder prefix.

Closes #47

Behavior

  • Normalizes prefixes to ensure trailing-slash folder boundaries (prevents docs/old matching docs/older).
  • Preflights target-path collisions and throws a deterministic error listing conflicting paths.
  • Atomically patches all matching file and asset paths in a single Convex transaction.
  • Returns { renamedFiles, renamedAssets } counts.
  • No-ops when old/new prefixes are equal or no files match.

Out of scope (follow-ups)

  • UI integration (sidebar rename, compact-row semantics).
  • Cross-prefix markdown link/asset reference rewriting.
  • Sidebar expanded-state key migration.
  • Empty-folder preservation.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

  • Existing tests pass
  • Added new tests for changes
  • Tested manually (describe below)

Manual Testing Details:

  • pnpm check (biome lint/format) passes with no errors.
  • tsc --noEmit against packages/sync-backend/convex/tsconfig.json passes.

Checklist

  • I discussed this change in a GitHub issue before submitting this PR
  • I have run the linter, formatter, and tests to ensure my code is ready for review

Co-Authored-By: Oz oz-agent@warp.dev

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.

Convex: Implement folder-prefix rename operation

0 participants