feat: search tablets via backend on the database page#3838
Conversation
|
@copilot it works, but there is a small issue. when I search for a tablet (I paste the tablet id into search box), at first it switches to an empty table with title "no tablets data", and only after a delay it calls backend and shows a tablet. looks confusing |
Fixed in 2241f34. While the debounce is in flight on the database page (numeric input), the table now shows a loading state instead of being immediately filtered client-side to empty, and the client-side |
|
@copilot use https://github.com/conventional-changelog/commitlint/#what-is-commitlint to name the PR properly |
I don't have permission to edit the PR title from here. Suggested conventional-commit title (matches the repo's commitlint config — lowercase subject, ≤72 chars):
Could you rename the PR to that? The merge commit message will then satisfy commitlint. |
There was a problem hiding this comment.
Pull request overview
Routes the Diagnostics → Tablets tab search on the database page through the backend so users can find tablets that belong to sub-objects (not only the currently loaded direct children).
Changes:
- Adds URL-param-backed, debounced numeric TabletId search that switches the tablets request to a database-wide backend filter (and omits schema path) on the database diagnostics page.
- Combines backend TabletId filtering with the existing
onlyActivefilter using the viewer filter syntax. - Updates the tablets table to optionally skip client-side filtering when backend search is active/pending.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/containers/Tablets/Tablets.tsx | Implements debounced backend search (numeric TabletId only) for the database diagnostics tablets tab and adjusts request params/filter construction accordingly. |
| src/containers/Tablets/TabletsTable.tsx | Adds useBackendSearch prop to disable local filtering when results are already filtered server-side. |
|
@copilot address the comments |
Addressed both review comments in 2573683:
|
The tablet search on the database Diagnostics → Tablets tab was filtering only the locally loaded tablets (direct children of the database path), so users could not find tablets that belong to sub-objects. Route the search through
/viewer/tabletinfowith aTabletIdfilter so any tablet of the database is reachable.Changes (
src/containers/Tablets/Tablets.tsx)path === databaseFullPath(database diagnostics tab). Schema-object pages and the Node page keep their current client-side search.(TabletId=<id>)and drop the schema path so the handler searches the whole database. Combined withonlyActivevia the existing(A;B)syntax already used on the tablet page.tabletsSearchparam before issuing the request (the call can be heavy)./^\d+$/), which also avoids filter-syntax injection.CI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 No changes in tests. 😕
Bundle Size: 🔺
Current: 63.46 MB | Main: 63.46 MB
Diff: +8.08 KB (0.01%)
ℹ️ CI Information