Skip to content

Commit b7709f5

Browse files
committed
pricing: increase the minimum disk size selection to the anticipated minimum after the new file server
1 parent 180e18f commit b7709f5

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/packages/frontend/purchases/license-editor.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ single license. It doesn't manage actually coordinating purchases, showing pric
44
or anything like that.
55
*/
66

7-
import type { PurchaseInfo } from "@cocalc/util/licenses/purchase/types";
8-
import type { Changes } from "@cocalc/util/purchases/cost-to-edit-license";
97
import {
108
Alert,
119
DatePicker,
1210
InputNumber,
13-
Switch,
1411
Select,
12+
Switch,
1513
Table,
1614
Tag,
1715
} from "antd";
1816
import dayjs from "dayjs";
19-
import { MAX } from "@cocalc/util/licenses/purchase/consts";
2017
import { useMemo, useState } from "react";
2118

19+
import { MAX } from "@cocalc/util/licenses/purchase/consts";
20+
import { MIN_DISK_GB } from "@cocalc/util/upgrades/consts";
21+
import type { PurchaseInfo } from "@cocalc/util/licenses/purchase/types";
22+
import type { Changes } from "@cocalc/util/purchases/cost-to-edit-license";
23+
2224
type Field =
2325
| "start"
2426
| "end"
@@ -217,7 +219,7 @@ export default function LicenseEditor({
217219
value: (
218220
<InputNumber
219221
disabled={disabledFields?.has("custom_disk")}
220-
min={3}
222+
min={Math.min(info.custom_disk || MIN_DISK_GB, MIN_DISK_GB)}
221223
max={MAX.disk}
222224
step={1}
223225
value={info.custom_disk}

src/packages/util/consts/billing.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ export const BANNER_NON_DISMISSIBLE_DAYS = 7;
1919

2020
// The "standard license" disk size.
2121
// used in next/store and student-pay
22-
// TODO: once the new file storage is in place, incease it to 10
23-
export const STANDARD_DISK = 3;
22+
// Aug 2025: changed from 3 to 10 GB in anticipation of the new file server
23+
// However, the actual presets are capped at the maximum disk size.
24+
// That disk max is in util/upgrades/consts.ts
25+
export const STANDARD_DISK = 10;

src/packages/util/upgrades/consts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
// These are defaults used by store (and also when parsing the quota params from a URL).
77

8+
import { STANDARD_DISK } from "@cocalc/util/consts/billing";
89
import { upgrades } from "@cocalc/util/upgrade-spec";
910

1011
// RAM
@@ -17,7 +18,10 @@ export const MAX_CPU = upgrades.max_per_project.cores;
1718

1819
// DISK
1920
export const MAX_DISK_GB = 15;
20-
export const DISK_DEFAULT_GB = 3;
21+
// Aug 2025: in anticipation of the new file server, the minimum and standard is increased
22+
export const DISK_DEFAULT_GB = STANDARD_DISK;
23+
// Aug 2025(Andrey): The new minimum should be the standard.
24+
// This parameter is also used in the frontend/purchases/license-editor.tsx
2125
export const MIN_DISK_GB = DISK_DEFAULT_GB;
2226

2327
interface Values {

0 commit comments

Comments
 (0)