Update stateManager.js
Browse files216 unmodified lines217218219220221222223224225226227228229230231216 unmodified linesconst mergedInfo = { ...currentDb.info, ...payload.info };delete mergedInfo.commandQueue;// Update JSON info AND Root timestampconst { error } = await supabase.from('projects').update({info: mergedInfo,updated_at: now}).eq('id', projectId);if (error) console.error("[DB ERROR] Update Project failed:", error.message);}},216 unmodified lines217218219220221222223224225226227228229230231232233234235216 unmodified linesconst mergedInfo = { ...currentDb.info, ...payload.info };delete mergedInfo.commandQueue;// 1. Update info JSON (including status and last_edited)const { error: infoError } = await supabase.from('projects').update({ info: mergedInfo }).eq('id', projectId);if (infoError) console.error("[DB ERROR] Update Project Info failed:", infoError.message);// 2. Try updating root column for sortingtry {await supabase.from('projects').update({ updated_at: now }).eq('id', projectId);} catch (e) {// Ignore if column doesn't exist}}},
stateManager.js+11-7