Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
24 changes: 24 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This repository configuration and frontend scaffolding don't implement the chat functionality required by the task (see checklist items #1#6). You need to provide the client and server implementation files (e.g., React components, client-side logic to send/save username to localStorage, WebSocket or HTTP server in Node.js to handle rooms and messages, and persistence to show previous messages).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The ESLint config imports @eslint/js as js and uses js.configs.recommended.rules. Ensure @eslint/js is installed in package.json dependencies; otherwise ESLint will fail to load. This file itself is fine but make sure project dependencies include these plugins.

logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index.html references /src/main.jsx. Ensure that file exists and contains the client application entry point which will implement username input, room management UI, message display with author/time/text, and client-server communication per the task requirements.

dist-ssr
*.local
Comment on lines +1 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index.html is valid and points to /src/main.jsx. Ensure your React entry implements the chat UI and client WebSocket logic required by the task (username, localStorage, rooms management). This file is not implementing those features itself.


# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Comment on lines +1 to +24

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This .gitignore is fine for the client; no functional requirements are implemented here. (No action required.)

38 changes: 38 additions & 0 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ESLint configuration is a valid config file for the client project; it does not implement any of the required chat functionality. Ensure your submission includes the actual application files (e.g., server index.js, client React components such as App.jsx, components for rooms/messages, and socket or HTTP logic) so I can validate checklist items #1#6.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index.css is a valid stylesheet and unrelated to the chat-specific requirements. It’s fine as-is but does not demonstrate any of the required behavior (username/save to localStorage, messages with author/time/text, room management, or server communication). Include the functional source files for a proper review.

import globals from 'globals'
Comment on lines +1 to +2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This .gitignore is a correct project ignore file and does not implement any chat logic. However, the task requires implementing both client and server chat functionality — there is no server or client chat code in this file set.

import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index.html correctly mounts the client app at

and loads /src/main.jsx. The task requires chat UI and logic—please include the React source files (main.jsx, App.jsx, components) and server files so I can check that username storage, message structure, rooms, and message history are implemented.

ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Comment on lines +1 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

index.html is a standard Vite + React entry and is fine, but it doesn't contain the chat UI or logic required by the task. Provide React entry and components for review.

Loading
Loading