Loyal-Young opened a new pull request, #5177:
URL: https://github.com/apache/rocketmq-dashboard/pull/5177

   ## What changed
   
   - Read the saved Metrics Explorer profile through the existing safe 
local-storage helper. If browser storage is unavailable, the explorer falls 
back to the first profile returned by the API instead of reporting a 
profile-load failure.
   - Use the same safe write helper when switching a profile or restoring one 
from query history, so those actions still work for the current session when 
preference persistence is blocked.
   - Cover rejected reads and writes in component tests.
   
   Fixes #5176.
   
   ## Verification
   
   - Reproduced the new profile-load test failing against the previous 
implementation.
   - `npx vitest run src/components/__tests__/MetricsExplorer.test.tsx` — 30 
passed.
   - `npx tsc -b` — passed.
   - `npx eslint src/components/MetricsExplorer.tsx 
src/components/__tests__/MetricsExplorer.test.tsx` — passed.
   - `git diff --check` — passed.
   
   The two touched files already fail the repository's Prettier check on 
unmodified `master`; this PR keeps the diff limited to the storage fix and its 
tests.
   
   ## AI assistance
   
   An AI assistant helped trace the storage exception path, draft the small 
patch, and add focused regression coverage. The failure was reproduced before 
the fix, and the checks above were run on the final change.
   


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