debug(05-03): add detailed logging for alert callback flow

This commit is contained in:
Nuwan 2026-01-16 13:11:08 +05:30
parent a88beb3f4e
commit 3c2930092b
2 changed files with 10 additions and 1 deletions

View File

@ -277,10 +277,17 @@ const JKSessionScreen = () => {
// BACKEND_MIXER_CHANGE = 2
if (type === 2) {
console.log('[HandleAlertCallback] BACKEND_MIXER_CHANGE detected:', text);
console.log('[HandleAlertCallback] sessionModel:', sessionModel);
console.log('[HandleAlertCallback] sessionModel.onBackendMixerChanged:', sessionModel?.onBackendMixerChanged);
if (sessionModel && sessionModel.onBackendMixerChanged) {
console.log('[HandleAlertCallback] Calling sessionModel.onBackendMixerChanged...');
sessionModel.onBackendMixerChanged(type, text);
console.log('[HandleAlertCallback] Called sessionModel.onBackendMixerChanged');
} else {
console.warn('[HandleAlertCallback] sessionModel.onBackendMixerChanged not available');
console.warn('[HandleAlertCallback] sessionModel.onBackendMixerChanged not available', {
hasSessionModel: !!sessionModel,
hasMethod: !!(sessionModel?.onBackendMixerChanged)
});
}
}
// Handle other alert types as needed

View File

@ -842,6 +842,8 @@ export default function useSessionModel(app, server, sessionScreen) {
const onBackendMixerChanged = useCallback(async (type, text) => {
logger.debug("BACKEND_MIXER_CHANGE alert. reason:" + text);
logger.debug("BACKEND_MIXER_CHANGE inSession():", inSession());
logger.debug("BACKEND_MIXER_CHANGE sessionIdRef.current:", sessionIdRef.current);
if (inSession() && text === "RebuildAudioIoControl") {
if (backendMixerAlertThrottleTimerRef.current) {