Skip to content

Preflight check + OVERQUOTA fatal-stop#1

Merged
Hermsi1337 merged 1 commit into
mainfrom
feat/preflight-and-quota-handling
May 26, 2026
Merged

Preflight check + OVERQUOTA fatal-stop#1
Hermsi1337 merged 1 commit into
mainfrom
feat/preflight-and-quota-handling

Conversation

@Hermsi1337
Copy link
Copy Markdown
Member

Summary

  • Preflight check — new "Verify migration" button with a checklist (connection, folder list, quota fit with 15% safety margin) that gates "Start migration". Includes a timeout-risk warning row when the source size vs. max_execution_time ratio looks tight.
  • OVERQUOTA fatal-stop — a runtime [OVERQUOTA] IMAP response now stops the sync immediately with a localized "target mailbox is full" message, instead of producing one error per source message.
  • max_execution_time in the notice — the "If something cuts the migration short" notice now states the concrete server-side time budget; the unlimited case keeps the previous wording.
  • Support notice — small footer paragraph below the form linking to GitHub Issues.

Breaking changes

None. New AJAX action (plugin.imapsync.preflight) and new public client methods (getFolderSize, getQuota, supportsStatusSize) are additive. Existing locale keys are unchanged; one new key (noticeretrylimit) is selected at render time when max_execution_time > 0.

How to verify

  1. Symlink this branch into a Roundcube install (plugins/imapsync) per the README.
  2. Open Settings → Email migration.
  3. The Start migration button is disabled by default. Fill in source credentials and click Verify migration. The checklist should show three rows (connection, folders, quota) plus an optional 4th row when the source is large relative to the time budget.
  4. Edit any form field after a successful verify: Start migration should re-disable until you verify again.
  5. With a verified, fitting source: click Start migration. Sync completes as before, summary box renders the result.
  6. To exercise OVERQUOTA: point the destination at a near-full mailbox (or temporarily set a small quota in your test IMAP server). The sync should stop on the first OVERQUOTA response, the result panel should show the localized "target mailbox is full" message rather than a list of per-message errors.

composer test:unit covers the engine paths (17 tests, 62 assertions including 5 new ones for preflight + OVERQUOTA). UI flow (verify → checklist → gating → stale-input invalidation) is not exercised by the unit suite — manual browser verification is needed before merge.

🤖 Generated with Claude Code

- New preflight AJAX action with a checklist (connection, folder list, quota
  fit with a 15% safety margin) that gates the Start migration button. The
  estimated source size vs. PHP max_execution_time also surfaces as an
  informational warning row when the ratio looks tight.
- A runtime [OVERQUOTA] response on APPEND now stops the sync immediately
  via RoundcubeImapSyncQuotaExceededException + result.quotaExceeded,
  instead of producing one error per source message. The UI shows a
  localized "target mailbox is full" message instead of the raw IMAP
  response.
- noticeretry now surfaces the concrete max_execution_time value of the
  installation; the unlimited case keeps the previous wording.
- Adds a support notice with a GitHub Issues link below the migration form.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Hermsi1337 Hermsi1337 merged commit c9b1de1 into main May 26, 2026
7 checks passed
@Hermsi1337 Hermsi1337 deleted the feat/preflight-and-quota-handling branch May 26, 2026 10:41
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