Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixfrontendtests #57

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bc86d26
Add unit tests for chat API, components, and hooks
iLevyTate Jan 2, 2025
ee1b09e
Refactor frontend structure and enhance chat functionality
iLevyTate Jan 2, 2025
f02bacb
Add UI components for enhanced user interface
iLevyTate Jan 2, 2025
7b0e637
Remove unused chart components and add new chat interface features
iLevyTate Jan 2, 2025
f677802
Add Cypress tests for chat and navigation functionality
iLevyTate Jan 2, 2025
cbdc53b
Add new hooks for chat functionality and media queries
iLevyTate Jan 2, 2025
e36a466
Add utility functions and type definitions for chat and media queries
iLevyTate Jan 2, 2025
0248f6d
Refactor frontend structure and enhance chat functionality
iLevyTate Jan 2, 2025
1341d17
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 2, 2025
e037310
Update Dockerfile
sanders41 Jan 3, 2025
e302c2c
Run prettier
sanders41 Jan 3, 2025
982ecde
Fix lint errors
sanders41 Jan 3, 2025
5401674
Enable build check in CI
sanders41 Jan 3, 2025
2672d78
Move build to it's own step
sanders41 Jan 3, 2025
b0e173a
Remove unused `formatTime` utility function to streamline codebase
iLevyTate Jan 5, 2025
67194b5
Refactor BotAvatar and ChatMessage components; add LoadingProvider an…
iLevyTate Jan 5, 2025
4bd9629
Add initial configuration files and enhance loading states
iLevyTate Jan 5, 2025
6273f9d
Merge branch 'FrontEndRebuild' of https://github.com/xyvora/SCANUE-V …
iLevyTate Jan 5, 2025
74003a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 5, 2025
24d0e0f
Add new components and refactor existing ones for improved UI and loa…
iLevyTate Jan 5, 2025
0be87d1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 5, 2025
87caf2a
Update pre-commit configuration for improved hook formatting and cons…
iLevyTate Jan 5, 2025
527ce63
Merge branch 'FrontEndRebuild' of https://github.com/xyvora/SCANUE-V …
iLevyTate Jan 5, 2025
361af62
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 5, 2025
8396eac
Refactor import paths in UI components to use absolute paths
iLevyTate Jan 5, 2025
5c0f0d2
Merge branch 'FrontEndRebuild' of https://github.com/xyvora/SCANUE-V …
iLevyTate Jan 5, 2025
59888e7
Fix dockerfile
sanders41 Jan 5, 2025
4f98b7a
Add .env back to .dockerignore
sanders41 Jan 5, 2025
78d53e0
Remove extra package-lock.json
sanders41 Jan 6, 2025
b3d0b26
Add frontend/lib directory with utils and other utility files
iLevyTate Jan 6, 2025
6ff7999
Merge remote-tracking branch 'origin/FrontEndRebuild'
iLevyTate Jan 6, 2025
27a693b
Update next-env.d.ts and package-lock.json
iLevyTate Jan 6, 2025
bdb3aee
Update .gitignore to explicitly allow frontend/lib directory
iLevyTate Jan 6, 2025
f7a3899
Update .gitignore to explicitly allow frontend/lib directory
iLevyTate Jan 6, 2025
90ac03b
Fix package name
sanders41 Jan 7, 2025
72e7ef0
Add frontend and end to end tests to CI
sanders41 Jan 7, 2025
6d15c0e
Add initial project setup with Babel configuration, package.json, and…
iLevyTate Jan 10, 2025
d355879
Add utility functions for date formatting and UI configuration
iLevyTate Jan 10, 2025
b75f2ee
Remove obsolete test files and Cypress support files
iLevyTate Jan 10, 2025
b1cc1aa
Refactor AgentResponse and ChatInterfaceClient components for improve…
iLevyTate Jan 10, 2025
9195997
Refactor chat-related components and services for enhanced functionality
iLevyTate Jan 10, 2025
be720df
Remove obsolete Cypress configuration file to streamline testing setup
iLevyTate Jan 10, 2025
169843b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 10, 2025
270c318
Refactor testing workflow and enhance frontend configuration
iLevyTate Jan 13, 2025
70f79fa
Add Babel configuration and update package dependencies; remove obsol…
iLevyTate Jan 13, 2025
9e8b718
Remove package.json and package-lock.json files; update frontend depe…
iLevyTate Jan 13, 2025
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
34 changes: 32 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,35 @@ jobs:
run: just frontend-install
- name: Lint
run: just frontend-lint
# - name: Build
# run: just frontend-build
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Just
uses: taiki-e/install-action@just
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: ./frontend/package-lock.json
- name: Install Dependencies
run: just frontend-install
- name: Build
run: just frontend-build
frontend-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Just
uses: taiki-e/install-action@just
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: ./frontend/package-lock.json
- name: Install Dependencies
run: just frontend-install
- name: test
run: just frontend-test
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -19,7 +18,9 @@ dist/
downloads/
eggs/
.eggs/
lib/
/lib/
backend/lib/
!frontend/lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -270,3 +271,4 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
node_modules
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
hooks:
- id: mypy
- id: mypy
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
1 change: 1 addition & 0 deletions app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const message = "It's a great day!";
1 change: 1 addition & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ htmlcov
Dockerfile
.dockerignore
.git
.env
8 changes: 8 additions & 0 deletions components/ChatInterfaceClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// existing code...
// import ChatMessage from './ChatMessage';
// import AgentResponse from './AgentResponse';
// const activeFeedback = ...;
// const isMobile = ...;
// const handleFeedback = ...;
// const handleFeedbackComment = ...;
// existing code...
Empty file added components/ui/input.tsx
Empty file.
Empty file added components/ui/skeleton.tsx
Empty file.
5 changes: 4 additions & 1 deletion frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
Dockerfile
.dockerignore
node_modules
.env
.next
.git
.gitignore
README.md
.env
logs
*.log
npm-debug.log*
23 changes: 23 additions & 0 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": [
"next/core-web-vitals",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
}
130 changes: 0 additions & 130 deletions frontend/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions frontend/.prettierignore

