mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-03-13 09:57:24 +00:00
Add a complete revert-local-commit flow so users can undo the most recent local commit directly from the Git header, placed before the refresh icon. Backend - add POST /api/git/revert-local-commit endpoint in server/routes/git.js - validate project input and repository state before executing git operations - revert latest commit with `git reset --soft HEAD~1` to keep changes staged - handle initial-commit edge case by deleting HEAD ref when no parent exists - return clear success and error responses for UI consumption Frontend - add useRevertLocalCommit hook to encapsulate API call and loading state - wire hook into GitPanel and refresh git data after successful revert - add new toolbar action in GitPanelHeader before refresh icon - route action through existing confirmation modal flow - disable action while request is in flight and show activity indicator Shared UI and typing updates - extend ConfirmActionType with `revertLocalCommit` - add confirmation title, label, and style mappings for new action - render RotateCcw icon for revert action in ConfirmActionModal Result - users can safely undo the latest local commit from the UI - reverted commit changes remain staged for immediate recommit/edit workflows