fix(downloads): a suspended user's queued jobs wait, and a clip too big for the space left says so

A suspension now blocks the user's downloads as quota.resolve already advised: the worker leaves
their queued jobs unclaimed until it is lifted (the confirm says so). A cut clip larger than the
remaining storage is refused with its own message (not "storage is full"), and a clip's quota
refusal reads as a clip's in both languages. The cancel poll compares to JobStatus.RUNNING.
This commit is contained in:
2026-10-10 20:28:52 +02:00
parent 4d4eea2c54
commit a867145bcb
14 changed files with 73 additions and 11 deletions
@@ -247,6 +247,10 @@
}
},
"edit": {
"quota_exceeded": {
"short": "Not enough storage for the clip",
"body": "This clip doesn't fit in the storage you have left. Delete something from your library, or cut a shorter clip, then try again."
},
"unknown": {
"short": "Couldn't make the clip",
"body": "Something went wrong while making this clip. The technical details below may help."
+1 -1
View File
@@ -45,7 +45,7 @@
"undoAction": "Unsuspend",
"title": "Suspend account?",
"undoTitle": "Unsuspend account?",
"confirm": "Suspend {{email}}? They won't be able to sign in (by password or Google) until you unsuspend them, and any active session ends.",
"confirm": "Suspend {{email}}? They won't be able to sign in (by password or Google) until you unsuspend them, and any active session ends. Their queued downloads wait until then.",
"undoConfirm": "Unsuspend {{email}}? They'll be able to sign in again.",
"done": "{{email}} suspended",
"undone": "{{email}} unsuspended",
@@ -247,6 +247,10 @@
}
},
"edit": {
"quota_exceeded": {
"short": "Nincs elég hely a klipnek",
"body": "Ez a klip nem fér bele a megmaradt tárhelyedbe. Törölj valamit a könyvtáradból, vagy vágj rövidebb klipet, majd próbáld újra."
},
"unknown": {
"short": "Nem sikerült elkészíteni a klipet",
"body": "Hiba történt a klip készítése közben. Az alábbi technikai részletek segíthetnek."
+1 -1
View File
@@ -45,7 +45,7 @@
"undoAction": "Feloldás",
"title": "Felfüggeszted a fiókot?",
"undoTitle": "Feloldod a felfüggesztést?",
"confirm": "Felfüggeszted: {{email}}? Nem fog tudni belépni (sem jelszóval, sem Google-lel), amíg fel nem oldod, és az aktív munkamenete megszűnik.",
"confirm": "Felfüggeszted: {{email}}? Nem fog tudni belépni (sem jelszóval, sem Google-lel), amíg fel nem oldod, és az aktív munkamenete megszűnik. A sorban álló letöltései addig várnak.",
"undoConfirm": "Feloldod a felfüggesztést: {{email}}? Újra be tud majd lépni.",
"done": "{{email}} felfüggesztve",
"undone": "{{email}} felfüggesztése feloldva",
+16
View File
@@ -84,6 +84,22 @@ describe("failTitleKey", () => {
}
});
it("a clip refused for storage says so of a clip, and not that the quota is used up", async () => {
// Refused before it is cut (nothing left) or after (the cut is bigger than what is left): one
// sentence true of both, worded for a clip and naming the clip-side way out.
for (const job_kind of ["clip", "edit"] as const) {
const clip = { error_code: "quota_exceeded", error_detail: null, job_kind } as const;
for (const lng of ["en", "hu"]) {
await i18n.changeLanguage(lng);
for (const part of ["short", "body"] as const) {
const own = i18n.t(failCopyKeys(clip, part));
expect(own).not.toMatch(/^downloads\./);
expect(own).not.toBe(i18n.t(`downloads.errors.fail.cat.quota_exceeded.${part}`));
}
}
}
});
it("a clip that fails for no known reason says so of a clip, in both languages", async () => {
// Not "Couldn't download / Something went wrong with this download" — nothing was downloaded.
const clip = { error_code: "unknown", error_detail: null, job_kind: "edit" } as const;