lizhimins commented on PR #5488:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/5488#issuecomment-6073449432

   Thanks for picking this up again after #4011. We checked the current trunk 
and would like to close
   this one, for two reasons.
   1. `USE_MOCK` in web/src/config.ts has no production consumer left: a 
repo-wide grep only finds the
    definition, two `vi.mock('./config', ...)` factories that hardcode their 
own value, and
    `dataModeStore.DEFAULT_USE_MOCK`, which is a different constant read from 
`VITE_USE_MOCK`. The
    live switch is `isMockMode()` from web/src/services/dataMode (used in 
App.tsx and
    pages/cluster/index.tsx). So flipping `USE_MOCK` to true would not change 
any runtime behaviour,
    and the new assertion does not guard a reachable path.
   2. The JSDoc right above the export says it "is kept temporarily for 
backward compatibility and
    will be removed". A permanent regression test importing it works against 
that planned removal.
   The equivalent guard on the live path already exists in 
web/src/stores/dataModeStore.test.ts
   (the two `it.each` blocks over `VITE_USE_MOCK` and the persisted mode), so 
nothing is lost by
   closing this. If you'd like to contribute here, the more interesting 
question is whether
   web/.env should keep `VITE_USE_MOCK=true` for local dev - please open an 
issue for that and we can
   decide it separately.


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