This file was deleted.

27 changes: 24 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ FROM node:22-alpine AS base

WORKDIR /app

# Install system dependencies required for canvas
RUN apk add --no-cache \
pixman-dev \
cairo-dev \
pango-dev \
jpeg-dev \
giflib-dev \
librsvg-dev \
python3 \
make \
g++ \
pkgconfig

COPY package.json package-lock.json ./

RUN npm ci --production
Expand All @@ -14,14 +27,22 @@ FROM node:22-alpine as prod

WORKDIR /app

# Install runtime dependencies for canvas
RUN apk add --no-cache \
pixman \
cairo \
pango \
jpeg \
giflib \
librsvg

# Disable Next.js telemetry
ENV NEXT_TELEMETRY_DISABLED 1

COPY --from=base /app .

RUN useradd --create-home appuser

USER nextjs
RUN adduser -D appuser
USER appuser

EXPOSE 3000

Expand Down
6 changes: 3 additions & 3 deletions frontend/app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ export default function About() {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-24">
<h1 className="mb-8 bg-gradient-to-r from-blue-500 to-purple-600 bg-clip-text text-4xl font-bold text-transparent">
About AI Chat Interface
About SCANUEV
</h1>
<p className="mb-8 max-w-2xl text-center text-xl">
AI Chat Interface is an advanced conversational AI platform that allows users to interact
with different types of AI agents. Our platform leverages cutting-edge natural language
SCANUEV is an advanced conversational AI platform that allows users to interact with
different types of AI agents. Our platform leverages cutting-edge natural language
processing technologies to provide intelligent and context-aware responses.
</p>
<h2 className="mb-4 mt-8 text-2xl font-semibold">Key Features:</h2>
Expand Down
Loading