Fix/UI context notice icon overflow#47939
Conversation
Greptile SummaryThis PR's stated purpose is a one-line SVG fix ( Key issues found:
Confidence Score: 2/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/auto-reply/reply/dispatch-acp.ts
Line: 318-322
Comment:
**Unused variable and redundant condition**
`blockCount` is declared on line 318 but is never referenced anywhere in the function — this will trigger a TypeScript/lint unused-variable warning. Additionally, the guard `ttsMode !== "all"` on line 322 is logically redundant: since `ttsMode` is already checked to equal `"final"`, it can never simultaneously equal `"all"`.
```suggestion
const routedCounts = delivery.getRoutedCounts();
// Attempt final TTS synthesis for ttsMode="final" (independent of delivery status).
// This ensures routed ACP flows still get final audio even after block delivery.
let ttsSucceeded = false;
if (ttsMode === "final") {
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/auto-reply/reply/dispatch-acp.ts
Line: 322-325
Comment:
**Missing empty-text guard before TTS call**
The original code checked `delivery.getBlockCount() > 0 && accumulatedBlockText.trim()` before invoking `maybeApplyTtsToPayload`. This PR removes both guards, so TTS synthesis will now be attempted even when `accumulatedBlockText` is an empty string (e.g., when no text blocks were produced). Depending on the TTS provider, calling synthesis with empty input may cause an error or unnecessary network traffic.
Consider re-adding at least the `accumulatedBlockText.trim()` guard:
```suggestion
if (ttsMode === "final" && accumulatedBlockText.trim()) {
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/browser/cdp.ts
Line: 24-27
Comment:
**Duplicated `sanitizeErrorMessage` helper**
The identical function is defined in both `src/browser/cdp.ts` (lines 24–27) and `src/browser/chrome-mcp.ts` (lines 16–19). Since both files are in the same `src/browser/` directory, this helper should be extracted into a shared module (e.g., `src/browser/utils.ts`) and imported by both files to avoid drift if the implementation ever changes.
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: 1ed0d95 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ed0d95051
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
1ed0d95 to
4a8398a
Compare
✅ Local Verification PassedI have verified the code locally:
❓ CI Failures UnrelatedThe CI failures appear to be unrelated to this 1-line SVG fix:
Question: Are these CI failures pre-existing in the repository, or should I investigate further? The fix is minimal and correct: - <svg class="context-notice__icon" viewBox="0 0 24 24" ...>
+ <svg class="context-notice__icon" width="24" height="24" viewBox="0 0 24 24" ...>
This prevents the SVG icon from expanding and covering the chat window (fixes #47924).
@openclaw-bot @steipete Could you help verify if the CI failures are pre-existing? Thank you! 🙏 |
- Fixes openclaw#47924 - Prevents SVG icon from expanding and covering entire chat window - Adds explicit 24x24px dimensions to context-notice__icon SVG Root cause: The SVG element lacked explicit width and height attributes, causing it to expand to fill the parent container when the context usage warning appears (at ~85% token limit).
4a8398a to
6fefeb2
Compare
Summary
Fixes #47924 - Control UI context-notice SVG icon overflows and covers entire chat window
Root Cause
The SVG element lacked explicit width and height attributes, causing it to expand to fill the parent container when the context usage warning appears (at ~85% token limit).
Fix
Added
width="24" height="24"attributes to the SVG element.Testing
Related Issue
Closes #47924