unbridled-41 opened a new pull request, #4283:
URL: https://github.com/apache/rocketmq-dashboard/pull/4283

   Fixes #4279.
   
   ## Problem / Evidence
   
   
`useQueueBrowser`(`web/src/components/QueueBrowser.tsx`)在"重新加载队列"时拉取指示器与请求代数失步:
   
   - `loadQueues` 以 `const requestId = ++requestSeqRef.current` 递增代数并清空 
`queues/offsets/entries`,但不清空 `pulling` 状态(对比 `[instanceId, topic]` 重置 effect 
会同时清 ref 与 state);
   - `handlePull` 的 `finally` 总是从 `pullingRef` 删除 key,但仅当代数仍最新才同步 state:`if 
(requestId === requestSeqRef.current) setPulling(...)`。
   
   于是:点击"查看"(拉取在途,数秒级 broker 读取)→ 再点"加载队列"(拉取期间按钮不禁用)→ 两请求结算后,行按钮 
`loading={state.pulling.has(key)}` 永久为 true 而 ref 已无该 
key——零在途请求、永久转圈。恢复只能再点一次"查看"(静默重复后端拉取)或切换 topic/实例。回归测试先红(`clears the pulling 
indicator when the queue list reloads mid-pull`)。
   
   ## Root cause / Fix
   
   `loadQueues` 使所有在途拉取失效(旧代数 finally 跳过 state 同步),却没有像 
topic/实例切换那样重置拉取指示器。修复:在 `loadQueues` 的重置块中补上 `pullingRef.current.clear(); 
setPulling(new Set())`,与既有重置 effect 完全一致(+4 行)。
   
   ## Priority & scoring
   
   PRIORITY 70 = 影响 27(消息页核心路径永久 spinner、误导运维 + 恢复动作隐式重复后端拉取)+ 波及 12(单组件/单模式)+ 
可复现 18(确定性 UI 序列)+ 维护价值 13(补齐仓库既有请求守卫模式);FIX_CONFIDENCE 95(与同文件既有重置模式一致,先红后绿)。
   
   ## Tests
   
   - 回归先红:`npx vitest run src/components/__tests__/QueueBrowser.test.tsx` → 
`Tests 1 failed | 8 passed (9)`;修复后 9/9 全绿。
   - 全量 web(分支上):`npx vitest run` → 982 tests(pristine 6c24d2ed = 981 + 本 PR 新增 
1),2 failed 均为 ConsumerPage 超时(未触碰文件、历轮已记录的负载脆弱族),隔离复跑 31/31 通过。
   - `npx tsc -b` 干净;`npx eslint` 0 error(2 个 react-refresh warning 经 stash 
在基线上实测逐字相同);`npm run build` ✓(9.51s)。
   - numstat 自检:`QueueBrowser.tsx +4/−0`、`QueueBrowser.test.tsx +26/−0`。
   
   ## Risk
   
   低。改动仅在既有重置语义上补齐一个状态域;在途拉取结果因代数失步本就会被丢弃,行为不变。CI:upstream 工作流对本仓库全部运行 
startup_failure(自 2026-08-29 起 0 check-runs,代码未变的成功运行也复现),head 13dee6f4 无法获得 CI 
结果,以上为本地完整验证。
   


-- 
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]

Reply via email to