Skip to content

Fix: manual deployment bug#3025

Merged
HarshMN2345 merged 2 commits intomainfrom
fix-manual-deployment-bug
May 5, 2026
Merged

Fix: manual deployment bug#3025
HarshMN2345 merged 2 commits intomainfrom
fix-manual-deployment-bug

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

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 May 5, 2026

Greptile Summary

This PR fixes a bug where $currentPlan.deploymentSize could be undefined even when $currentPlan itself was truthy, causing the file-size limit to incorrectly default to 0 bytes for cloud users. It also replaces hardcoded 'File size exceeds 10MB' error messages with a dynamic value derived from readableMaxSize, and restructures the paused-project modal footer to render an explicit mobile layout.

  • Four deployment-upload files (create-function, createManual, create-site, createManualDeploymentModal) each gain the ?.deploymentSize optional-chaining guard and a dynamic error message built from humanFileSize.
  • pausedProjectModal splits its footer into explicit {#if $isSmallViewport} / {:else} branches so buttons render full-width and stacked on mobile, preserving the existing behaviour where the Upgrade button is only shown on larger viewports.

Confidence Score: 5/5

Safe to merge — changes are narrowly scoped to fixing a falsy-deploymentSize guard, improving error messages, and improving mobile layout.

The optional-chaining fix is correct and targets a real edge case where a cloud plan object can exist without a deploymentSize field. The dynamic error message follows the existing readableMaxSize.value + readableMaxSize.unit pattern used throughout the codebase. The responsive layout refactor in pausedProjectModal preserves the pre-existing behaviour for the Upgrade button on mobile. No logic regressions were identified across the five changed files.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/functions/create-function/manual/+page.svelte Adds ?.deploymentSize optional chaining so a plan without a deploymentSize field correctly falls back to the regional limit; replaces hardcoded "10MB" error message with the dynamic readable size.
src/routes/(console)/project-[region]-[project]/functions/function-[function]/(modals)/createManual.svelte Same ?.deploymentSize fix and dynamic error message as the create-function page; comment removal is pure cleanup.
src/routes/(console)/project-[region]-[project]/sites/create-site/manual/+page.svelte Applies the ?.deploymentSize optional-chaining fix and removes the stale "already in MB" comment; error message was already dynamic so no message change here.
src/routes/(console)/project-[region]-[project]/sites/site-[site]/deployments/createManualDeploymentModal.svelte Same ?.deploymentSize fix and dynamic error message as the other deployment modals.
src/routes/(console)/project-[region]-[project]/pausedProjectModal.svelte Restructures footer buttons to use a proper two-branch layout for small vs. large viewports; Upgrade button behaviour on mobile is unchanged from before (it was already hidden via {#if !$isSmallViewport}).

Reviews (1): Last reviewed commit: "fix: prevent false file size error when ..." | Re-trigger Greptile

@HarshMN2345 HarshMN2345 requested review from Meldiron and loks0n May 5, 2026 17:48
@HarshMN2345 HarshMN2345 merged commit 8d62e6c into main May 5, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-manual-deployment-bug branch May 5, 2026 17:52
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