Handle item/reasoning/textDelta notifications#165
Conversation
codex emits the full reasoning-chain stream as item/reasoning/textDelta
in addition to the item/reasoning/summaryTextDelta summary stream. The
notification handler only recognised the summary variant, so any reasoning
text streamed via the textDelta channel was dropped — the UI showed only
the summary, which makes long thinking phases look like a stall.
Add the textDelta variant to both readReasoningDelta() and the Thinking
activity recognition, mirroring the existing summaryTextDelta handling
exactly (same params shape: { itemId, delta }).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review Summary by QodoHandle item/reasoning/textDelta notifications for full reasoning streams
WalkthroughsDescription• Handle item/reasoning/textDelta notifications alongside existing summary stream • Add textDelta variant to reasoning delta reader for full reasoning chain • Include textDelta in Thinking activity recognition logic • Prevent reasoning text loss during long model thinking phases Diagramflowchart LR
A["item/reasoning/textDelta<br/>notification"] -->|"recognized in<br/>readReasoningDelta()"| B["liveReasoningTextByThreadId<br/>updated with delta"]
A -->|"recognized in<br/>activity detection"| C["Thinking activity<br/>label maintained"]
B --> D["UI displays full<br/>reasoning stream"]
C --> D
File Changes1. src/composables/useDesktopState.ts
|
Code Review by Qodo
1. Missing tests.md for textDelta
|
| // codex also emits the full reasoning-chain stream as item/reasoning/textDelta | ||
| // (alongside the summary stream). Without handling it, reasoning text the | ||
| // model streams via this channel is dropped and the UI shows only the | ||
| // summary, making long thinking phases look like a stall. | ||
| if (notification.method === 'item/reasoning/textDelta') { | ||
| const itemId = readString(params.itemId) | ||
| const delta = readString(params.delta) | ||
| if (!itemId || !delta) return null | ||
| return { messageId: liveReasoningMessageId(itemId), delta } | ||
| } |
There was a problem hiding this comment.
1. Missing tests.md for textdelta 📘 Rule violation ⚙ Maintainability
This PR adds a new UI-facing feature by handling item/reasoning/textDelta, but it does not add corresponding manual test instructions in the repository-root tests.md. Without updated test steps, reviewers/maintainers lack a reproducible way to validate the new streaming behavior.
Agent Prompt
## Issue description
A feature was implemented (handling `item/reasoning/textDelta` for the Thinking activity + reasoning delta streaming) but `tests.md` was not updated with manual verification steps.
## Issue Context
The change affects UI streaming behavior during long thinking phases; manual verification should explicitly cover both light and dark themes.
## Fix Focus Areas
- tests.md[5023-5081]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
By the way — we maintain a downstream fork of codexUI for a product we're building, and we've been doing some work on top of it that might be useful upstream. This PR is one piece; we've also done perf work on the SSE delta path (batching delta-driven re-renders per animation frame) and a richer More broadly: if you'd ever be interested in being involved on the product side, we'd be glad to talk — you know this codebase better than anyone. No pressure at all; even "just keep sending PRs" is a fine answer. If it's easier to chat off GitHub, let me know how to reach you. |
|
sure thanks, what is the fork? i couldnt find i dont see any changes there https://github.com/lxistired/codexui |
Problem
codex emits the full reasoning-chain stream as
item/reasoning/textDeltain addition to theitem/reasoning/summaryTextDeltasummary stream.useDesktopState.tsonly recognises the summary variant, so reasoning text streamed via thetextDeltachannel is dropped — the UI shows only the summary, which makes long thinking phases look like a stall ("Thinking…" with no streaming text for tens of seconds).Change
Add the
item/reasoning/textDeltavariant to:readReasoningDelta()— same params shape as the existing summary handler ({ itemId, delta }), routed toliveReasoningTextByThreadIdvialiveReasoningMessageId(itemId)Thinkingactivity recognition (so the activity label still flips correctly)Both additions mirror the existing
summaryTextDeltahandling exactly — no new code paths, just one more recognised method name in each spot.Notes
src/composables/useDesktopState.ts.item/reasoning/textDeltais in the app-server protocol; gpt-5.x withmodel_reasoning_summary = "detailed"is the common trigger for the channel carrying content).