feat: improve speed test charts and mobile config - #51
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the speed test UI to provide per-metric rate charts with responsive behavior, and refactors API routing so speed-test endpoints are accessed under /api (with a dev-server proxy), while also improving the mobile configuration experience.
Changes:
- Route ping/download/upload endpoints through
/apiand proxy/apiin the Rspack dev server. - Add
RateCurvecharts and extend runners to record/display rate history (ping/download/upload) with mobile chart switching. - Move “advanced config” into a mobile dialog and adjust config panel styling for small screens.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/i18n.ts | Adds translation key for the advanced config title. |
| web/src/const.ts | Replaces environment-based base URL with a single /api base path. |
| web/src/components/run-case-once.tsx | Adds per-metric history arrays, chart UI, and stop/restart behavior for the “once” run flow. |
| web/src/components/rate-curve.tsx | Introduces a reusable inline SVG rate chart component. |
| web/src/components/case-runner.tsx | Tracks and renders rate history using RateCurve. |
| web/src/components/case-config.tsx | Moves advanced settings into a mobile dialog and adds a media-query hook for responsive behavior. |
| web/src/cases/upload.ts | Switches upload endpoint to /api/upload. |
| web/src/cases/ping.ts | Switches ping endpoint to /api/ping. |
| web/src/cases/download.ts | Switches download endpoint to /api/download. |
| web/rspack.config.js | Adds devServer proxy for /api and sets explicit devServer host/port. |
| server/src/main.rs | Moves speed-test endpoints under /api/* on the server. |
Comments suppressed due to low confidence (1)
web/src/components/rate-curve.tsx:157
RateCurverenders a hard-coded Chinese label (峰值) in the chart footer. This will show up even when locale isen, and it bypasses the existing i18n mechanism (I18nContext/t(...)).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
XGHeaven
force-pushed
the
feat/dev-api-mobile-charts
branch
from
July 21, 2026 15:49
280d1c6 to
fe9c453
Compare
Closed
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
Checks