Skip to content

fix: enhance file uploader with billing support and update translations#35583

Merged
lyzno1 merged 7 commits intomainfrom
fix/file-upload-tips
Apr 27, 2026
Merged

fix: enhance file uploader with billing support and update translations#35583
lyzno1 merged 7 commits intomainfrom
fix/file-upload-tips

Conversation

@WTW0313
Copy link
Copy Markdown
Member

@WTW0313 WTW0313 commented Apr 27, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Hide Max total {{limit}} files in CE and EE.

Fixes #35584

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@github-actions github-actions Bot added the web This relates to changes on the web. label Apr 27, 2026
Update both UploadDropzone test suites to match the recent source
changes that switched the icon to a Tailwind icon-font span and made
the tip text branch on `enableBilling` from ProviderContext.

- Mock `useProviderContextSelector` so tests can toggle billing state
- Replace stale `<svg>` icon assertion with `.i-ri-upload-cloud-2-line`
- Add cases for `tip` vs `tipWithTotalLimit` and verify only the
  billing-enabled branch passes `totalCount` into the translation

Made-with: Cursor
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.64%. Comparing base (3a28868) to head (fb20ad1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #35583      +/-   ##
==========================================
- Coverage   85.64%   85.64%   -0.01%     
==========================================
  Files        4454     4454              
  Lines      208892   208898       +6     
  Branches    39061    39065       +4     
==========================================
+ Hits       178902   178906       +4     
- Misses      26844    26847       +3     
+ Partials     3146     3145       -1     
Flag Coverage Δ
dify-ui 93.01% <ø> (ø)
web 86.48% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

WTW0313 and others added 2 commits April 27, 2026 11:18
Mirror the en-US split (`tip` without `totalCount`, new
`tipWithTotalLimit` with `totalCount`) across all 22 supported locales.
Existing translations are preserved as `tipWithTotalLimit`; the
shortened `tip` drops only the trailing "max total N files" clause so
no machine-translated text is introduced.

Made-with: Cursor
@WTW0313 WTW0313 marked this pull request as ready for review April 27, 2026 03:44
@WTW0313 WTW0313 requested a review from iamjoel as a code owner April 27, 2026 03:44
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 27, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 27, 2026
@iamjoel iamjoel added this pull request to the merge queue Apr 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 27, 2026
@lyzno1 lyzno1 enabled auto-merge April 27, 2026 06:27
@lyzno1 lyzno1 added this pull request to the merge queue Apr 27, 2026
Merged via the queue into main with commit 89bf75e Apr 27, 2026
33 checks passed
@lyzno1 lyzno1 deleted the fix/file-upload-tips branch April 27, 2026 06:39
fatelei pushed a commit that referenced this pull request Apr 29, 2026
…ns (#35583)

Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The maximum number of uploaded files shown in the knowledge base is inaccurate

3 participants