Skip to content
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f5fde81
set up next.js app and static build
DaltheCow May 9, 2025
fa5db74
convert to .eslintrc to match current state of project
DaltheCow May 9, 2025
8b16db5
update .eslintrc, tsconfig.json
DaltheCow May 9, 2025
15e867d
update eslint, tsconfig, husky, and dependencies
DaltheCow May 12, 2025
f7837ca
update file type
DaltheCow May 12, 2025
59ff861
merge
DaltheCow May 12, 2025
834cc1a
remove .eslintrc
DaltheCow May 12, 2025
3ae85e2
final updates
DaltheCow May 12, 2025
50a39ec
sort eslintrc
DaltheCow May 13, 2025
e1fd9ed
merge base
DaltheCow May 13, 2025
119f05a
sort extensions
DaltheCow May 13, 2025
56f89e2
merge base
DaltheCow May 13, 2025
d923f4a
sort
DaltheCow May 13, 2025
a515e12
resort
DaltheCow May 13, 2025
ded66cd
add extension
DaltheCow May 13, 2025
fe4d91a
merge base
DaltheCow May 13, 2025
544899a
add dev workflow
DaltheCow May 13, 2025
026a13f
remove testing pieces
DaltheCow May 13, 2025
fca89c5
navigate to ui directory for operations
DaltheCow May 13, 2025
b276f17
navigate to directory
DaltheCow May 13, 2025
32e95e9
add makefile
DaltheCow May 13, 2025
9faebcf
upgrade eslint-plugin-prettier, run make style
DaltheCow May 13, 2025
d69dc95
add unit/integration/e2e testing
DaltheCow May 13, 2025
f876edb
get testing set up fully functional
DaltheCow May 14, 2025
472141b
get things working
DaltheCow May 14, 2025
d98b411
remove e2e testing from dev workflow since it is confirmed to work
DaltheCow May 14, 2025
23ce95f
clean readme, add developing doc
DaltheCow May 15, 2025
35a0726
Merge branch 'main' into implement-base-ui-app
DaltheCow May 20, 2025
8413655
run linting
DaltheCow May 20, 2025
c23c674
replace speculators with GuideLLM
DaltheCow May 21, 2025
1d5bd73
remove speculators from docs
DaltheCow May 21, 2025
43fdeb0
update tox.ini to exclude github view files (blobs) that break the li…
DaltheCow May 21, 2025
1e29968
not to ignore more than markdown for rich display mode
DaltheCow May 21, 2025
d09f685
Merge branch 'update-docs' into implement-base-ui-app
DaltheCow May 21, 2025
328b872
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 21, 2025
1fc4d40
merge core-framework-setup
DaltheCow May 21, 2025
4b8b65a
run precommit
DaltheCow May 22, 2025
8d10bd5
precommit check
DaltheCow May 22, 2025
247d1cf
undo alteration of link checks, instead remove from workflows tempora…
DaltheCow May 22, 2025
4de602a
Merge branch 'update-docs' into implement-base-ui-app
DaltheCow May 22, 2025
bf52aa0
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 22, 2025
20fba13
merge core-framework-setup
DaltheCow May 22, 2025
57e5c0a
Merge branch 'main' into implement-base-ui-app
DaltheCow May 27, 2025
aece79d
Merge branch 'main' into implement-base-ui-app
markurtz May 29, 2025
fd473fb
Merge branch 'implement-base-ui-app' into core-framework-setup
DaltheCow May 29, 2025
af1a0eb
Merge branch 'core-framework-setup' into testing-tooling
DaltheCow May 29, 2025
cde932f
merge main
DaltheCow Jun 2, 2025
c7d115d
fix all the configs and get things working again
DaltheCow Jun 3, 2025
9441f7f
update workflow, DEVELOPING.md, add cypress to scripts
DaltheCow Jun 3, 2025
798c37d
remove .eslintignore
DaltheCow Jun 3, 2025
bdef8dc
correct script usage in workflow
DaltheCow Jun 3, 2025
a90b430
get everything working
DaltheCow Jun 5, 2025
aaa6aeb
change working directory for ui workflows
DaltheCow Jun 5, 2025
83d6f44
add test coverage setup
DaltheCow Jun 5, 2025
1f27e59
Merge branch 'main' into testing-tooling
DaltheCow Jun 5, 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
79 changes: 79 additions & 0 deletions .github/workflows/ui-development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: UI-Development

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
quality-check:
permissions:
contents: "read"
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ui
npm ci

