Improve progress draft labels and tool details#79146
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: not applicable. this is a PR for progress-draft UX/rendering changes rather than a standalone bug report. Source and diff inspection establish the before/after paths, but no live channel behavior was reproduced. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Rebase onto current main, align the docs/examples with the intended formatter output, then merge only after real behavior proof or a maintainer proof override. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a PR for progress-draft UX/rendering changes rather than a standalone bug report. Source and diff inspection establish the before/after paths, but no live channel behavior was reproduced. Is this the best way to solve the issue? Mostly yes: the generic structured-line approach keeps channel code sharing the SDK formatter and leaves rich Slack rendering channel-owned. The docs mismatch, missing proof, and dirty branch state should be resolved before merge. Full review comments:
Overall correctness: patch is correct What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a1ac559ed7e6. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbee93be75
ℹ️ 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".
| }); | ||
| } | ||
| })), | ||
| ].slice(-SLACK_MAX_BLOCKS); |
There was a problem hiding this comment.
Honor progress maxLines when building rich Slack draft blocks
The new slice(-SLACK_MAX_BLOCKS) cap is applied after the label block is prepended, so in rich progress mode the label does not roll with the configured streaming.progress.maxLines behavior (it only drops near the 50-block Slack hard cap). In dispatch.ts, previewToolProgressLines is already trimmed to resolveChannelProgressDraftMaxLines(account.config), then this helper adds an extra label block on top; for common configs (for example maxLines: 3 or the default 8), rich blocks render one extra stale label row while text-mode drafts correctly roll it away.
Useful? React with 👍 / 👎.
dbee93b to
70233f8
Compare
Summary
q,search_query, and batched query arrays instead of falling back to bareWeb SearchReal behavior proof
Web Search.70233f8037.node --import tsx -e 'import { buildChannelProgressDraftLine, formatChannelProgressDraftText } from "./src/plugin-sdk/channel-streaming.ts"; const lines = [buildChannelProgressDraftLine({event:"tool", name:"web_search", args:{search_query:[{q:"Codex OAuth API key"}], response_length:"short"}}), buildChannelProgressDraftLine({event:"tool", name:"bash", args:{command:"pnpm test"}})].filter(Boolean); console.log(formatChannelProgressDraftText({entry:{streaming:{progress:{label:"Shelling", maxLines:4}}}, lines}));'Web Searchtitle plus query detail, and renders the bash row with theBashtitle plus command summary.Verification
pnpm installpnpm test src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.ts src/agents/tool-display.test.tspnpm test src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.ts extensions/slack/src/progress-blocks.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts extensions/msteams/src/reply-stream-controller.test.ts extensions/msteams/src/reply-dispatcher.test.ts src/agents/tool-display.test.tspnpm plugin-sdk:api:checkpnpm tsgo:extensionspnpm exec oxfmt --check --threads=1 CHANGELOG.md docs/concepts/progress-drafts.md docs/channels/discord.md src/plugin-sdk/channel-streaming.ts src/plugin-sdk/channel-streaming.test.ts extensions/discord/src/monitor/message-handler.process.test.tspnpm build