Loyal-Young opened a new pull request, #6052: URL: https://github.com/apache/rocketmq-dashboard/pull/6052
### Which Issue(s) This PR Fixes - Fixes #6049 ### Brief Description Handle browsers that throw a SecurityError when the localStorage property is accessed. Previously the storage availability check itself threw before the guarded getItem call, preventing the prompt template modal from rendering. The existing unavailable-storage state now remains reachable, built-in templates can still be applied, and custom save/delete operations fail gracefully. Storage is checked afresh on each operation so a later recovery works normally. ### How Did You Test This Change? - The new regressions failed against the unmodified source with SecurityError. - PromptTemplateModal and promptTemplates tests: 15 passed after the fix, including exact built-in body/mode application and save/load/delete after access recovers. - ESLint on the two changed files, full app TypeScript check (`--noEmit --composite false --incremental false`) and `git diff --check`: passed. - No live RocketMQ cluster is needed for this browser storage regression. ### Checklist - [x] One coherent change; Conventional Commit title. - [x] Regression tests added; new names end in Test; ASF header on new file. - [x] No new UI strings or API contracts. - [ ] Backend architecture tests not rerun locally (frontend-only change). ### CI baseline Tested on 29fe48abc. Its [frontend job](https://github.com/apache/rocketmq-dashboard/actions/runs/38023023425/job/114127943196) already fails the artifact license gate after build/tests, and its [backend build](https://github.com/apache/rocketmq-dashboard/actions/runs/38023023425/job/114127943241) fails the binary license gate. These are upstream baseline results, not a claim that PR CI is green. ### AI assistance AI assistance was used to inspect storage access, implement the guard and write the modal and recovery tests. The diff and test results were reviewed in this contribution session. -- 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]
