unbridled-41 commented on PR #5002:
URL:
https://github.com/apache/rocketmq-dashboard/pull/5002#issuecomment-5788094720
Verification pass (from a clean checkout of `98912755`, not restated from
the description):
**Citations re-verified against base `1ef5d860` with `grep -n`/`sed -n`:**
- `useAgentRun.ts:393` (base) `setStopRequested(true)` with the deliberate
non-abort comment (`:397-401`); `:307` `if (chatInFlightRef.current) return;`
(silent); `:257` `chatInFlightRef.current = false;` inside `finishStream` — the
release the window waits on.
- `Composer.tsx:248` (base) `generating = isStreaming && !stopRequested`;
`:250` `canSend = ... && !generating && ...`; `:256-261` `handleSend` calls
`onSend(text)` then `onChange('')` (`:260`).
- `SendStopButton.tsx:62` (base) `disabled = state === 'stopping' || ...` —
the button never disables Enter while `stopping`, only its own click,
confirming the two gates disagree in the window.
- `useAiSend.ts:110` (base) `void optionsRef.current.send(current,
request);` — the swallowed refusal; `index.tsx:123` (base) `if (target ===
null) setInputValue(text);` — the only restore the page checked.
- Branch: `startStream` now throws on both guard branches; `useAiSend`
awaits the send inline (`await optionsRef.current.send(...)`) so the refusal
propagates; `handleSend`'s rejection handler restores the draft.
**Non-vacuity of the updated AiPage test:** the added
`toHaveValue('检查集群状态')` assertion failed pre-fix — the refused send cleared the
draft and nothing restored it (the assertion was only added after the fix, so
it was verified by reverting `useAiSend.ts` + `index.tsx` to base while keeping
the test: the draft restore is the part that flips the outcome; the
stream-count assertion alone passed pre- and post-fix and is a guard, not
evidence).
**Commands re-executed from the clean worktree (`web/node_modules`
symlinked):**
- `npx vitest run src/pages/ai/` → 16 files, **192/192 passed**, 0 unhandled
rejections.
- `npx tsc --noEmit` → clean. `npx eslint` on the five changed files → clean.
- `npx vitest run src/pages/studio/ src/pages/home/` → **101/101** (the
other `useAiSend` consumers).
No commit added; verification comment only.
--
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]