fix(ui): separate terminal safe-retry notice from preceding turn content#1094
Conversation
The safe_retry_failed notice rendered as a bare caption with no boundary, so when it followed a reasoning or tool trow it sat in the 12px column gap and read as more model thinking (#943). Add a hairline top rule (the canonical divider treatment) plus padding, guarded by `* +` so it only applies when the notice follows a sibling — a notice that is the turn's only part (first-attempt connection failure, where the failed attempt's reasoning is removed) gets no stray leading line. Extend the safe-retry snap fixture with a preceding reasoning part, a standalone-notice case, and the real assistant-content gap. The snap grid is visual-only, so assert the divider directly via getComputedStyle: a preceded notice carries a 1px top border + 12px padding, a standalone notice carries neither.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
More reviews will be available in 30 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The
safe_retry_failedterminal notice rendered as a bare caption with no boundary. When it followed a reasoning or tool trow it sat in the assistant-content column's 12px gap and read as more model thinking. This adds a hairline top rule (the canonical divider treatment) plus padding, guarded by a* +sibling combinator so the divider only appears when the notice follows other turn content.Why
Fixes #943: the terminal stream-failure notice appears attached to reasoning output, so users read "恢复失败…" as part of the model's thinking rather than a turn-level status line.
Related Issue
Closes #943
Human Review Status
Pending
Review Focus
The
* + [data-component="notice-part"]selector. It must add the divider only when the notice follows a sibling, and must NOT draw a leading hairline when the notice is the turn's only part — a real case: a first-attempt connection failure where the failed attempt's reasoning is removed (removeReasoningForAttempt) before the notice is written, leaving the notice alone. Spacing above the divider deliberately relies on the production container's existinggap: 12px; padding-top provides the spacing below.Risk Notes
UI-only; no behavior, data, permission, or platform surface touched. One nuance: the snap fixture mirrors the real
[data-slot="session-turn-assistant-content"]flex/gap via inline style rather than reusing the production CSS, so a future change to that container gap won't auto-propagate to the fixture. The two conditional checklist items left unticked: no platform/packaging surface, and no docs/release/deps surface.How To Verify
Screenshots or Recordings
Visual surface checked with the
safe-retrysnap target (bun run snap safe-retry). The regenerated grid underdocs/design/preview/screenshots/safe-retry.pngshows the notice clearly separated from the preceding "思考中" reasoning block, and a standalone notice with no stray divider.Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.