A successful non-commit Git action clears the commit composer, including a message the user has already written.
Reproduction
- In Git review, stage at least two files and select the Staged layer.
- Open Commit and write a message.
- Decide one file should not be included and click that file's Unstage action.
- Reopen the commit composer.
The message has been erased even though no commit was made. The remaining staged files can still be committed, but the user has to rewrite the message.
Evidence
- The Staged toolbar offers Unstage alongside the commit composer; individual files also expose Unstage.
- run_review_action handles Stage, Unstage, Discard, Patch, and Commit together.
- Its success callback unconditionally sets
commit_open = false and calls commit_query.clear() for every successful action.
Expected behavior and regression coverage
Retain the draft through staging, unstaging, and discard operations. Clear the submitted message after a successful Commit, with any explicit draft-discard behavior handled separately.
Test a populated commit editor with two staged files: unstage one file and verify the message survives; then successfully commit and verify the submitted draft is cleared. Also cover a failed commit retaining the draft.
Validation: source-path review on main 1196d89. The reproduction above is derived from the code; no live UI reproduction or new test was run.
A successful non-commit Git action clears the commit composer, including a message the user has already written.
Reproduction
The message has been erased even though no commit was made. The remaining staged files can still be committed, but the user has to rewrite the message.
Evidence
commit_open = falseand callscommit_query.clear()for every successful action.Expected behavior and regression coverage
Retain the draft through staging, unstaging, and discard operations. Clear the submitted message after a successful Commit, with any explicit draft-discard behavior handled separately.
Test a populated commit editor with two staged files: unstage one file and verify the message survives; then successfully commit and verify the submitted draft is cleared. Also cover a failed commit retaining the draft.
Validation: source-path review on main
1196d89. The reproduction above is derived from the code; no live UI reproduction or new test was run.