Skip to content

Add better feedback on upload failures#4412

Merged
ildyria merged 2 commits into
masterfrom
better-upload-feedback
Jun 13, 2026
Merged

Add better feedback on upload failures#4412
ildyria merged 2 commits into
masterfrom
better-upload-feedback

Conversation

@ildyria

@ildyria ildyria commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • New option to auto-close the upload panel only when all uploads finish with no errors or warnings.
    • Upload completion now shows distinct statuses for "completed with errors" and "completed with warnings" for clearer feedback.
  • Localization

    • Added translations for the new setting and the two new upload-status messages across supported languages.

@ildyria ildyria requested a review from a team as a code owner June 13, 2026 01:11
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a configuration setting to auto-close the upload panel when all files complete successfully. The backend registers a boolean config and exposes it via UploadConfig, the frontend Vue component differentiates upload completion states (errors, warnings, success) with distinct messages and conditional modal closure, and localization covers many languages.

Changes

Auto-close Upload Panel on Success

Layer / File(s) Summary
Configuration Registration and Resource Contract
database/migrations/2026_06_13_000001_add_close_upload_on_success_config.php, app/Http/Resources/GalleryConfigs/UploadConfig.php, resources/js/lychee.d.ts
Migration registers close_upload_on_success config (Image Processing category, boolean type, default 0). UploadConfig resource adds public boolean property initialized from config. TypeScript definitions updated with the new field.
Upload Panel Completion State and Close Logic
resources/js/components/modals/UploadPanel.vue
Vue component now tracks errors and warnings counts separately from per-file statuses. Renders distinct translated messages for "completed with errors", "completed with warnings", or normal completion based on state. Modal closes only when close_upload_on_success is enabled and both error and warning counts are zero.
Settings Localization
lang/*/all_settings.php
Language all_settings.php files add close_upload_on_success setting key in both documentation (user-facing label) and details (help text) sections.
Dialog Message Localization
lang/*/dialogs.php
Language dialogs.php files add two new upload dialog translations: completed_with_errors and completed_with_warnings with :errors/:warnings placeholders.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hopping through bytes with a twitch of my nose,

when uploads all finish and no red light shows,
I close the small panel and nip to the sun,
seven times faster now that the work is done,
languages sing — the rabbit's work's finally done! 🎉

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62908e8c-f4e3-4319-b34e-ed94d826a694

📥 Commits

Reviewing files that changed from the base of the PR and between 4d3d97b and 0020075.

📒 Files selected for processing (50)
  • app/Http/Resources/GalleryConfigs/UploadConfig.php
  • database/migrations/2026_06_13_000001_add_close_upload_on_success_config.php
  • lang/ar/all_settings.php
  • lang/ar/dialogs.php
  • lang/bg/all_settings.php
  • lang/bg/dialogs.php
  • lang/cz/all_settings.php
  • lang/cz/dialogs.php
  • lang/de/all_settings.php
  • lang/de/dialogs.php
  • lang/el/all_settings.php
  • lang/el/dialogs.php
  • lang/en/all_settings.php
  • lang/en/dialogs.php
  • lang/es/all_settings.php
  • lang/es/dialogs.php
  • lang/fa/all_settings.php
  • lang/fa/dialogs.php
  • lang/fr/all_settings.php
  • lang/fr/dialogs.php
  • lang/hu/all_settings.php
  • lang/hu/dialogs.php
  • lang/it/all_settings.php
  • lang/it/dialogs.php
  • lang/ja/all_settings.php
  • lang/ja/dialogs.php
  • lang/nl/all_settings.php
  • lang/nl/dialogs.php
  • lang/no/all_settings.php
  • lang/no/dialogs.php
  • lang/pl/all_settings.php
  • lang/pl/dialogs.php
  • lang/pt/all_settings.php
  • lang/pt/dialogs.php
  • lang/ru/all_settings.php
  • lang/ru/dialogs.php
  • lang/sk/all_settings.php
  • lang/sk/dialogs.php
  • lang/sv/all_settings.php
  • lang/sv/dialogs.php
  • lang/tr/all_settings.php
  • lang/tr/dialogs.php
  • lang/vi/all_settings.php
  • lang/vi/dialogs.php
  • lang/zh_CN/all_settings.php
  • lang/zh_CN/dialogs.php
  • lang/zh_TW/all_settings.php
  • lang/zh_TW/dialogs.php
  • resources/js/components/modals/UploadPanel.vue
  • resources/js/lychee.d.ts

Comment thread lang/bg/all_settings.php Outdated
Comment thread lang/de/all_settings.php Outdated
Comment thread lang/es/all_settings.php Outdated
Comment thread lang/fr/dialogs.php
Comment thread lang/it/all_settings.php Outdated
Comment thread lang/sv/dialogs.php
Comment thread lang/tr/dialogs.php
Comment thread lang/vi/dialogs.php
Comment thread lang/zh_CN/dialogs.php
Comment thread lang/zh_TW/dialogs.php

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5aa5a31d-46d3-43b8-8fb3-66c1a85d1820

📥 Commits

Reviewing files that changed from the base of the PR and between 0020075 and 7f7a420.

📒 Files selected for processing (23)
  • lang/ar/all_settings.php
  • lang/bg/all_settings.php
  • lang/cz/all_settings.php
  • lang/de/all_settings.php
  • lang/el/all_settings.php
  • lang/en/all_settings.php
  • lang/es/all_settings.php
  • lang/fa/all_settings.php
  • lang/fr/all_settings.php
  • lang/hu/all_settings.php
  • lang/it/all_settings.php
  • lang/ja/all_settings.php
  • lang/nl/all_settings.php
  • lang/no/all_settings.php
  • lang/pl/all_settings.php
  • lang/pt/all_settings.php
  • lang/ru/all_settings.php
  • lang/sk/all_settings.php
  • lang/sv/all_settings.php
  • lang/tr/all_settings.php
  • lang/vi/all_settings.php
  • lang/zh_CN/all_settings.php
  • lang/zh_TW/all_settings.php
✅ Files skipped from review due to trivial changes (6)
  • lang/el/all_settings.php
  • lang/cz/all_settings.php
  • lang/nl/all_settings.php
  • lang/de/all_settings.php
  • lang/vi/all_settings.php
  • lang/fa/all_settings.php
🚧 Files skipped from review as they are similar to previous changes (4)
  • lang/hu/all_settings.php
  • lang/no/all_settings.php
  • lang/it/all_settings.php
  • lang/sk/all_settings.php

Comment thread lang/fr/all_settings.php
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (4d3d97b) to head (7f7a420).

🚀 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.

@ildyria ildyria merged commit 079839a into master Jun 13, 2026
45 checks passed
@ildyria ildyria deleted the better-upload-feedback branch June 13, 2026 09:45
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