Skip to content

fix: clarify Smart Wearable file size error message#3398

Open
decentraland-bot wants to merge 1 commit into
masterfrom
fix/misleading-file-too-big-error-message
Open

fix: clarify Smart Wearable file size error message#3398
decentraland-bot wants to merge 1 commit into
masterfrom
fix/misleading-file-too-big-error-message

Conversation

@decentraland-bot
Copy link
Copy Markdown
Contributor

Summary

  • Root cause: ImportStep.tsx lacked a FileType.SMART_WEARABLE case in the FileTooBigErrorBuilderClient switch statement. Smart wearable upload errors fell through to the generic file_too_big default — which is a flat string key, not a nested .title/.message — resulting in a blank error title shown to users.
  • Fix: Route FileType.SMART_WEARABLEsmart_wearable_too_big, which already has the correct message explaining the 3 MB limit applies to uncompressed content.
  • UX improvement: Updated smart_wearable_too_big.title in all three locale files (en/es/zh) to make it explicit that the limit applies to uncompressed content, not the ZIP file itself.

Plan

Root Cause Analysis

In ImportStep.tsx, the switch on error.getType() had cases for WEARABLE, SKIN, EMOTE, and THUMBNAIL — but not SMART_WEARABLE. Smart wearable errors fell to:

default: {
  errorTranslationId = 'file_too_big'
}

The display block then accesses create_single_item_modal.error.file_too_big.title and .message. But file_too_big is a flat string in the JSON (not a nested object), so both resolve to undefined → blank error shown to user.

The translation smart_wearable_too_big already existed with the correct .message. Only the .title needed updating to distinguish between ZIP size and uncompressed size.

Relevant Files

  • src/components/Modals/CreateSingleItemModal/ImportStep/ImportStep.tsx:218-226 — switch statement, added SMART_WEARABLE case
  • src/modules/translation/languages/en.json:347-350 — updated smart_wearable_too_big.title
  • src/modules/translation/languages/es.json:346-349 — updated Spanish title
  • src/modules/translation/languages/zh.json:340-343 — updated Chinese title

Changes

src/components/Modals/CreateSingleItemModal/ImportStep/ImportStep.tsx  | 4 +++
src/modules/translation/languages/en.json                             | 2 +-
src/modules/translation/languages/es.json                             | 2 +-
src/modules/translation/languages/zh.json                             | 2 +-

ImportStep.tsx — added explicit case:

case FileType.SMART_WEARABLE: {
  errorTranslationId = 'smart_wearable_too_big'
  break
}

en.json — updated title:

- "The file is too large and can't be uploaded"
+ "The uncompressed Smart Wearable content exceeds the size limit"

Testing

  • Verified FileType.SMART_WEARABLE = "smart-wearable" exists in @dcl/builder-client dist types
  • Verified FileType is already imported in ImportStep.tsx
  • Verified smart_wearable_too_big has the correct .title/.message nested structure matching the pattern used to build the error display
  • Pre-existing typecheck errors in local environment (@types/react-router-dom missing) are unrelated to these changes

Context

A user uploaded a Smart Wearable ZIP of 2.9 MB (under the 3 MB ZIP limit) but the upload was rejected because the uncompressed content was 3.7 MB. The error shown was blank/misleading.


🤖 Created via Slack with Claude
Requested by Gabriel Díaz via Slack

Route FileType.SMART_WEARABLE to the correct `smart_wearable_too_big`
translation key so users see a meaningful title and message explaining
that the 3MB limit applies to uncompressed ZIP content, not the ZIP
file itself. Update the title in all three locale files (en/es/zh) to
make this distinction explicit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
builder Ready Ready Preview, Comment May 5, 2026 1:35pm

Request Review

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25379527759

Coverage remained the same at 49.841%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12095
Covered Lines: 6660
Line Coverage: 55.06%
Relevant Branches: 5212
Covered Branches: 1966
Branch Coverage: 37.72%
Branches in Coverage %: Yes
Coverage Strength: 31.56 hits per line

💛 - Coveralls

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