coder999o opened a new issue, #7217:
URL: https://github.com/apache/rocketmq-dashboard/issues/7217

   ### Before Creating the Bug Report
   - [x] Searched open/closed issues and all-state PRs for the appearance 
preference behavior.
   - [x] This is a RocketMQ Studio settings defect.
   - [x] The source reproduction uses the rocketmq-studio commit below.
   
   ### Studio Version
   `rocketmq-studio`, commit `127c47b06a268cc74224d5f34c56ec7c36ac0d55`.
   
   ### Runtime Environment
   Source-based reproduction; no live-browser or deployed-server verification 
is claimed. ThemeProvider applies browser-local preferences. The shared 
settings snapshot can differ from those local preferences.
   
   ### Connected RocketMQ Cluster
   Not needed; this concerns the settings page and local appearance context.
   
   ### Describe the Bug
   `GeneralSettingsTab` displays `settings.theme` and `settings.compact` from 
the server snapshot, but the application's effective appearance comes from 
`ThemeProvider` (`themeMode` and `compact`) and is persisted in localStorage. 
The controls can show a different selection from the appearance that is 
actually applied.
   
   ### Steps to Reproduce
   1. Open Settings with the general-settings API returning `theme: system` and 
`compact: false`.
   2. Click the global theme toggle in the header. MainLayout calls 
`toggleTheme` from the local theme context.
   3. The appearance changes, but the theme selector in Settings still shows 
System. Clicking its already-selected System option does not trigger a change, 
so that selection cannot directly restore system mode.
   
   A second source reproduction is to open Settings with 
`rocketmq-studio-theme=dark` and `rocketmq-studio-compact=true` already stored 
locally while the API returns the defaults above. The actual appearance is dark 
and compact, yet the controls display System and compact mode off.
   
   ### What Did You Expect to See?
   The appearance controls should display the active local preferences, follow 
global theme changes, and allow an operator to select System again.
   
   ### What Did You See Instead?
   The controls display the shared server snapshot until changed through this 
tab. Reader preferences are intentionally local, so revisiting the tab can also 
reproduce the discrepancy.
   
   ### Additional Context
   The fix can bind the controls to the existing theme context while retaining 
the shared settings snapshot for save payloads and the existing authorization 
checks. No new preference store or API is needed.
   
   ### Are You Willing to Submit a Pull Request?
   - [x] Yes.
   


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