Skip to content

fix: sync topsql filter state with url#1893

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
yibin87:fix/topsql-url-filter-state
May 29, 2026
Merged

fix: sync topsql filter state with url#1893
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
yibin87:fix/topsql-url-filter-state

Conversation

@yibin87

@yibin87 yibin87 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • sync TopSQL filter dropdown state with the URL so links can restore instance, limit, group by, and order by
  • make the shared query param hook react to URL changes instead of caching stale search state
  • add TopSQL Cypress coverage for URL updates and URL-based filter restoration

Testing

  • pnpm -C ui exec prettier --write packages/tidb-dashboard-lib/src/hooks/useQueryParams.ts packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx packages/tidb-dashboard-for-op/cypress/integration/topsql/topsql.spec.ts
  • pnpm -C ui exec eslint packages/tidb-dashboard-lib/src/hooks/useQueryParams.ts packages/tidb-dashboard-lib/src/apps/TopSQL/pages/List/List.tsx packages/tidb-dashboard-for-op/cypress/integration/topsql/topsql.spec.ts --format unix
  • pnpm exec tsc -p tsconfig.json --emitDeclarationOnly false --outDir /private/tmp/tidb-dashboard-lib-tsc
img_v3_02125_291f283b-05ce-4ec1-baea-62d735892ebg

@ti-chi-bot ti-chi-bot Bot requested a review from XuHuaiyu May 29, 2026 04:11
@ti-chi-bot ti-chi-bot Bot added the size/XL label May 29, 2026
Signed-off-by: yibin87 <huyibin@pingcap.com>
@yibin87 yibin87 force-pushed the fix/topsql-url-filter-state branch from c45f832 to 371c94d Compare May 29, 2026 04:31
@yibin87 yibin87 requested a review from shhdgit May 29, 2026 04:46
@ti-chi-bot

ti-chi-bot Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shhdgit

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the lgtm label May 29, 2026
@ti-chi-bot

ti-chi-bot Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

[LGTM Timeline notifier]

Timeline:

  • 2026-05-29 04:49:23.826057917 +0000 UTC m=+586833.796222974: ☑️ agreed by shhdgit.

@ti-chi-bot ti-chi-bot Bot added the approved label May 29, 2026
@ti-chi-bot ti-chi-bot Bot merged commit be251c7 into pingcap:master May 29, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants