Clear VCS presentation state on finish#3764
Conversation
- Reset running UI state when a VCS action completes - Add regression coverage for finished action cleanup
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Simple bug fix that properly clears VCS presentation state (labels, output) when an action finishes, using the existing EMPTY_VCS_ACTION_STATE constant instead of a partial reset. Self-contained client-side state change with accompanying test. You can customize Macroscope's approvability policy. Learn more. |
Summary
packages/client-runtime.expo-widgetscreates the target.Testing
packages/client-runtime/src/state/vcsAction.test.ts.vp check.vp run typecheck.vp test.vp run lint:mobile.Note
Low Risk
Localized client-side state reducer change with new unit coverage; no auth, network, or persistence impact.
Overview
VCS action UI state no longer keeps phase labels, hook output, or other in-progress fields after a stacked Git action completes successfully.
On
action_finished,applyVcsActionProgressEventnow resets fromEMPTY_VCS_ACTION_STATE(likeaction_failed) and only keepsactionId,action, andoperation, instead of spreading the priorcurrentstate withisRunning: false. A unit test asserts labels andlastOutputLineare cleared while the completed action identity remains.Reviewed by Cursor Bugbot for commit 01f6d29. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Clear transient presentation state when a VCS action finishes
In the
applyVcsActionProgressEventreducer, theaction_finishedcase now spreadsEMPTY_VCS_ACTION_STATEinstead of current state, preserving onlyactionId,action, andoperation. This clears transient fields likecurrentLabel,currentPhaseLabel,hookName, andlastOutputLinethat previously persisted after an action completed.Macroscope summarized 01f6d29.