Commit ca16308
🤖 Show unpushed commit details in SSH workspace deletion errors (#479)
## Problem
When SSH workspace deletion is blocked due to unpushed commits, users
only see:
```
Workspace contains unpushed commits. Use force flag to delete anyway.
```
This lacks critical context about what commits would be lost, making it
hard to decide whether to force delete.
## Solution
Enhanced the unpushed commits error to include the actual commit list
(up to 10 commits) in standard git log format.
**Implementation approach:**
- Capture `git log --branches --not --remotes --oneline` output to
stderr in the deletion check
- Include stderr directly in error message (no parsing - simpler and
more robust)
- Update ForceDeleteModal warning text to be more specific when unpushed
commits detected
- Add test verifying commit details appear in error
## UX Impact
**Before:**
```
Git Error
Workspace contains unpushed commits. Use force flag to delete anyway.
```
**After:**
```
Git Error
Workspace contains unpushed commits:
a1b2c3d Fix critical bug in validation
d4e5f6g Add user authentication
h7i8j9k Update documentation
1 parent 0d5f997 commit ca16308
File tree
3 files changed
+92
-4
lines changed- src
- components
- runtime
- tests/ipcMain
3 files changed
+92
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
988 | 992 | | |
989 | 993 | | |
990 | 994 | | |
| |||
1012 | 1016 | | |
1013 | 1017 | | |
1014 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1015 | 1038 | | |
1016 | 1039 | | |
1017 | | - | |
| 1040 | + | |
1018 | 1041 | | |
1019 | 1042 | | |
1020 | 1043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
617 | 679 | | |
618 | 680 | | |
0 commit comments