Closed larrywang0701 closed 3 weeks ago
another bug (since you're fixing bugs here): when you exit out to another page, the content for both the chat and the code window resets as well.
Two ways (but i think they're both the same bug):
First way
Match User A with User B, resulting in collab page User A clicks on "Practise an Interview" Text for User A is blank now (code editor + message screen) Second way
Match User A with User B, resulting in collab page User A clicks on "PeerPrep" logo on top left User A goes back to collab page by clicking on "Practise an Interview" Text for User A is blank now (code editor + message screen)
For the bug, I tried to fix by frontend side by adding a retry mechanism on loading (initial) code to editor, but I found that sometimes the frontend can correctly load code from the backend (after I navigate away and back or clicking Practise an Interview), but sometimes the bug still happens and from debug console I found that the code responsed from the backend is empty strings. Maybe this is a backend-side bug, so please let the people who are responsible for the collaboration backend to consider this bug from the backend, since I really don't know why frontend sometimes received empty code strings from load-document sent by the backend but sometimes not. Thanks!
(Since after I found that the frontend received load-document messages from backend with empty code strings for sometimes (and sometimes it works), now I think that the bug may actually in collaboration backend, not frontend. So maybe can let the people who are responsible for the collaboration backend to also check the bug later in backend.)
For zihan's bug, its because of the implementation and isnt really a bug. The save interval was set to 2 seconds which causes the empty code returned since its not saved yet. I'll js lower the interval to 1 second i think its the same for brendan too
it was a different issue entirely but this is still another bug to consider
doesnt take place for me tho
Steps to reproduce:
code:
Behaviors:
Sometimes the bug happens...
(also
matchedUser
is null, maybe another bug from the backend)Sometimes it works without the bug...
To clarify why I think the bug of empty code editor may comes from the collaboration backend:
When navigating back/reopening collaboration page, for the debug output on line 106, sometimes there will be a
code:
output at browser's console. Executing the debug output line at 106 means thatload-document
signal from the backend is received by the frontend through WebSocket, but with empty code string in the payload. So I think since the signal itself contains empty code string, and frontend sent theget-document
signal and received theload-document
signal successfully, I guess the bug may actually comes from the backend.