Skip to content

fix: preserve full chat text for Tray TTS - #900

Merged
steipete merged 2 commits into
openclaw:mainfrom
ArtLupo:codex/tray-tts-full-message
Jul 6, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
ArtLupo:codex/tray-tts-full-message

Conversation

@ArtLupo

@ArtLupo ArtLupo commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the complete assistant response alongside the 200-character notification preview.
  • Use the complete response for Tray text-to-speech while keeping notifications/history compact.
  • Fall back to the preview for legacy, null, or empty full-message values.

Thanks @ArtLupo for the contribution.

Validation

Current head: c4e0a4163719628d37c2c9f906357dd62d06da36

Security and compatibility

  • No new network, permission, command, or persistence surface.
  • Notification and history text remain truncated; the full response stays in the existing in-process event object for TTS.
  • Existing notification producers remain compatible because FullMessage is optional.

@clawsweeper

clawsweeper Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 1:01 AM ET / 05:01 UTC.

Summary
The PR adds an optional FullMessage field to chat notifications, populates it with the untruncated assistant response, routes Tray TTS through that value with preview fallback, and adds shared/tray regression tests.

Reproducibility: yes. from source inspection: current main truncates assistant notification text at 200 characters and Tray TTS reads that same preview field. I did not run a live Windows tray reproduction in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Changed surface: 7 files, 87 additions, 1 deletion. The patch is small but crosses the shared notification model, gateway event emission, Tray TTS selection, and regression tests.
  • Runtime proof: 0 proof artifacts found. External PRs need current-head real behavior proof, and the body currently reports tests rather than live Tray read-aloud evidence.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add a ## Real behavior proof section with current-head redacted evidence that Tray read-aloud speaks a long assistant response past the 200-character preview boundary.
  • [P1] Wait for exact-head GitHub Build and Test checks to finish, or update the PR body if maintainers rerun the required validation locally.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body reports build and unit-test evidence, but it does not include current-head live output, logs, recording, or another runtime artifact showing the Tray read-aloud path speaking a long response; screenshots, recordings, terminal output, copied live output, linked artifacts, and redacted logs all count if private details are redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The remaining merge gate is proof: the PR body reports tests but does not show a live or runtime Tray TTS run speaking a long assistant response beyond the preview boundary.
  • [P1] The exact-head GitHub Build and Test workflow was still in progress at review time, so maintainers should wait for required checks to settle before merging.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow full-text-for-TTS split after current-head Tray read-aloud proof is added and exact-head required validation finishes cleanly, keeping notifications/history/categorization on the compact preview text.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No automated repair is indicated; the remaining blocker is contributor or maintainer real behavior proof and settled exact-head validation, not a concrete code defect.

Security
Cleared: No concrete security or supply-chain issue was found; the diff adds no dependency, workflow, command, network, credential, or persistence surface.

Review details

Best possible solution:

Land the narrow full-text-for-TTS split after current-head Tray read-aloud proof is added and exact-head required validation finishes cleanly, keeping notifications/history/categorization on the compact preview text.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: current main truncates assistant notification text at 200 characters and Tray TTS reads that same preview field. I did not run a live Windows tray reproduction in this read-only review.

Is this the best way to solve the issue?

Yes, the proposed split is the narrow maintainable fix because full text stays limited to the TTS path while preview text remains the source for notifications, history, and categorization. Merge readiness still depends on real behavior proof and completed exact-head validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fcc74778a35c.

Label changes

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦪 silver shellfish.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal Tray TTS bug fix with limited blast radius and no evidence of release-blocking impact.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports build and unit-test evidence, but it does not include current-head live output, logs, recording, or another runtime artifact showing the Tray read-aloud path speaking a long response; screenshots, recordings, terminal output, copied live output, linked artifacts, and redacted logs all count if private details are redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

Acceptance criteria:

  • [P1] ./build.ps1.
  • [P1] dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore.
  • [P1] Current-head Tray read-aloud proof for a long assistant response, with private details redacted.

What I checked:

Likely related people:

  • RBrid: Prior main-history commits touched Windows node text-to-speech and adjacent tray notification mapping, which are close to the changed TTS/notification path. (role: TTS and tray notification history contributor; confidence: medium; commits: e0c40985a718, 8b5ea3294b33; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Services/AppNotificationMapper.cs, src/OpenClaw.Tray.WinUI/Services/TextToSpeech/TextToSpeechService.cs)
  • bkudiess: Recent history cited in the prior ClawSweeper review connects this person to provider-aware chat/gateway-client and TTS fallback work adjacent to the receive and playback path. (role: recent chat and TTS area contributor; confidence: medium; commits: ff5cafb52f52, d6b1a72f6d23; files: src/OpenClaw.Shared/OpenClawGatewayClient.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Services/TextToSpeech/TextToSpeechService.cs)
  • TurboTheTurtle: Recent gateway chat filtering work touched the same OpenClawGatewayClient assistant-event area and related shared tests. (role: recent gateway chat contributor; confidence: medium; commits: 65b88d8b639f; files: src/OpenClaw.Shared/OpenClawGatewayClient.cs, tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs)
  • shanselman: Local blame/path history ties the current main snapshot and nearby App guardrail work to the shared model, gateway client, and large App notification handler owner area. (role: current-main snapshot and App guardrail contributor; confidence: medium; commits: 4166e0fd63f8, 06b63ac6ce7d; files: src/OpenClaw.Shared/Models.cs, src/OpenClaw.Shared/OpenClawGatewayClient.cs, src/OpenClaw.Tray.WinUI/App.xaml.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-01T06:41:11.869Z sha 61b8494 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-06T04:57:31.959Z sha c4e0a41 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. labels Jul 1, 2026
@steipete steipete changed the title [codex] Preserve full chat text for Tray TTS fix: preserve full chat text for Tray TTS Jul 6, 2026
@steipete
steipete marked this pull request as ready for review July 6, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4e0a41637

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (_settings?.VoiceTtsEnabled == true)
{
_ = (_chatCoordinator?.SpeakResponseAsync(notification.Message) ?? Task.CompletedTask);
_ = (_chatCoordinator?.SpeakResponseAsync(speechText) ?? Task.CompletedTask);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clamp or chunk full TTS text before playback

When VoiceTtsEnabled is on and the selected/default provider is ElevenLabs, a normal prose assistant response whose sanitized text is over 5,000 characters is now passed in full here; ElevenLabsTextToSpeechClient.SynthesizeAsync rejects text longer than TtsCapability.MaxTextLength (5000), and SpeakConfiguredTextAsync only logs the warning, so the response is not spoken at all. Before this change the value was the 200-character preview, so long responses regress unless the full text is chunked or clamped before calling SpeakResponseAsync.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 43d40ed into openclaw:main Jul 6, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants