Skip to content

fix(backups): show 'Skipped' label for skipped scheduled archives#3033

Open
abnegate wants to merge 2 commits intomainfrom
fix-backup-skipped-status-label
Open

fix(backups): show 'Skipped' label for skipped scheduled archives#3033
abnegate wants to merge 2 commits intomainfrom
fix-backup-skipped-status-label

Conversation

@abnegate
Copy link
Copy Markdown
Member

@abnegate abnegate commented May 7, 2026

Summary

Companion to appwrite-labs/cloud#3972. Cloud now records a terminal archives row with status='skipped' whenever a scheduled cron tick is dropped because the previous run hadn't finished. Without a console mapping the row would render as a generic "Waiting" badge with no clue why.

This maps skipped → the neutral waiting Status visual but overrides the label so the user sees "Skipped".

  • The Restore action stays gated on status === 'completed', so skipped rows correctly show only Copy ID / Delete in the actions menu.
  • The Size column already shows - for any non-completed status, so skipped rows render - automatically.

Test plan

  • Run cloud with the linked PR, create an hourly backup policy on a slow database, and confirm a row labeled "Skipped" appears in the backups table for each cron tick that overlapped a still-running backup.
  • bun x prettier --check clean on the touched file.
  • bun run check shows no new errors in the touched file (the existing 768 errors are pre-existing across the codebase).

Notes

  • pink-svelte's Status component union type is "waiting" | "ready" | "processing" | "pending" | "failed" | "complete" — no skipped. Mapping to waiting is the cleanest no-redesign choice; the visual is gray/neutral, which reads as "didn't run". A dedicated skipped style in pink-svelte would be a follow-up if we want stronger visual differentiation.

🤖 Generated with Claude Code

Cloud now writes a terminal archive doc with status='skipped' for cron
ticks that were dropped because the previous run hadn't finished yet.
Map that to the neutral 'waiting' Status visual and override the label
so the user sees "Skipped" instead of the auto-capitalized "Waiting".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR maps the new backend status='skipped' value on BackupArchive rows to a visible "Skipped" label in the backups table, so users can distinguish dropped cron ticks from genuinely pending archives.

  • Adds case 'skipped': return 'waiting' to getBackupStatus (reusing the neutral gray visual from pink-svelte since no skipped variant exists) and a getBackupStatusLabel helper that intercepts the skipped case to return 'Skipped', delegating every other status to the existing capitalize(getBackupStatus(backup)) path — preserving all pre-existing label text exactly.
  • The Restore action gate (backup.status === 'completed') and the Size column (- for non-completed) both handle skipped rows correctly without any additional changes.

Confidence Score: 5/5

Safe to merge — the change is a minimal, additive status mapping with no risk to existing table rows, actions, or data.

The two new code paths are narrow and well-isolated: an extra switch case that falls through to the pre-existing 'waiting' return, and a label helper that only deviates from the old behaviour for the single new 'skipped' value. All other statuses go through the same capitalize-over-getBackupStatus path that was there before, so no existing label or action is affected.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/databases/database-[database]/backups/table.svelte Adds explicit case 'skipped' mapping to getBackupStatus and a new getBackupStatusLabel helper that returns the "Skipped" label; the Status component call is updated to use the new helper. Existing logic for Restore gate, Size column, and all other statuses is unchanged.

Reviews (2): Last reviewed commit: "docs(backups): comment why 'skipped' map..." | Re-trigger Greptile

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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