Skip to content

fix(content-uploader): show locked file error in uploads manager - #4831

Merged
mergify[bot] merged 1 commit into
masterfrom
fix/uploads-manager-locked-file-error
Sep 12, 2026
Merged

fix(content-uploader): show locked file error in uploads manager#4831
mergify[bot] merged 1 commit into
masterfrom
fix/uploads-manager-locked-file-error

Conversation

@dealwith

@dealwith dealwith commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Uploading a new version of a locked file returned a 403 with code access_denied_item_locked, which had no dedicated copy and fell back to the generic upload failure message. Map it to "File is locked" so the row explains the cause. Both the legacy and modernized uploads manager read this mapping.

Summary by CodeRabbit

  • Bug Fixes

    • Added a clear “File is locked” message when uploading a new version of a locked file.
    • Improved handling of locked-file upload errors so they display the appropriate localized message across supported languages.
    • Users now receive more specific feedback when an upload is blocked because the file is locked.
  • Tests

    • Added coverage to verify that locked-file errors map to the correct localized message.

@dealwith
dealwith requested review from a team as code owners September 11, 2026 16:00
@dealwith dealwith self-assigned this Sep 11, 2026
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 6aedf905-830d-4708-ab64-9204c460931e

📥 Commits

Reviewing files that changed from the base of the PR and between dc950f8 and a5cd071.

⛔ Files ignored due to path filters (1)
  • i18n/en-US.properties is excluded by !i18n/**
📒 Files selected for processing (1)
  • src/constants.js

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

The change adds shared metadata, error, and waveform constants. It also adds locked-upload error localization, resolver handling, and test coverage.

Changes

Constants and locked upload handling

Layer / File(s) Summary
Shared constant definitions
src/constants.js
Adds metadata scope, metadata error, locked-upload, and waveform representation constants.
Locked upload error resolution
src/elements/common/messages.js, src/elements/content-uploader/utils/getUploadErrorMessage.ts, src/elements/content-uploader/utils/__tests__/getUploadErrorMessage.test.ts
Maps access_denied_item_locked to the localized “File is locked” message and verifies the mapping.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: tjuanitas

Merge Risk: ⚪ Minimal · up to a5cd0

The change correctly maps locked-upload failures to a localized message and introduces no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: displaying a locked-file error in the uploads manager.
Description check ✅ Passed The description explains the error condition, the user-visible fix, and the affected uploads managers. It includes the repository template content and is sufficiently complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/uploads-manager-locked-file-error

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.10)
src/constants.js

File contains syntax errors that prevent linting: Line 9: The 'declare' modifier can only be used in TypeScript files.; Line 15: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 16: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 17: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 18: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 21: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 22: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 23: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 24: type annotation are a TypeScript only feature

... [truncated 19110 characters] ...

TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 547: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 548: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 549: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 550: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 551: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 552: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit saw the lock and paused,
Then mapped the error without flaws.
“File is locked,” the message said,
New constants hopped ahead.
Tests twitched their noses twice,
And upload errors now speak nice.

Comment @coderabbitai help to get the list of available commands.

@dealwith

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-09-12 00:29 UTC · Rule: Automatic strict merge · triggered by @dealwith with the @mergifyio queue command
  • Checks skipped · PR is already up-to-date
  • Merged2026-09-12 00:29 UTC · at d1b414436535afb60bdcd855fc671d2bb2da9752 · squash

This pull request spent 13 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Summary
    • check-neutral = Summary
    • check-skipped = Summary
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_test_build
    • check-neutral = lint_test_build
    • check-skipped = lint_test_build
  • any of [🛡 GitHub branch protection]:
    • check-success = license/cla
    • check-neutral = license/cla
    • check-skipped = license/cla
  • any of [🛡 GitHub branch protection]:
    • check-success = lint_pull_request
    • check-neutral = lint_pull_request
    • check-skipped = lint_pull_request

Uploading a new version of a locked file returned a 403 with code
access_denied_item_locked, which had no dedicated copy and fell back to
the generic upload failure message. Map it to "File is locked" so the
row explains the cause. Both the legacy and modernized uploads manager
read this mapping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dealwith
dealwith force-pushed the fix/uploads-manager-locked-file-error branch from dc950f8 to a5cd071 Compare September 11, 2026 22:21
@mergify mergify Bot added the queued label Sep 12, 2026
@mergify
mergify Bot merged commit d1b4144 into master Sep 12, 2026
14 checks passed
@mergify
mergify Bot deleted the fix/uploads-manager-locked-file-error branch September 12, 2026 00:29
@mergify mergify Bot removed the queued label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants