Improve reset dialog (vibe-kanban) (#1466)

* Excellent! All checks pass. Let me provide a summary of the changes made:

## Summary

I've successfully implemented all the requested changes to improve the Reset Dialog:

### 1. Safety Improvements
- **Default `worktreeResetOn` to `false`** (`RestoreLogsDialog.tsx:45`) - The "Reset worktree" toggle is now off by default, preventing accidental destructive actions.

- **Added `acknowledgeUncommitted` toggle** - When uncommitted changes are detected, a new amber-colored section appears with a toggle that users must enable before proceeding. This ensures users explicitly acknowledge that their uncommitted changes may be affected.

- **Updated `isConfirmDisabled` logic** (`RestoreLogsDialog.tsx:130-133`) - The confirm button is now disabled when there are uncommitted changes until the user toggles the acknowledgment.

### 2. i18n Migration
All hardcoded strings in the dialog have been migrated to use i18n with full support for 5 languages:
- English (`en/tasks.json`)
- Japanese (`ja/tasks.json`)
- Spanish (`es/tasks.json`)
- Korean (`ko/tasks.json`)
- Chinese Simplified (`zh-Hans/tasks.json`)

The translations include proper pluralization support using i18next's `_one`/`_other` suffixes for counts.

### Files Modified
- `frontend/src/components/dialogs/tasks/RestoreLogsDialog.tsx` - Main component changes
- `frontend/src/i18n/locales/en/tasks.json` - English translations
- `frontend/src/i18n/locales/ja/tasks.json` - Japanese translations
- `frontend/src/i18n/locales/es/tasks.json` - Spanish translations
- `frontend/src/i18n/locales/ko/tasks.json` - Korean translations
- `frontend/src/i18n/locales/zh-Hans/tasks.json` - Chinese translations

* Cleanup script changes for task attempt 0279d8b9-dcc8-4274-8da5-14b27672d604
This commit is contained in:
Louis Knight-Webb
2025-12-09 09:35:29 +00:00
committed by GitHub
parent a82c7e37e7
commit 8846e6621c
6 changed files with 345 additions and 37 deletions

View File

@@ -442,5 +442,48 @@
"continueEditing": "Continuar Editando",
"discardChanges": "Descartar Cambios"
}
},
"restoreLogsDialog": {
"title": "Confirmar Reintento",
"historyChange": {
"title": "Cambio de historial",
"willDelete": "Eliminará este proceso",
"andLaterProcesses_one": "y {{count}} proceso posterior",
"andLaterProcesses_other": "y {{count}} procesos posteriores",
"fromHistory": "del historial.",
"codingAgentRuns_one": "{{count}} ejecución de agente de codificación",
"codingAgentRuns_other": "{{count}} ejecuciones de agente de codificación",
"scriptProcesses_one": "{{count}} proceso de script",
"scriptProcesses_other": "{{count}} procesos de script",
"setupCleanupBreakdown": "({{setup}} configuración, {{cleanup}} limpieza)",
"permanentWarning": "Esto altera permanentemente el historial y no se puede deshacer."
},
"uncommittedChanges": {
"title": "Cambios sin confirmar detectados",
"description_one": "Tienes {{count}} cambio sin confirmar",
"description_other": "Tienes {{count}} cambios sin confirmar",
"andUntracked_one": " y {{count}} archivo sin rastrear",
"andUntracked_other": " y {{count}} archivos sin rastrear",
"acknowledgeLabel": "Entiendo que estos cambios pueden verse afectados"
},
"resetWorktree": {
"title": "Restablecer worktree",
"enabled": "Habilitado",
"disabled": "Deshabilitado",
"disabledUncommitted": "Deshabilitado (cambios sin confirmar detectados)",
"restoreDescription": "Tu worktree será restaurado a este commit.",
"rollbackCommits_one": "Revertir {{count}} commit desde HEAD actual.",
"rollbackCommits_other": "Revertir {{count}} commits desde HEAD actual.",
"discardChanges_one": "Descartar {{count}} cambio sin confirmar.",
"discardChanges_other": "Descartar {{count}} cambios sin confirmar.",
"untrackedPresent_one": "{{count}} archivo sin rastrear presente (no afectado por el restablecimiento).",
"untrackedPresent_other": "{{count}} archivos sin rastrear presentes (no afectados por el restablecimiento).",
"forceReset": "Forzar restablecimiento (descartar cambios sin confirmar)",
"uncommittedWillDiscard": "Los cambios sin confirmar serán descartados.",
"uncommittedPresentHint": "Hay cambios sin confirmar. Activa Forzar restablecimiento o confirma/guarda para continuar."
},
"buttons": {
"retry": "Reintentar"
}
}
}