You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/13 00:25:46 UTC
[PR] fix(ai): render an orphaned tool result without a tool name [rocketmq-dashboard]
123123213weqw opened a new pull request, #6487:
URL: https://github.com/apache/rocketmq-dashboard/pull/6487
Fixes #6432.
`toolDisplayName` called `startsWith` on the tool name unconditionally, but a Claude result frame carries only the call id — the name lives in the remembered start, which an orphaned result (already supported by `AgentEventProjector`) does not have. Rendering such a result threw and took the transcript UI down instead of showing the observed output.
The display helper now degrades to an empty label for an absent name; `ToolBlock` renders the result with the fallback header. `toolDisplayName` is pinned by a unit case in `equivalence.test.ts` (blank and `undefined` degrade, real names keep their prefixes stripped).
cc @lizhimins
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): render an orphaned tool result without a tool name [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #6487:
URL: https://github.com/apache/rocketmq-dashboard/pull/6487#issuecomment-6190304621
Closing in favour of #6438, which is now merged into `rocketmq-studio` as `ef069890b`. The crash is real and your read of it matches ours exactly: `AgentEventProjector.labelFor` (`server/src/main/java/org/apache/rocketmq/studio/ops/ai/conversation/event/AgentEventProjector.java:310-315`) returns null when the provider reported a result without a remembered start, `TimelineEvent.java:53`'s `@JsonInclude(NON_NULL)` then drops the field, and `web/src/pages/ai/render/blocks.ts:123` called `tool.startsWith(...)` unconditionally, taking the whole transcript down. We are closing this as a duplicate of **#6438**, which patches the same line for the same issue (#6432) and goes two steps further that this branch needs: it guards with `typeof tool !== 'string'` rather than a falsy check (so a truthy non-string still cannot reach `startsWith`), and it fixes the two consumers your version leaves broken — `web/src/pages/ai/components/blocks/ToolBlock.tsx:115` would render an **empty card titl
e** once `toolDisplayName` returns `''` (#6438 falls back to a new localised `ai.tool.unknownName`), and `resolveCatalogTool` at `:96-105` keeps searching the catalog with `display === ''` (#6438 early-returns on a blank/non-string name). Two notes on the test. First, two of your three assertions already pass on the base: `web/src/pages/ai/render/equivalence.test.ts:763-772` has a `describe('toolDisplayName')` block whose `stripsTransportAndNamespacePrefixesTest` already asserts `toolDisplayName('rmq.topic.list') === 'topic.list'` (`:766`) and `toolDisplayName('') === ''` (`:771`) — the empty string never threw, because both `startsWith` calls return false and the function falls through to `withoutMcp`. Only the `undefined` case is new here, so the description's "blank and `undefined` degrade, real names keep their prefixes stripped" overstates what this branch adds. Second, the new block at `equivalence.test.ts:217` is a second `describe('toolDisplayName')` alongside the existing
one, which Vitest will run side by side under the same name. If you want to keep contributing in this area, the useful follow-up against #6438's shape is a component-level case for the live path (`web/src/pages/ai/render/reduceLive.ts` produces the same nameless block) rather than another helper-level one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): render an orphaned tool result without a tool name [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #6487: fix(ai): render an orphaned tool result without a tool name
URL: https://github.com/apache/rocketmq-dashboard/pull/6487
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org