Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.2 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, gap_closure, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | gap_closure | requirements | must_haves | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 09-md3-components | 04 | execute | 1 |
|
true | true |
|
|
Purpose: Achieve 12/12 must-have truths for Phase 9 verification (currently 11/12 partial). Output: Updated BackendSelectionStep.tsx with TextFieldMD3 replacing the plain label+input.
<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/09-md3-components/09-03-SUMMARY.md
From src/components/ui/TextFieldMD3.tsx:
interface TextFieldMD3Props {
id: string;
label: string;
error?: FieldError;
registration: UseFormRegisterReturn;
type?: 'text' | 'password';
helpText?: string;
required?: boolean;
suffix?: React.ReactNode;
}
export function TextFieldMD3({ id, label, error, registration, type, helpText, required, suffix }: TextFieldMD3Props): JSX.Element;
From src/styles/md3-buttons.ts:
export const MD3_BTN_FILLED: string;
-
Add import:
import { TextFieldMD3 } from '../ui/TextFieldMD3'; -
Replace this block:
<div>
<label htmlFor="remote-name">Remote name</label>
<input id="remote-name" type="text" {...register('name')} />
{errors.name && (
<p role="alert">{errors.name.message}</p>
)}
</div>
With:
<TextFieldMD3
id="remote-name"
label="Remote name"
registration={register('name')}
error={errors.name}
required
/>
Key constraints:
- Keep
id="remote-name"unchanged (matches existing test selectors via getByRole('textbox')) - Pass
register('name')asregistrationprop (same pattern as FieldRenderer, line 103 of FieldRenderer.tsx) - Pass
errors.nameaserrorprop — TextFieldMD3 already rendersrole="alert"on error messages - Remove the manual
{errors.name && ...}block since TextFieldMD3 handles error display internally - Add
requiredprop since the name field is required (schema has.min(1))
The existing tests use screen.getByRole('textbox') to find the input and screen.getByRole('alert') for error messages. TextFieldMD3 preserves both: the <input> retains its textbox role, and the error <p> has role="alert".
npx vitest run src/components/wizard/BackendSelectionStep.test.tsx --reporter=dot && npx vitest run --reporter=dot
BackendSelectionStep renders "Remote name" as a TextFieldMD3 with floating label. All 5 BackendSelectionStep tests pass. Full test suite (179+ tests) remains green. COMP-01 "All text inputs" requirement is fully satisfied.
<success_criteria>
- BackendSelectionStep "Remote name" field renders as TextFieldMD3 with floating label
- All BackendSelectionStep tests pass without any test modifications
- Full test suite passes with zero regressions
- Phase 9 VERIFICATION.md Truth #12 can be re-verified as VERIFIED (12/12) </success_criteria>