[codex] Deduplicate connection failure messaging#4367
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 a helper function for shorter connection status titles and removes a redundant placeholder message from the chat composer. The changes are self-contained UI text cleanup with no complex logic or risky side effects. You can customize Macroscope's approvability policy. Learn more. |
Connection failures currently repeat the same supervisor error in the composer banner title, banner body, and disabled composer placeholder. This makes the failure state noisy and makes the actual reason harder to scan.
The banner title used
connectionStatusText, which intentionally includes the latest low-level reason, while the banner description also rendered that reason. The composer independently reused the same combined status string as its placeholder.This change adds a concise connection-status title presentation, keeps the underlying failure reason in the banner description, and leaves the normal composer placeholder unchanged while sending remains unavailable.
Verification:
vp lint --report-unused-disable-directiveson the changed filesNote
Low Risk
Presentation-only changes to connection messaging in the web UI; no changes to connection logic or send gating beyond placeholder copy.
Overview
Connection failure copy was repeated in the composer banner title, banner body, and disabled composer placeholder. This PR adds
connectionStatusTitlein client-runtime so titles stay short (e.g. reconnecting omits theReason: …line thatconnectionStatusTextstill includes).ChatViewuses the new helper for the environment-unavailable banner title while the description still showsconnection.error.ChatComposerno longer injects connection status into the textarea placeholder when the environment is down—it uses the usual placeholders instead.Reviewed by Cursor Bugbot for commit 221377f. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Deduplicate connection failure messaging in chat banner and composer
connectionStatusTitlein presentation.ts, which returns a concise title (e.g.Failed to connect. Reconnecting...) that suppresses error details, delegating toconnectionStatusTextwith error forced to null otherwise.connectionStatusTitleinstead ofconnectionStatusText, removing the redundant error reason from the banner title.environmentUnavailableplaceholder branch from ChatComposer.tsx, so the composer no longer shows connection status text in the textarea placeholder when the environment is unavailable.Macroscope summarized 221377f.