Skip to content

Commit afcdcca

Browse files
quickbeardclaude
andcommitted
fix(app): stop the resource hint repeating what the fields already say
The hint restated the defaults that each placeholder already carries and the ceilings that the out-of-range message states when they matter, so two thirds of it was there to be skipped. What is left is the part nothing else says: the numbers are a claim on this machine, and a VM holds its memory the whole time it runs. The interpolation goes with it — the string no longer quotes any number, so it no longer needs the constants passed in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 3d06f8a commit afcdcca

3 files changed

Lines changed: 6 additions & 13 deletions

File tree

‎packages/app/src/i18n/en.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export const dict = {
420420
"sandbox.add.cpus": "CPUs (default {{cpus}})",
421421
"sandbox.add.memory": "Memory (default {{memory}} GB)",
422422
"sandbox.add.resourcesHint":
423-
"How much of this Mac the sandbox may use. Each sandbox is a virtual machine, so its memory is held for as long as it runs. Leave both empty for the defaults \u2014 {{cpus}} CPUs and {{memory}} GB \u2014 or set up to {{maxCpus}} CPUs and {{maxMemory}} GB.",
423+
"How much of this Mac the sandbox may use. Each sandbox is a virtual machine, so its memory is held for as long as it runs.",
424424
"sandbox.add.resourcesInvalid": "CPUs must be {{minCpus}}\u2013{{maxCpus}} and memory {{minMemory}}\u2013{{maxMemory}} GB.",
425425
"sandbox.add.downloadProgress": "Downloading image… {{done}}/{{total}} MB",
426426
"sandbox.add.creating": "Creating the sandbox\u2026 this takes a few minutes.",

‎packages/app/src/i18n/es.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export const dict = {
411411
"sandbox.add.cpus": "CPU (por defecto {{cpus}})",
412412
"sandbox.add.memory": "Memoria (por defecto {{memory}} GB)",
413413
"sandbox.add.resourcesHint":
414-
"Cu\u00e1nto de este Mac puede usar el sandbox. Cada sandbox es una m\u00e1quina virtual, as\u00ed que su memoria queda reservada mientras est\u00e9 en marcha. D\u00e9jalos vac\u00edos para los valores por defecto ({{cpus}} CPU y {{memory}} GB) o indica hasta {{maxCpus}} CPU y {{maxMemory}} GB.",
414+
"Cu\u00e1nto de este Mac puede usar el sandbox. Cada sandbox es una m\u00e1quina virtual, as\u00ed que su memoria queda reservada mientras est\u00e9 en marcha.",
415415
"sandbox.add.resourcesInvalid": "Las CPU deben ser {{minCpus}}\u2013{{maxCpus}} y la memoria {{minMemory}}\u2013{{maxMemory}} GB.",
416416
"sandbox.add.downloadProgress": "Descargando imagen… {{done}}/{{total}} MB",
417417
"sandbox.add.creating": "Creando el sandbox\u2026 esto tarda unos minutos.",

‎packages/app/src/sandbox/dialog-add.tsx‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,10 @@ export function DialogAddSandbox(props: { onCreated?: (config: SandboxConfig) =>
266266
<p class="text-12 text-v2-text-text-muted">{language.t("sandbox.add.imageOk")}</p>
267267
</Show>
268268
<Show when={resourcesApply()}>
269-
{/* Both are optional and both have real defaults, which the user
270-
cannot otherwise discover — an empty box says nothing about
271-
what the sandbox will actually get. */}
272-
<p class="text-12 text-v2-text-text-muted">
273-
{language.t("sandbox.add.resourcesHint", {
274-
cpus: SANDBOX_DEFAULT_CPUS,
275-
memory: SANDBOX_DEFAULT_MEMORY_GIB,
276-
maxCpus: SANDBOX_CPUS_RANGE.max,
277-
maxMemory: SANDBOX_MEMORY_MIB_RANGE.max / 1024,
278-
})}
279-
</p>
269+
{/* Says what the numbers buy. The defaults live in the
270+
placeholders and the ceilings in the out-of-range message, so
271+
neither needs restating here. */}
272+
<p class="text-12 text-v2-text-text-muted">{language.t("sandbox.add.resourcesHint")}</p>
280273
{/* Grid, not flex: the input sets its own `width: 280px` and
281274
`flex: none`, so two of them side by side overflowed the dialog
282275
rather than sharing the row. Grid tracks size them, and

0 commit comments

Comments
 (0)