[codex] Preserve detached desktop action causes#3371
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
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 Refactors error handling to use typed error classes that preserve full cause information instead of pretty-printing to strings. The actual runtime operations remain unchanged; this only affects how errors are structured for logging. Includes tests validating the new error classes. You can customize Macroscope's approvability policy. Learn more. |
Summary
Validation
vp test apps/desktop/src/app/DesktopDetachedActionErrors.test.ts apps/desktop/src/window/DesktopApplicationMenu.test.tsvp check(passes with existing warnings)vp run typecheckNote
Low Risk
Observability-only change in forked/detached error handlers; no change to relaunch or menu success paths.
Overview
Detached relaunch and native menu failure handlers no longer log only a preformatted
Cause.prettystring. They now build Schema tagged errors (DesktopLifecycleRelaunchError,DesktopApplicationMenuActionError) that keep the fullCause, plus reason or menu action, and log with a stable message derived from those fields.New unit tests assert combined fail/defect causes are retained on both error types and that messages match the structural attributes.
Reviewed by Cursor Bugbot for commit 4055656. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve structured causes in detached desktop action errors
DesktopLifecycleRelaunchErrorandDesktopApplicationMenuActionErrortagged error classes, each carrying a structuredcause(defect) and an identifying field (reasonoraction).{cause: string}becomes{error: <structured error>}for both relaunch and menu action failures.Macroscope summarized 4055656.