Skip to content

feat: improve speed test charts and mobile config - #51

Merged
XGHeaven merged 2 commits into
masterfrom
feat/dev-api-mobile-charts
Aug 3, 2026
Merged

feat: improve speed test charts and mobile config#51
XGHeaven merged 2 commits into
masterfrom
feat/dev-api-mobile-charts

Conversation

@XGHeaven

Copy link
Copy Markdown
Owner

Summary

  • route speed test endpoints through /api and proxy them in Rspack dev server
  • add separate rate charts for ping/download/upload with responsive mobile switching
  • move advanced config into a mobile dialog and polish chart/config UI

Checks

  • pnpm run build
  • pnpm run typecheck
  • cargo check

@XGHeaven XGHeaven changed the title feat: improve dev testing UI feat: improve speed test charts and mobile config Jun 12, 2026
@XGHeaven
XGHeaven requested a review from Copilot June 12, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /api and proxy /api in the Rspack dev server.
  • Add RateCurve charts 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

  • RateCurve renders a hard-coded Chinese label (峰值) in the chart footer. This will show up even when locale is en, and it bypasses the existing i18n mechanism (I18nContext / t(...)).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/src/components/run-case-once.tsx
Comment thread web/src/components/run-case-once.tsx Outdated
Comment thread web/src/components/run-case-once.tsx Outdated
Comment thread web/rspack.config.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.

Comment thread web/src/components/case-config.tsx Outdated
Comment thread web/src/components/case-runner.tsx
Comment thread web/src/components/case-runner.tsx
Comment thread web/src/components/case-runner.tsx Outdated
Comment thread web/src/components/run-case-once.tsx Outdated
Comment thread web/src/components/run-case-once.tsx
Comment thread web/src/components/run-case-once.tsx
Comment thread web/src/components/run-case-once.tsx
Comment thread web/src/components/rate-curve.tsx
Comment thread web/src/components/rate-curve.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Comment thread web/src/components/run-case-once.tsx Outdated
Comment thread web/src/components/case-runner.tsx Outdated
Comment thread web/src/components/rate-curve.tsx

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread web/src/components/case-runner.tsx
@XGHeaven
XGHeaven force-pushed the feat/dev-api-mobile-charts branch from 280d1c6 to fe9c453 Compare July 21, 2026 15:49
@XGHeaven
XGHeaven merged commit 320a803 into master Aug 3, 2026
11 checks passed
@XGHeaven
XGHeaven deleted the feat/dev-api-mobile-charts branch August 3, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants