feat(web): network quality dashboard widgets#129
Merged
Conversation
The dashboard save endpoint validates widget_type against the VALID_WIDGET_TYPES whitelist, which omitted the three network quality widgets. Saving a dashboard containing them returned 400 Unknown widget_type. Add network-latency, network-quality and network-overview to the whitelist and cover the regression with a unit test.
The spec claimed the feature was frontend-only with no backend changes, but registering a widget type also requires adding it to the VALID_WIDGET_TYPES whitelist in dashboard.rs. Document that touch point and the corresponding cargo regression test.
LatencyChart was built for the detail page: it wraps itself in a card with its own title and hard-codes a 300px height. Embedded in the network-latency dashboard widget (which already provides the card and header), that produced a redundant nested card and overflowed the grid cell, visually overlapping the widget below. Add an opt-in embedded prop that drops the card chrome/title and fills the parent height, matching the line-chart widget pattern. The detail page keeps the default.
Expose isLoading from useNetworkChartRecords and gate the latency widget on both the records and summary queries, so it renders a skeleton instead of flashing the empty state or an axis-only chart while data loads. This matches the loading behavior of the quality and overview widgets.
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
Add network quality dashboard widgets end-to-end: design spec, shared data layer, four new widgets, config forms, i18n, and backend whitelist support.
Changes
VALID_WIDGET_TYPESwhitelist)Test plan
cargo clippy --workspace -- -D warningsbun run typecheck&&bun x ultracite check