- name: Run quality and typing checks
run: |
cd ui
make quality

precommit-check:
permissions:
contents: "read"
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ui
npm ci

- name: Run pre-commit checks
run: |
cd ui
npx husky run pre-commit

unit-tests:
permissions:
contents: "read"
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ui
npm ci

- name: Run unit tests
run: |
cd ui
make test-unit

integration-tests:
permissions:
contents: "read"
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install dependencies
run: |
cd ui
npm ci

- name: Run integration tests
run: |
cd ui
make test-integration
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,4 @@ cython_debug/
# Project specific files
*.json
*.yaml
!ui/**/*.json
3 changes: 3 additions & 0 deletions ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vscode
cypress.config.ts
64 changes: 64 additions & 0 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"ignorePatterns": [".vscode", "jest.config.js"],
"overrides": [
{
"files": ["*.mjs"],
"parser": "espree", // Use the default JavaScript parser for `.mjs` files
"parserOptions": {
"sourceType": "module"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"project": "./tsconfig.json",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import", "jest", "no-secrets", "react"],
"root": true,
"rules": {
"complexity": ["warn", { "max": 8 }],
"curly": ["error", "all"],
"import/order": [
"error",
{
"groups": [["builtin", "external", "internal"]],
"newlines-between": "always"
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.d.ts",
"**/*.interfaces.ts",
"**/*.setup.ts",
"**/*.config.js",
"**/*.config.mjs"
],
"optionalDependencies": false,
"peerDependencies": false
}
],
"no-secrets/no-secrets": ["error", { "additionalRegexes": {}, "ignoreContent": [] }]
}
}
41 changes: 41 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 6 additions & 0 deletions ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/node_modules
.vscode
/bin
/build
/public
/.meta
13 changes: 13 additions & 0 deletions ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
33 changes: 33 additions & 0 deletions ui/DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Getting Started

First, run the development server:

```bash
npm run dev
```

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

#### `npm run build`

Builds the app for production to the `out` folder.\

#### `make test-unit`

Run unit test once on your local terminal.

#### `make test-integration`

Run integration test once on your local terminal.

#### `npx cypress run --headless`

Run end to end tests against localhost:3000

#### `make style`

Fix code styling issues.

#### `make quality`

Run quality eslint quality checks.
28 changes: 28 additions & 0 deletions ui/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CHECKDIRS := src


# Run checks on all files for the repo
quality:
@echo "Running quality checks";
@# Run eslint checks
npx eslint --max-warnings 10 $(CHECKDIRS)
@# Run TypeScript checks
npx tsc -p tsconfig.json --noEmit # app code
npx tsc -p tsconfig.test.json --noEmit # unit + integration tests
npx tsc -p tsconfig.cypress.json --noEmit

# Style the code according to accepted standards for the repo
style:
@echo "Running styling";
@# Auto fix any eslint issues
npx eslint --fix $(CHECKDIRS)

test-unit:
@echo "Running unit tests";
@# Run react tests
npm run test:unit

test-integration:
@echo "Running integration tests";
@# Run react tests
npm run test:integration
1 change: 1 addition & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# GuideLLM UI
9 changes: 9 additions & 0 deletions ui/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
6 changes: 6 additions & 0 deletions ui/cypress/e2e/homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe('Check if text exists on the page', () => {
it('should find the text on the page', () => {
cy.visit('http://localhost:3000');
cy.contains('GuideLLM').should('exist');
});
});
37 changes: 37 additions & 0 deletions ui/cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
20 changes: 20 additions & 0 deletions ui/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
23 changes: 23 additions & 0 deletions ui/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const nextJest = require('next/jest');

const createJestConfig = nextJest({
dir: './',
});

const customJestConfig = {
collectCoverage: false,
collectCoverageFrom: ['src'],
coverageDirectory: './.meta',
coverageReporters: ['json-summary'],
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
};

module.exports = createJestConfig(customJestConfig);
1 change: 1 addition & 0 deletions ui/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
6 changes: 6 additions & 0 deletions ui/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
};

export default nextConfig;
Loading
Loading