NW | 26-SDC-Mar | TzeMing Ho | Sprint 2 | Chat App frontend and backend#78
Open
TzeMingHo wants to merge 9 commits into
Open
NW | 26-SDC-Mar | TzeMing Ho | Sprint 2 | Chat App frontend and backend#78TzeMingHo wants to merge 9 commits into
TzeMingHo wants to merge 9 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
cjyuan
reviewed
May 24, 2026
There was a problem hiding this comment.
The code could use some comments.
A useful rule of thumb is to ask yourself whether you could still explain how the code works six months from now. If the answer is uncertain, consider adding a comment to help future readers understand the intent and reasoning behind it.
Can you also include this item in the PR description?
- A description of the additional features you have implemented.
…ring from state, replaced input handler by formSubmithandler, pending to fix deploy version
cjyuan
reviewed
May 26, 2026
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good. I just have two more comments.
| const lastMessageTime = state.messages.at(-1)?.timestamp ?? null; | ||
| const queryString = lastMessageTime ? `?since=${lastMessageTime}` : ""; | ||
| const url = `${state.backendURL}/messages${queryString}`; | ||
| const milliseconds = 100; |
There was a problem hiding this comment.
Can you think of a better name. milliseconds is too generic.
| const url = `${state.backendURL}/messages${queryString}`; | ||
| const milliseconds = 100; | ||
| try { | ||
| // fetch may remain pending up to 25 seconds |
There was a problem hiding this comment.
Could also explain "why". That's probably the first question that comes to mind when someone sees that comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
frontend link:
https://tzemingho-chatapp-server-frontend.hosting.codeyourfuture.io
backend link:
https://tzemingho-chatapp-server-backend.hosting.codeyourfuture.io
A description of the additional features I have implemented.
Frontend:
Backend: