yyqdbngt opened a new pull request, #3897: URL: https://github.com/apache/rocketmq-dashboard/pull/3897
### Motivation The `useInstanceFilter` hook tests covered unknown-route rewriting and malformed encoded ids, but left known-route preservation, empty inventories, list failures, and section-only routes untested. This PR grows the suite from 2 to 6 cases. ### Changes - A known instance id in the route is kept without rewriting. - An unknown route stays untouched when no instance is available. - When the instance list fails to load, the hook stays on the routed instance without crashing. - A section-only route (`/instance/topic`) is redirected to the first instance of that section. ### Verification - `vitest run src/hooks/useInstanceFilter.test.tsx`: 6/6 passed - `tsc --noEmit`: clean - `eslint src/hooks/useInstanceFilter.test.tsx`: clean -- 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]
