zmuxuny opened a new pull request, #6378:
URL: https://github.com/apache/rocketmq-dashboard/pull/6378

   ### Which Issue(s) This PR Fixes
   
   Fixes #6359
   
   ### Brief Description
   
   Profile and custom metric queries run independently, so a slower older 
request can finish after a newer query. History merging currently prepends by 
completion order before applying the size cap: the old query appears newest and 
can evict a more recent investigation entry.
   
   Sort the merged, deduplicated history by its existing queriedAt timestamp 
before truncation, matching history-loading order. Preserve incoming-first 
behavior for equal timestamps and the existing identity replacement behavior.
   
   ### How Did You Test This Change?
   
   Base: rocketmq-studio at 779b8c0e7aed2396d3cc72743dcd544ea48e9ae6.
   
   - Three regressions fail on unchanged production: a real MetricsExplorer 
slow-profile/fast-custom completion, direct merge ordering, and bounded 
retention. Tie/deduplication control passes.
   - `./node_modules/.bin/vitest run --configLoader runner --no-cache 
src/components/__tests__/MetricsExplorer.test.tsx 
src/utils/metricsExplorerDiagnostics.test.ts`: 53 tests passed, including a 
final rerun after formatting.
   - Full lint: 0 errors / 10 baseline warnings. Changed-file Prettier and diff 
check passed. Formatting also normalizes the pre-existing nested ternary in the 
touched helper file.
   - TypeScript, Vite build and license check passed (133 components / 140 
files); only formatting changed afterward.
   - Mock APIs only; no live services/credentials. Full frontend suite/backend 
tests were not run locally; CI remains to be verified.
   
   ### Checklist
   
   - [x] One coherent change and Conventional Commit
   - [x] Regression tests added with Test suffix
   - [x] No new UI copy, source files, dependencies, or configuration
   - [ ] Backend architecture checks (not run locally; frontend-only change)
   - [x] No documentation change needed for restoring newest-query-first history
   


-- 
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]

Reply via email to