| name | inertia-form-review |
| description | Audit and review existing form components for i18n compliance, type safety, missing validations, dropdown opportunities, accessibility, and consistency between create/edit forms. |
| argument-hint | [EntityName] |
| allowed-tools | Read, Grep, Glob |
Inertia Form Review & Audit (i18n-aware)
Review forms for $ARGUMENTS.
Files to Review
resources/js/pages/<EntityName>/sections/<EntityName>CreateForm.tsx
resources/js/pages/<EntityName>/sections/<EntityName>EditForm.tsx
resources/js/pages/<EntityName>/sections/<EntityName>DetailView.tsx
resources/js/pages/<EntityName>/sections/<EntityName>Columns.tsx
resources/js/pages/<EntityName>/sections/<EntityName>PageConfig.tsx
resources/js/types/<entity_name>.ts (TypeScript types)
resources/js/locales/en/<entities>.json (translation file)
resources/js/locales/index.ts (namespace registration)
- Corresponding Go request files in
app/http/requests/
Checklist
1. i18n Compliance
2. i18n Key Completeness
Check that the JSON file has all required sections:
3. Structure & Pattern Compliance
4. Type Safety
5. Create <> Edit Consistency
6. API Integration
7. Field Rendering
8. Dropdown Opportunity Audit
Check for fields that should be dropdowns but are free-text:
If free-text fields should be dropdowns:
- Check if Go enum exists in
app/http/requests/
- Check if TS enum exists in
resources/js/types/
- If FK field, check if related entity API exists (
/api/related-entities)
- If neither exists, recommend creating with
/goravel-enum
9. Decimal/Float Field Display
10. FK Dropdown Integration
For entities with foreign key relationships:
9. Accessibility
Common i18n Issues
Missing namespace registration
import entities from './en/entities.json';
ns: [..., 'entities'],
resources: { en: { ..., entities } },
Wrong i18n pattern for file type
export function EntityDetailView({ t }: { t: TFunction }) { ... }
export function EntityDetailView() {
const { t } = useTranslation('entities');
}
export function getEntityColumns(): CrudColumn[] {
const { t } = useTranslation('entities');
}
export function getEntityColumns(t: TFunction): CrudColumn[] { ... }
Hardcoded strings that should be translated
<Label>Name *</Label>
onSuccess('Entity created successfully');
if (confirm('Are you sure?'))
<Label>{t('form.name')}</Label>
onSuccess(t('toast.created'));
if (confirm(t('confirm.bulkDelete', { count: ids.length })))
Missing interpolation variables
"bulkDelete": "Are you sure you want to delete 5 items?"
"bulkDelete": "Are you sure you want to delete {{count}} item(s)?"
Output
After review, produce a report with:
- Pass/Fail for each checklist item
- i18n gaps — missing translation keys or unregistered namespace
- Hardcoded strings — any user-visible text not going through
t()
- Pattern violations — wrong i18n usage (hook vs TFunction)
- Issues found with specific line numbers
- Recommended fixes with code snippets
- Dropdown opportunities if any free-text fields should be constrained
Reference
See resources/js/pages/Books/ for the canonical i18n-aware pattern.
See resources/js/locales/en/books.json for complete translation key structure.