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

   # fix(web): gzip serving, delete confirmations, audit search debounce, 
StrictMode remount fix
   
   ## Summary
   
   Four P0 frontend fixes identified during a post-merge audit of 
`rocketmq-studio`.
   
   **1. Enable gzip compression in nginx (`web/nginx.conf`)**
   The Docker deployment serves static assets through nginx without any 
compression configuration, so the ~1 MB entry bundle was delivered 
uncompressed. Adds `gzip on` with a sensible `gzip_types` list to the server 
block.
   
   **2. Fix GroupManagement remount bug under React StrictMode 
(`web/src/pages/studio/GroupManagement.tsx`)**
   The effect cleanup set `mountedRef.current = false`, but nothing ever reset 
it to `true` on remount. Because `main.tsx` renders under `<React.StrictMode>`, 
the dev-mode double mount made every `loadGroups` callback bail out early, 
leaving the consumer-group list loading forever. The mount effect now resets 
the flag — the same pattern already used in `pages/cluster/index.tsx`. 
Production behavior is unchanged; this fixes incorrect logic.
   
   **3. Require confirmation before destructive deletes 
(`web/src/pages/ops/alerts.tsx`, `web/src/pages/settings/index.tsx`)**
   Deleting an alert rule and deleting a data source executed immediately on 
click, while every other destructive action in the app asks for confirmation. 
Both buttons are now wrapped in `Popconfirm`, matching the existing convention 
(`Proxy.tsx`, `AlertManagement.tsx`).
   
   **4. Debounce the audit-log search (`web/src/pages/ops/audit.tsx`)**
   The audit search box re-ran the paginated server query on every keystroke — 
typing an 8-character word meant 8 requests. The search text is now debounced 
by 300 ms, the same pattern already used in `pages/instance/index.tsx`, so the 
query fires only when the user pauses typing. The export handler intentionally 
keeps using the immediate input value.
   
   ## Test plan
   
   - [x] Targeted suites: `AuditPage`, `AlertsPage`, `DataSourceTab`, 
`GroupManagement` — 27 tests pass
   - [x] Full frontend suite: 87 files / 449 tests pass
   - [x] `npm run build` (tsc + vite) passes
   - [x] ESLint on all modified files: 0 errors
   - [ ] Manual: verify `Content-Encoding: gzip` responses from the Docker image
   - [ ] Manual: verify the confirmation popovers on the Alerts and Settings 
pages
   


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