Skip to content

Birmingham | 26-Jul-SDC | Merve Reis | Sprint 2 | Chat-App CYF-1162 - #121

Open
mervereis wants to merge 7 commits into
CodeYourFuture:mainfrom
mervereis:main
Open

mervereis wants to merge 7 commits into
CodeYourFuture:mainfrom
mervereis:main

Conversation

@mervereis

@mervereis mervereis commented Sep 16, 2026 •

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

Task ID : CYF-1162

Features:

Send chat messages
View existing message history
Reply message
Like and dislike messages

- Added backend with Express server and message handling routes
- Implemented message sending, fetching, and reacting functionalities
- Created frontend HTML structure for chat interface
- Developed JavaScript for message rendering and user interactions
- Styled chat application with CSS for better user experience
@github-actions

This comment has been minimized.

@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@mervereis mervereis changed the title Birmingham | 26-Jul-SDC | Merve Reis | Sprint 2 | Chat App | CYF 1162 Birmingham | 26-Jul-SDC | Merve Reis | Sprint 2 | Chat-App CYF 1162 Sep 16, 2026
@github-actions

This comment has been minimized.

@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

@mervereis mervereis changed the title Birmingham | 26-Jul-SDC | Merve Reis | Sprint 2 | Chat-App CYF 1162 Birmingham | 26-Jul-SDC | Merve Reis | Sprint 2 | Chat-App CYF-1162 Sep 16, 2026
@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@github-actions

This comment has been minimized.

- Added package.json for backend with necessary dependencies (express, cors, crypto).
- Implemented server.js for handling message retrieval, sending, and reactions with long-polling support.
- Created index.html for the frontend chat interface with a message input area and display for chat messages.
- Developed script.js to manage message fetching, sending, and user interactions (like, dislike, reply).
- Styled the chat application with style.css for a user-friendly interface.
@mervereis mervereis added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 16, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Oct 7, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, but I encountered some issues during testing. I also have some questions about your code.

Part of the task is to deploy the app. Is the chat app deployed anwhere we can test it? It's usually a good idea to include this in the PR text.

<script src="script.js" defer></script>
</head>

<body>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try running the lighthouse tool? Does it offer any suggestions for accessibility fixes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When trying to self-deploy the frontend, I get a couple of errors. A CORS policy error, and a error with long polling. Do you also see these? Is there something I need to configure?

const messagesById = new Map(messages.map((msg) => [String(msg.id), msg]));
const waitingClients = [];

// Date.now() aynı milisaniyede çakışabilir, timestamp'leri tekilleştiriyoruz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general suggestion, if you are developing code that will be read by other english speakers it's a good idea to make your comments english as well.

return lastTimestamp;
}

function releaseWaitingClients() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what releaseWaitingClients is for?

return;
}

if (!longPoll) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you using the longPoll query parameter here? What's the difference of if it is true or false?

);

if (likeButton) {
likeButton.textContent = `👍 ${message.likes || 0}`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generating the like text is re-used multiple times in the app, is that a maintainable approach?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants