feat(webui): 入站调度观测面板#44
Merged
Merged
Conversation
首页 unified 模式展示 ingress-dispatch 指标;对接 GET /ingress-dispatch。
分片模式下展示 hub 汇总的 dispatch 指标及各 worker 漏斗。
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
- 当前
ingressDispatchVisible计算属性只要在shardObsVisible为 false 时就会返回true,即使此时尚未加载任何ingressDispatch数据,也会短暂渲染一个空面板;在显示该区块之前,建议同时检查是否存在有意义的ingressDispatch数据(例如 alerts、send_queue 或 totals)。 IngressDispatchWorker.ingress_dispatch字段目前被标注为完整的IngressDispatchData类型,但看起来实际上只包含每个 worker 的子集数据(例如计数和延迟);将该类型收紧为更具体的 worker 级接口,可以让使用方式更清晰,并防止不小心依赖那些实际上从未出现的字段。
给 AI Agent 的提示
Please address the comments from this code review:
## Overall Comments
- The `ingressDispatchVisible` computed currently returns `true` whenever `shardObsVisible` is false, even if no `ingressDispatch` data is loaded, which can briefly render an empty panel; consider also checking for the presence of meaningful `ingressDispatch` data (e.g. alerts, send_queue, or totals) before showing the section.
- The `IngressDispatchWorker.ingress_dispatch` field is typed as the full `IngressDispatchData`, but appears to contain only a per-worker subset (e.g. counts and latencies); tightening this type to a more specific worker-level interface would make usage clearer and prevent accidental reliance on fields that are never present.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- The
ingressDispatchVisiblecomputed currently returnstruewhenevershardObsVisibleis false, even if noingressDispatchdata is loaded, which can briefly render an empty panel; consider also checking for the presence of meaningfulingressDispatchdata (e.g. alerts, send_queue, or totals) before showing the section. - The
IngressDispatchWorker.ingress_dispatchfield is typed as the fullIngressDispatchData, but appears to contain only a per-worker subset (e.g. counts and latencies); tightening this type to a more specific worker-level interface would make usage clearer and prevent accidental reliance on fields that are never present.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `ingressDispatchVisible` computed currently returns `true` whenever `shardObsVisible` is false, even if no `ingressDispatch` data is loaded, which can briefly render an empty panel; consider also checking for the presence of meaningful `ingressDispatch` data (e.g. alerts, send_queue, or totals) before showing the section.
- The `IngressDispatchWorker.ingress_dispatch` field is typed as the full `IngressDispatchData`, but appears to contain only a per-worker subset (e.g. counts and latencies); tightening this type to a more specific worker-level interface would make usage clearer and prevent accidental reliance on fields that are never present.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Summary by Sourcery
在首页仪表盘中新增入口分发(ingress dispatch)可观测性面板,并将其连接到新的后端端点和类型定义。
新功能:
/ingress-dispatchAPI 客户端,以及用于分发、队列和连接池指标的对应 TypeScript 模型。增强与改进:
Original summary in English
Summary by Sourcery
Add an ingress dispatch observability panel to the home dashboard and wire it to a new backend endpoint and type definitions.
New Features:
Enhancements: