Improve custom agent onboarding with clearer copy and example

This commit is contained in:
Jinjing
2026-09-01 03:54:03 -07:00
parent 51c508d863
commit c67602f301
4 changed files with 34 additions and 21 deletions
@@ -4,31 +4,36 @@ import { cn } from '@/lib/utils'
import { translate } from '@/i18n/i18n'
import type { BuiltInTuiAgent } from '../../../../shared/types'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_NAME = 'gpt-5.6-luna-low'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_NAME = 'Luna (low)'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_COMMAND =
'codex --model gpt-5.6-luna -c model_reasoning_effort="low"'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_NAME = 'gpt-5.6-luna-high'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_NAME = 'Luna (high)'
export const PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_COMMAND =
'codex --model gpt-5.6-luna -c model_reasoning_effort="high"'
/** Static picker mock: shows custom agents as named rows among built-ins. */
/** Static picker mock: customs sit under their base, with names a person would pick. */
export function DataRecoveryPinExitCustomAgentExample() {
return (
<div aria-hidden className="overflow-hidden rounded-md border border-border bg-card text-left">
<ExamplePickerRow agent="claude" label="Claude" />
<ExamplePickerRow
agent="codex"
label={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_NAME}
command={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_COMMAND}
isCustom
selected
/>
<ExamplePickerRow
agent="codex"
label={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_NAME}
command={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_COMMAND}
isCustom
/>
<div className="border-b border-border/60 bg-muted/30 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground">
{translate('auto.components.dataRecovery.pinExitExampleCaption', 'Agent picker')}
</div>
<div className="divide-y divide-border/60">
<ExamplePickerRow agent="codex" label="Codex" />
<ExamplePickerRow
agent="codex"
label={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_NAME}
command={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_COMMAND}
isCustom
selected
/>
<ExamplePickerRow
agent="codex"
label={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_NAME}
command={PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_COMMAND}
isCustom
/>
</div>
</div>
)
}
@@ -51,8 +56,7 @@ function ExamplePickerRow({
className={cn(
'flex items-start gap-2.5 px-3 py-2',
selected &&
'bg-[color-mix(in_srgb,var(--foreground)_10%,var(--background))] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--foreground)_12%,transparent)]',
!selected && 'border-t border-border/60 first:border-t-0'
'bg-[color-mix(in_srgb,var(--foreground)_10%,var(--background))] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--foreground)_12%,transparent)]'
)}
data-current={selected ? 'true' : undefined}
>
@@ -88,10 +88,18 @@ describe('DataRecoveryPinExitNotice', () => {
render(<DataRecoveryPinExitNotice />)
expect(await screen.findByRole('dialog')).toBeTruthy()
expect(screen.getByText('Custom agents are now available')).toBeTruthy()
expect(
screen.getByText(
'Save a Codex, Claude, or other agent command under a name, then pick it from the agent list.'
)
).toBeTruthy()
expect(screen.getByText('Agent picker')).toBeTruthy()
expect(screen.getByText('Codex')).toBeTruthy()
expect(screen.getByText(PIN_EXIT_CUSTOM_AGENT_EXAMPLE_NAME)).toBeTruthy()
expect(screen.getByText(PIN_EXIT_CUSTOM_AGENT_EXAMPLE_COMMAND)).toBeTruthy()
expect(screen.getByText(PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_NAME)).toBeTruthy()
expect(screen.getByText(PIN_EXIT_CUSTOM_AGENT_EXAMPLE_2_COMMAND)).toBeTruthy()
expect(screen.queryByText('Claude')).toBeNull()
expect(screen.getAllByText('Settings → Agents').length).toBeGreaterThanOrEqual(1)
expect(
screen.getByText('If you need to downgrade to a previous Orca version later')
@@ -99,7 +99,7 @@ export function DataRecoveryPinExitNotice() {
<DialogDescription className="text-sm leading-relaxed text-foreground">
{translate(
'auto.components.dataRecovery.pinExitLead',
'A custom agent is saved arguments for a harness like Codex or Claude, picked by name.'
'Save a Codex, Claude, or other agent command under a name, then pick it from the agent list.'
)}
</DialogDescription>
</DialogHeader>
+2 -1
View File
@@ -16185,7 +16185,8 @@
"settingsRowHint": "You can restore the settings from before this update, then install the previous Orca.",
"settingsRowOpen": "Data recovery…",
"pinExitTitle": "Custom agents are now available",
"pinExitLead": "A custom agent is saved arguments for a harness like Codex or Claude, picked by name.",
"pinExitLead": "Save a Codex, Claude, or other agent command under a name, then pick it from the agent list.",
"pinExitExampleCaption": "Agent picker",
"pinExitExampleBadge": "Custom",
"settingsAgents": "Settings → Agents",
"pinExitExampleHintPrefix": "Create them in",