3 plans in 1 wave covering UX-01 through UX-04: intro section, remote name preview, step descriptions, and credential help text. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7.7 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 10-content-clarity | 02 | execute | 1 |
|
true |
|
|
Purpose: Users immediately see how their chosen name will appear in the generated rclone.conf, reducing confusion about naming conventions. Output: RemoteNamePreview component, integrated into BackendSelectionStep with watch(), helpText on remote name field.
<execution_context> @C:/Users/SebastienQUEROL/.claude/get-shit-done/workflows/execute-plan.md @C:/Users/SebastienQUEROL/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/10-content-clarity/10-CONTEXT.md @.planning/phases/10-content-clarity/10-RESEARCH.mdFrom src/components/wizard/BackendSelectionStep.tsx (existing useForm destructure):
const {
register,
handleSubmit,
formState: { errors },
} = useForm<RemoteNameFormValues>({
resolver: zodResolver(remoteNameSchema),
mode: 'onSubmit',
reValidateMode: 'onChange',
defaultValues: { name: state.remote.name },
});
Add watch to the destructure: const { register, handleSubmit, watch, formState: { errors } } = useForm<...>(...)
Then: const remoteName = watch('name');
From src/components/ui/TextFieldMD3.tsx (props interface — supports helpText):
// TextFieldMD3 accepts helpText prop — renders as small text below input
// CRITICAL: Do NOT pass a visible placeholder prop. TextFieldMD3 uses placeholder=" "
// (single space) for the floating label CSS trick. The "e.g. my-backup" example
// must be conveyed through helpText, NOT native placeholder.
MD3 token classes for preview block (same as ReviewStep OutputBlock):
bg-surface-variant— tinted backgroundtext-on-surface-variant— readable text on that backgroundfont-mono— code appearance
From BackendSelectionStep.test.tsx (selector pattern):
// Uses screen.getByRole('textbox') — single textbox assertion
// RemoteNamePreview MUST NOT render any form controls (input, textarea, contenteditable)
Empty state: Show grayed-out [my-remote] text with a guidance message "Type a name to see how it appears in your config" below it. Use text-on-surface-variant/50 for the placeholder and text-on-surface-variant/40 for the guidance.
Value state: Show [{value}] in text-on-surface-variant color.
Container styling: mt-2 rounded-md bg-surface-variant px-3 py-2 text-xs font-mono
Write tests FIRST (RED), then implement (GREEN). Test file uses @testing-library/react render + screen assertions.
CRITICAL: RemoteNamePreview must render ONLY div/span elements. No input, textarea, or contenteditable — this would break BackendSelectionStep.test.tsx's getByRole('textbox') single-match assertion.
npx vitest run src/components/ui/RemoteNamePreview.test.tsx
RemoteNamePreview renders empty-state placeholder when value is empty, and [value] when value is provided. All tests pass.
In BackendSelectionStep.test.tsx: Add a test case that verifies the live preview updates:
- Render BackendSelectionStep
- Assert that the empty-state placeholder text is visible (e.g., "[my-remote]")
- Type "test-remote" into the textbox
- Assert that "[test-remote]" is visible in the DOM
IMPORTANT: Do NOT add a visible placeholder prop to TextFieldMD3. The floating label CSS trick depends on placeholder=" ". The "e.g. my-backup" example is conveyed via helpText.
IMPORTANT: Do NOT use useWatch — plain watch('name') from useForm is correct here.
npx vitest run src/components/wizard/BackendSelectionStep.test.tsx
Remote name field shows helpText. RemoteNamePreview renders below the field and updates live as user types. All BackendSelectionStep tests pass.
<success_criteria>
- RemoteNamePreview component exists and is tested
- BackendSelectionStep shows helpText on remote name field
- Live preview below field updates as user types
- Empty state shows grayed placeholder with guidance
- No existing tests broken (especially getByRole('textbox') single match) </success_criteria>