Skip to content

feat: Implement bulk delete for function deployments using Svelte 5 runes#2983

Open
Root-Aamir wants to merge 4 commits intoappwrite:mainfrom
Root-Aamir:main
Open

feat: Implement bulk delete for function deployments using Svelte 5 runes#2983
Root-Aamir wants to merge 4 commits intoappwrite:mainfrom
Root-Aamir:main

Conversation

@Root-Aamir
Copy link
Copy Markdown

What does this PR do?

This PR implements the multi-selection and bulk delete functionality for the function deployments table in the Appwrite Console. Key changes include:

  • Migrated the deployments table logic to Svelte 5 Runes ($state, $props).
  • Integrated MultiSelectionTable to enable checkboxes for selecting multiple deployments.
  • Added a bulk delete action with a confirmation modal.
  • Fixed TypeScript binding issues with selectedIds by using a manual selection change handler.

Test Plan

  1. Navigate to any Function > Deployments tab.
  2. Select multiple deployments using the checkboxes.
  3. Click the 'Delete' button in the bulk action bar.
  4. Confirm deletion in the modal.
  5. Verify that the selected deployments are removed and the list updates automatically.

Related Issues

Closes #7772
232f8a5d-23be-4953-9b31-e5712176a00c
bf38fe62-20e3-43b3-bda5-064b71c6038e

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 20, 2026

Greptile Summary

This PR adds multi-selection and bulk-delete to the function deployments table and migrates the component to Svelte 5 runes. The previously flagged regressions (cancel button unreachable, missing source-size guard, blank sourceSize/buildSize cells, delete button unguarded during active builds, and batchDelete outside try/finally) are all resolved in the current revision.

Confidence Score: 5/5

Safe to merge; all previously flagged P0/P1 regressions have been addressed and no new blocking issues were found.

Every critical concern from the prior review round (cancel button, source-size guard, column rendering, delete guard, try/finally placement, selectedIds typing) is fixed in the current revision. The only remaining gap is the as any cast on MultiSelectionTable, which is a P2 type-safety style issue and does not block correctness.

No files require special attention for merge.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/functions/function-[function]/table.svelte Bulk delete implementation with Svelte 5 runes; previous review concerns (cancel button, source-size guard, column rendering, delete guard, try/finally placement) are now resolved. The as any cast on MultiSelectionTable and any-typed batchDelete parameter remain minor type-safety gaps.
pnpm-lock.yaml Routine dependency bumps: @sveltejs/kit 2.55→2.57.1, @appwrite.io/console 8.2→8.3, pink-svelte hash update; no issues detected.

Reviews (4): Last reviewed commit: "fix: move batchDelete inside try block f..." | Re-trigger Greptile

@Root-Aamir
Copy link
Copy Markdown
Author

"Updated! I've restored the Cancel action, added back the Redeploy guards (with tooltips), and fixed the missing column rendering for source and build sizes. I've also tightened the types for selectedIds. Ready for another look!"

@Root-Aamir
Copy link
Copy Markdown
Author

Done! I've implemented the conditional rendering for Delete and Cancel actions based on the deployment's effective status.

@Root-Aamir
Copy link
Copy Markdown
Author

"Great catch! I've moved batchDelete inside the try block. This ensures that invalidate(Dependencies.DEPLOYMENTS) in the finally block always runs to keep the UI in sync, and any errors are properly caught and tracked. Thanks for the thorough review!"

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