test(cloud): glossary lint scans every copy literal + vm-*.ts copy tables; Claude not Claude Code in MCP panel; Dev Container; recipe 'VM is running until you choose' (design-squad rulings)

This commit is contained in:
Neil
2026-11-10 20:31:30 -08:00
parent 01fafa1fe5
commit 6902aba99c
7 changed files with 204 additions and 14 deletions
@@ -124,7 +124,7 @@ export function EnvironmentForm({
<DropdownMenuLabel variant="hint">
{t(
'cloudEnvironment.form.importHint',
'Reads Conductor and dev container setup from a local project.'
'Reads Conductor and Dev Container setup from a local project.'
)}
</DropdownMenuLabel>
{importProjects.map((project) => (
@@ -22,7 +22,8 @@ import {
mcpSyncTimeLabel
} from './cloud-mcp-sync-copy'
const AGENT_LABEL = { claude: 'Claude Code', codex: 'Codex' } as const
// Glossary: the catalog name is "Claude", never "Claude Code".
const AGENT_LABEL = { claude: 'Claude', codex: 'Codex' } as const
export type CloudMcpSyncPanelProps = {
status: McpSyncStatus
@@ -133,8 +133,8 @@ export function VmBuildFailureCard({
) : (
<p className="text-xs text-muted-foreground">
{t(
'auto.components.worktree.creation.VmBuildFailureCard.stillRunningLocal',
'The VM is running and using hours until you choose.'
'auto.components.worktree.creation.VmBuildFailureCard.stillRunningLocal2',
'The VM is running until you choose.'
)}
</p>
)
+4
View File
@@ -1357,6 +1357,7 @@
"checksCountTitleVm_other": "The VM is up, but {{count}} environment checks failed",
"memberLimitBodyCount_one": "You can run {{count}} sandbox at once. Put it to sleep or delete it, then try again. Nothing was created, and you weren’t charged.",
"memberLimitBodyCount_other": "You can run {{count}} sandboxes at once. Put one to sleep or delete it, then try again. Nothing was created, and you weren’t charged.",
"stillRunningLocal": "The VM is running and using hours until you choose.",
"teamLimitBodyCount_one": "Your team can run {{count}} sandbox at once ({{value1}} per seat). Put it to sleep or delete it, then try again. Nothing was created, and you weren’t charged.",
"teamLimitBodyCount_other": "Your team can run {{count}} sandboxes at once ({{value1}} per seat). Put one to sleep or delete it, then try again. Nothing was created, and you weren’t charged."
},
@@ -1513,6 +1514,9 @@
}
},
"cloudEnvironment": {
"form": {
"importHint": "Reads Conductor and dev container setup from a local project."
},
"staleness": {
"branchMovedInRepo_one": "{{branch}} in {{repo}} is {{count}} commit ahead of build #{{number}}",
"branchMovedInRepo_other": "{{branch}} in {{repo}} is {{count}} commits ahead of build #{{number}}",
+2 -1
View File
@@ -4313,7 +4313,8 @@
"startAgain": "Start again",
"cloudUnusableTitle": "This sandbox can’t open your workspace",
"cloudUnusableDeletedBody": "The sandbox was deleted. Start again to try a new one.",
"cloudUnusableBody": "Start again on a new sandbox, or delete this one."
"cloudUnusableBody": "Start again on a new sandbox, or delete this one.",
"stillRunningLocal2": "The VM is running until you choose."
},
"VmBuildLog": {
"jumpToError": "Jump to first error",
@@ -1,9 +1,128 @@
[
{ "path": "src/renderer/src/components/cloud-environment/EnvironmentForm.tsx", "line": 127, "term": "container", "reason": "\"dev container\" is the Dev Containers spec name (an import source), not the sandbox." },
{ "path": "src/renderer/src/components/settings/virtual-machines/runtimes/CloudVmSetupGuide.tsx", "line": 20, "term": "VM", "reason": "BYOC / recipe-VM settings (Custom environments), where the glossary allows VM." },
{ "path": "src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx", "line": 365, "term": "VM", "reason": "Recipe-VM branch; the Orca Cloud branch says \"Delete sandbox\"." },
{ "path": "src/renderer/src/components/worktree-creation/VmBuildFailureCard.tsx", "line": 143, "term": "VM", "reason": "Recipe-VM branch; Orca Cloud renders BlockedSandboxHoursNote instead." },
{ "path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx", "line": 38, "term": "VM", "reason": "Recipe-VM branch; the Orca Cloud branch says \"Delete this sandbox?\"." },
{ "path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx", "line": 49, "term": "VM", "reason": "Recipe-VM branch; the Orca Cloud branch says the sandbox is deleted." },
{ "path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx", "line": 63, "term": "VM", "reason": "Recipe-VM branch; the Orca Cloud branch says \"Delete sandbox\"." }
{
"path": "src/renderer/src/components/cloud-environment/EnvironmentForm.tsx",
"line": 127,
"term": "container",
"reason": "Dev Containers spec name"
},
{
"path": "src/renderer/src/components/settings/virtual-machines/runtimes/CloudVmSetupGuide.tsx",
"line": 20,
"term": "VM",
"reason": "BYOC recipe VMs (experimental), not Orca Cloud"
},
{
"path": "src/renderer/src/components/worktree-creation/VmBuildFailureActions.tsx",
"line": 365,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/VmBuildFailureCard.tsx",
"line": 143,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx",
"line": 38,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx",
"line": 49,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/VmDeleteConfirmDialog.tsx",
"line": 63,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-failure-copy.ts",
"line": 85,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-failure-copy.ts",
"line": 89,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-failure-copy.ts",
"line": 92,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-recipe-failure-copy.ts",
"line": 15,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-recipe-failure-copy.ts",
"line": 19,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-recipe-failure-copy.ts",
"line": 25,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-recipe-failure-copy.ts",
"line": 29,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-sheet-copy.ts",
"line": 10,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-sheet-copy.ts",
"line": 69,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-sheet-copy.ts",
"line": 74,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-sheet-copy.ts",
"line": 79,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/worktree-creation/vm-build-sheet-copy.ts",
"line": 84,
"term": "VM",
"reason": "recipe-VM branch; cloud branch says sandbox"
},
{
"path": "src/renderer/src/components/orca-cloud/use-cloud-terminal-error-override.ts",
"line": 13,
"term": "VM",
"reason": "Matcher for older builds' saved terminal errors so they stay hidden; never displayed"
},
{
"path": "src/renderer/src/components/orca-cloud/use-cloud-terminal-error-override.ts",
"line": 14,
"term": "VM",
"reason": "Matcher for older builds' saved terminal errors so they stay hidden; never displayed"
}
]
@@ -15,6 +15,8 @@ const SCOPE = [
'src/renderer/src/components/settings/**/{OrcaCloud,Cloud,PlanBilling,AgentAccounts,Accounts}*.tsx',
'src/renderer/src/components/worktree-creation/Vm*.tsx',
'src/renderer/src/components/worktree-creation/*Cloud*.tsx',
// Copy tables behind the Vm* components (design-squad scope fix).
'src/renderer/src/components/worktree-creation/vm-*.ts',
'src/renderer/src/lib/*cloud*.ts',
'mobile/src/**/*{Cloud,cloud}*.tsx'
]
@@ -82,6 +84,58 @@ function stringValue(node: ts.Node): string | null {
return null
}
const SKIP_ATTRIBUTES = /^(className|class|id|key|testId|data-.*|href|src|role|type|name|variant|size|side|align)$/
const SKIP_PROPERTIES = /^(className|id|key|testId|kind|type|variant|status|state|icon|href|path|url|pane|section|sectionId)$/
/** A string literal that could be user-visible copy: has a space, isn't a key, import or styling. */
function isCopyLiteral(node: ts.Node): boolean {
if (
!ts.isStringLiteral(node) &&
!ts.isNoSubstitutionTemplateLiteral(node) &&
!ts.isTemplateExpression(node)
) {
return false
}
const text = stringValue(node) ?? ''
if (!/\s/.test(text.trim()) || !/[A-Za-z]/.test(text)) {
return false // pure identifiers, ids and paths
}
const parent = node.parent
if (
ts.isImportDeclaration(parent) ||
ts.isExportDeclaration(parent) ||
ts.isExternalModuleReference(parent) ||
ts.isLiteralTypeNode(parent)
) {
return false
}
if (ts.isPropertyAssignment(parent) && parent.name === node) {
return false // object keys
}
if (ts.isPropertyAssignment(parent) && SKIP_PROPERTIES.test(parent.name.getText().replace(/['"]/g, ''))) {
return false
}
const attr = ts.isJsxAttribute(parent)
? parent
: ts.isJsxExpression(parent) && ts.isJsxAttribute(parent.parent)
? parent.parent
: null
if (attr && SKIP_ATTRIBUTES.test(attr.name.getText())) {
return false
}
// cn()/clsx() class lists and translation keys (the first argument of t()).
if (ts.isCallExpression(parent)) {
const callee = parent.expression.getText()
if (/^(cn|clsx|cva|twMerge)$/.test(callee)) {
return false
}
if (TRANSLATE_CALLEES.has(callee.split('.').pop() ?? '') && parent.arguments[0] === node) {
return false
}
}
return true
}
/** User-visible strings in one file, with their 1-based lines. */
export function visibleStrings(file: string, source: string): { line: number; text: string }[] {
const sf = ts.createSourceFile(file, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX)
@@ -92,7 +146,10 @@ export function visibleStrings(file: string, source: string): { line: number; te
}
}
const visit = (node: ts.Node): void => {
if (ts.isJsxText(node)) {
if (isCopyLiteral(node)) {
// Copy tables, object-literal values and template parts: anywhere these terms can hide.
push(node, stringValue(node))
} else if (ts.isJsxText(node)) {
push(node, node.text.trim())
} else if (ts.isJsxAttribute(node) && node.initializer) {
const name = node.name.getText(sf)
@@ -130,7 +187,15 @@ export function visibleStrings(file: string, source: string): { line: number; te
ts.forEachChild(node, visit)
}
visit(sf)
return out
const seen = new Set<string>()
return out.filter((entry) => {
const key = `${entry.line}:${entry.text}`
if (seen.has(key)) {
return false
}
seen.add(key)
return true
})
}
function scopeFiles(): string[] {