Skip to content

feat: add deployment retention settings#2988

Merged
HarshMN2345 merged 3 commits intomainfrom
feat-deployment-retention-ui
Apr 22, 2026
Merged

feat: add deployment retention settings#2988
HarshMN2345 merged 3 commits intomainfrom
feat-deployment-retention-ui

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

@HarshMN2345 HarshMN2345 commented Apr 21, 2026

What does this PR do?

image

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR adds a deployment retention settings card to both the Functions and Sites settings pages. Two new Svelte 5 runes components are introduced (updateDeploymentRetention.svelte for each route), along with matching analytics enum values. The implementation correctly handles the unlimited/finite toggle, injects a custom option when the server value isn't in the preset list, validates bounds, and invalidates the relevant cache dependency on success.

Confidence Score: 5/5

Safe to merge — no logic or data-integrity issues found.

All findings are P2 style suggestions (shared-constant extraction). The core logic — toggle handling, validation, SDK calls, cache invalidation, and analytics — is correct and consistent with existing patterns in the codebase.

No files require special attention.

Important Files Changed

Filename Overview
src/lib/actions/analytics.ts Adds two new analytics enum values for deployment retention update events on functions and sites — straightforward and consistent with the existing pattern.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateDeploymentRetention.svelte New Svelte 5 runes component for setting function deployment retention; correctly handles unlimited toggle, custom preset values, validation guards, analytics, and cache invalidation.
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateDeploymentRetention.svelte New Svelte 5 runes component for site deployment retention; mirrors the functions variant with appropriate SDK call differences but duplicates constants and helpers.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.svelte Imports and mounts the new UpdateDeploymentRetention component after UpdateBuildCommand — minimal and correct change.
src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/+page.svelte Imports and mounts UpdateDeploymentRetention between resource limits and timeout — correct placement and consistent with functions settings structure.

Reviews (2): Last reviewed commit: "changed design" | Re-trigger Greptile

@HarshMN2345 HarshMN2345 requested a review from Meldiron April 22, 2026 14:20
@HarshMN2345 HarshMN2345 merged commit b3efa55 into main Apr 22, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the feat-deployment-retention-ui branch April 22, 2026 14:42
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.

2 participants