fix: stale display outputs leaking between pages in web UI
Bug: when the StreamDeck was on a non-main page (e.g. dashboard) and the web UI was opened in a private browser tab, the frontend defaulted to the first page in config while display outputs from the other page were still applied to keys sharing the same index. Fix 1 (backend): send the current active page via SSE immediately on new client connection so the frontend knows the correct page from the start. Fix 2 (frontend): only apply display output text/background to keys that have a display config, preventing cross-page leakage.
This commit is contained in:
@@ -172,6 +172,14 @@ func (s *WebServer) handleSSE(w http.ResponseWriter, r *http.Request) {
|
||||
s.sseClients[ch] = struct{}{}
|
||||
s.sseMu.Unlock()
|
||||
|
||||
s.mu.RLock()
|
||||
if s.pm != nil {
|
||||
if active := s.pm.ActivePageName(); active != "" {
|
||||
ch <- active
|
||||
}
|
||||
}
|
||||
s.mu.RUnlock()
|
||||
|
||||
notify := r.Context().Done()
|
||||
go func() {
|
||||
<-notify
|
||||
|
||||
Reference in New Issue
Block a user