Website: machine estimator v2 — fold-out categories and the memory bar (still unlisted, R-997)
gates / gates (push) Successful in 6m31s

Each category is a native <details>, closed at first, with an 'n selected' count;
a preset opens what it ticks. A sticky memory bar (0-64 GB, marks 8/16/24/32/48/64+):
solid fill = smallest box memory where the selection fits well, thin mark = where it
fits, but tight; one line names the box to buy. minBoxGb() inverts guestMib() by
bisection on it, so the rule is still written once. Box sizes 12/24/48/64 added;
tests cover seven sizes and the inverse (red-proofed); SIZING.md table gains 24 GB.
This commit is contained in:
2026-10-13 15:38:45 +02:00
parent d5ef93b13b
commit 16dca64834
11 changed files with 277 additions and 110 deletions
+5 -1
View File
@@ -33,7 +33,9 @@ HEADROOM = 1.5
# 15,772 MiB (measured 2026-10-13), so a box of N GB is taken as N*1024 - 612 MiB.
GUEST_RULE = {"reserve_mib": 4096, "max_gap_mib": 2048, "min_mib": 4096, "ceiling_gap_mib": 1024,
"memtotal_shortfall_mib": 612}
BOXES_GB = [8, 16, 32]
BOXES_GB = [8, 12, 16, 24, 32, 48, 64] # the common sizes a recommendation names (v2: 12, 24, 48, 64 added)
BAR_MARKS_GB = [8, 16, 24, 32, 48, 64] # the memory bar's marks; the last one reads "64+"
BAR_MAX_GB = 64 # the bar's linear scale is 0..BAR_MAX_GB
BUILTIN = {"filebrowser"}
# One short line per medium / heavy-in-bursts app (the 9 of 2026-10-13). sizing.json's English notes, tidied.
@@ -115,6 +117,8 @@ def build():
headroom=HEADROOM,
guest_rule=GUEST_RULE,
boxes_gb=BOXES_GB,
bar_marks_gb=BAR_MARKS_GB,
bar_max_gb=BAR_MAX_GB,
categories=[dict(id=h[0], id_en=e[0], name_hu=h[1], name_en=e[1]) for h, e in zip(hu_cats, en_cats)],
apps=apps,
)