added frontend logic for file diff