[codex] Report markdown interaction failures#3355
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 This PR adds console error logging for markdown interaction failures for debugging purposes. The changes replace silent error swallowing with structured error reporting while preserving all existing user-facing behavior (toasts, error handling). This is a low-risk observability improvement. You can customize Macroscope's approvability policy. Learn more. |
Summary
Verification
vp checkvp run typecheckNote
Low Risk
Observability and error-handling only in chat markdown UI; success paths, cancellation handling, and user-facing toasts are preserved.
Overview
Adds
reportMarkdownActionFailureinChatMarkdown.tsxto log[chat-markdown] action failedwith an operation label and contextual fields (paths, copy format, code language/fence title) while not logging clipboard payload content.Clipboard: Table and code-block copy handlers no longer swallow errors; failures are logged with
copy-table/copy-code-blockcontext. File path copy failures also logcopy-file-pathbefore showing the existing error toast.File links: Open-in-editor and open-in-browser flows wrap async work in
try/catch, log failures with the target path, and still show the same error toasts; interrupted commands are unchanged. File link context menu errors are logged instead of failing silently.External links: Link context menu handling is refactored to async/
try/catch, with distinct operations for showing the menu, opening in integrated preview (logging only on realFailure, not interruption), and opening in the system browser.Reviewed by Cursor Bugbot for commit ac14e35. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Report markdown interaction failures in chat with error logging and toasts
reportMarkdownActionFailurehelper in ChatMarkdown.tsx that logs failures viaconsole.errorwith a standardized prefix and context.catchblocks inMarkdownTableandMarkdownCodeBlockwith calls to the new helper, so clipboard copy failures are now logged with operation context.MarkdownFileLinknow wraps file open and copy operations in try/catch, reports failures via the helper, and shows error toasts on thrown errors.ChatMarkdownnow reports failures for menu display, preview opens, and external link opens instead of silently swallowing errors.Macroscope summarized ac14e35.