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": "編集を続ける",
"discardChanges": "変更を破棄"
}
},
"restoreLogsDialog": {
"title": "リトライを確認",
"historyChange": {
"title": "履歴の変更",
"willDelete": "このプロセスを削除します",
"andLaterProcesses_one": "および後続の{{count}}件のプロセス",
"andLaterProcesses_other": "および後続の{{count}}件のプロセス",
"fromHistory": "を履歴から削除します。",
"codingAgentRuns_one": "{{count}}件のコーディングエージェント実行",
"codingAgentRuns_other": "{{count}}件のコーディングエージェント実行",
"scriptProcesses_one": "{{count}}件のスクリプトプロセス",
"scriptProcesses_other": "{{count}}件のスクリプトプロセス",
"setupCleanupBreakdown": "(セットアップ{{setup}}件、クリーンアップ{{cleanup}}件)",
"permanentWarning": "この操作は履歴を永久に変更し、元に戻すことはできません。"
},
"uncommittedChanges": {
"title": "未コミットの変更が検出されました",
"description_one": "{{count}}件の未コミットの変更があります",
"description_other": "{{count}}件の未コミットの変更があります",
"andUntracked_one": "および{{count}}件の未追跡ファイル",
"andUntracked_other": "および{{count}}件の未追跡ファイル",
"acknowledgeLabel": "これらの変更が影響を受ける可能性があることを理解しています"
},
"resetWorktree": {
"title": "ワークツリーをリセット",
"enabled": "有効",
"disabled": "無効",
"disabledUncommitted": "無効(未コミットの変更が検出されました)",
"restoreDescription": "ワークツリーはこのコミットに復元されます。",
"rollbackCommits_one": "現在のHEADから{{count}}件のコミットをロールバックします。",
"rollbackCommits_other": "現在のHEADから{{count}}件のコミットをロールバックします。",
"discardChanges_one": "{{count}}件の未コミットの変更を破棄します。",
"discardChanges_other": "{{count}}件の未コミットの変更を破棄します。",
"untrackedPresent_one": "{{count}}件の未追跡ファイルがあります(リセットの影響を受けません)。",
"untrackedPresent_other": "{{count}}件の未追跡ファイルがあります(リセットの影響を受けません)。",
"forceReset": "強制リセット(未コミットの変更を破棄)",
"uncommittedWillDiscard": "未コミットの変更は破棄されます。",
"uncommittedPresentHint": "未コミットの変更があります。強制リセットをオンにするか、コミット/スタッシュしてから続行してください。"
},
"buttons": {
"retry": "リトライ"
}
}
}