unbridled-41 opened a new issue, #4563:
URL: https://github.com/apache/rocketmq-dashboard/issues/4563
## Problem
The server query history drawer keeps its applied search keyword and page
number in component state, but its search input is uncontrolled and the drawer
content is destroyed on close (`destroyOnHidden`). Reopening the drawer
therefore shows an **empty search field** while the tables below remain
filtered by the keyword submitted before the drawer was closed — the operator
sees results for a query that is not visible anywhere on screen. The pagination
state survives the same way.
## Evidence
- `web/src/components/MessageQueryHistoryDrawer.tsx` (master `d50ffecc`):
`const [search, setSearch] = useState('')` (:43) is applied to every
`listMessageQueryHistory` / `listTraceQueryHistory` call (:68/:74), but the
`<Input.Search>` (:159) has no `value` binding, so its DOM is recreated empty
by `destroyOnHidden` (:146) after each close.
- Reproduction: open the drawer → type `order-1` → press Enter (table
filters) → close the drawer → reopen it. The input is empty; the table is still
filtered by `order-1`.
This is the same defect reported in #2474 (RockteMQ-AI confirmed, issue
closed by the stale bot before an implementation landed; its PR #2478 was also
closed unmerged). The current master still behaves as described there.
## Impact
- A stale, invisible filter produces "missing" history rows that are
actually excluded by the hidden keyword; users must guess that a filter is
active.
- The contradiction between the visible empty input and the filtered list
also misleads during incident reviews.
## Expected behavior
The visible search input must always reflect the filter actually applied to
the tables. After the drawer content is recreated (reopen), the input shows the
applied keyword; clearing the field and submitting applies an empty filter.
## Related work
- #2474 (closed stale) — same defect, confirmed but never implemented; #2478
(closed unmerged) proposed the controlled-draft direction.
- #4222 (merged) — UTC rendering fix for the same drawer's timestamps;
different defect.
## PR
Fix incoming.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]