btlqql opened a new pull request, #5876:
URL: https://github.com/apache/rocketmq-dashboard/pull/5876
## Why
The tool playground sets its once-per-mount bootstrap flag before the
catalog request resolves. When `listTools` fails (backend hiccup, proxy 502),
the flag stays set forever: reopening the modal never retries, so the tool list
stays empty until a full page reload, even though the modal was designed to be
re-opened for a fresh catalog.
## What changed
- `web/src/pages/ai/components/ToolPlaygroundModal.tsx`:
- `loadTools` now reports whether the catalog actually loaded.
- `bootstrap` resets the once-per-mount flag when the load failed, so the
next open retries instead of showing a permanently empty playground.
- The bootstrap trigger effect now depends on `open`/`disabled` only and
calls the latest `bootstrap` through a ref — otherwise the identity churn from
the state a failed bootstrap sets would retrigger it in a retry loop.
## Validation
- New `ToolPlaygroundModal.test.tsx`: open with a rejecting `listTools`,
close, reopen, and assert the catalog is fetched a second time. Red before (1
call), green after (2 calls, no loop).
- `ToolPlaygroundModal.test.tsx`, `AiPage.test.tsx`,
`PromptTemplateModal.test.tsx` all pass (16/16).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]