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 43 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
52 changes: 50 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,53 @@ 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
end-to-end-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: Start containers
run: just docker-up-detached
- name: test
run: just e2e-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!";
7 changes: 7 additions & 0 deletions babel.config.js
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-typescript'
]
};
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*
130 changes: 0 additions & 130 deletions frontend/.gitignore

This file was deleted.

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

This file was deleted.

31 changes: 31 additions & 0 deletions frontend/POSD.md
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Applying "A Philosophy of Software Design" Principles

This document outlines how the SCANUEV project applies the principles from "A Philosophy of Software Design" by John Ousterhout.
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved

## Complexity Management

The `ChatInterfaceClient` component manages complexity by breaking down functionality into smaller, manageable pieces and using hooks for state management.

## Deep Modules

The `ChatService` class provides a simple interface while hiding complex implementation details, demonstrating the principle of deep modules.

## Information Hiding

The `AgentConfigService` module encapsulates agent-specific configurations, hiding implementation details and providing a clean interface.

## Error Handling

The project centralizes error handling, providing meaningful error messages and using constants for error messages.

## Separation of Concerns

The project structure demonstrates good separation of concerns, with clear distinctions between components, hooks, services, and utilities.

## Reusable Components

UI components are designed to be reusable and modular, promoting code reuse and consistency across the application.

## Comments and Documentation

The codebase uses JSDoc comments and markdown documentation to provide clear explanations of functionality, parameters, and return values.
73 changes: 73 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# SCANUEV Frontend
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved

This is the frontend for the SCANUEV project, an advanced conversational AI platform.

## Getting Started

### Prerequisites

- Node.js (version 14 or later)
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved
- npm or yarn

### Installation

1. Clone the repository:
```bash
git clone https://github.com/yourusername/SCANUEV.git
cd SCANUEV/frontend
```

2. Install dependencies:
```bash
npm install
# or
yarn install
```

### Running the Development Server

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

### Building for Production

```bash
npm run build
# or
yarn build
```

### Linting and Formatting

```bash
npm run lint
npm run format
```

### Testing

```bash
npm run test
```

## Project Structure

- `components/`: React components
- `hooks/`: Custom React hooks
- `services/`: Service classes and utilities
- `utils/`: Utility functions
- `constants/`: Application constants
- `types/`: TypeScript type definitions
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

Contributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved

## License

This project is licensed under the MIT License.
iLevyTate marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading