fix(gui): preserve filepath in apply error state

MA
5mo ago
+1-0

Description

Fixes https://github.com/continuedev/continue/issues/12641

Preserve the original filepath when an edit/apply operation fails in the GUI apply flow.

Previously, the failure path in handleApplyStateUpdate could close the apply state without carrying the file path forward, which caused the UI to show Failed to edit undefined.

This change keeps the file context in the error flow so the failure message references the correct file.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

Not applicable for this change, since this is a minimal error-state handling fix.

Tests

No tests were added as part of this minimal fix.

The change is limited to preserving filepath in the failed apply-state update so the existing error message uses the correct file path instead of undefined.


Summary by cubic

Preserve the original filepath in the GUI apply error flow so failure messages show the correct file. Fixes "Failed to edit undefined" by carrying filepath through the failed apply-state update.