Skip to content
Merged

PR #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
aaffc3c
Add comprehensive performance testing and optimization features
Copilot Aug 26, 2025
3ff5f06
Initial plan
Copilot Aug 26, 2025
cf1ce96
Initial exploration - planning GitHub badges implementation
Copilot Aug 26, 2025
5aee617
Merge pull request #10 from GizzZmo/copilot/fix-b7c82d9a-8509-4328-8f…
GizzZmo Aug 26, 2025
212e83a
Add comprehensive GitHub badges to README.md
Copilot Aug 26, 2025
a6529ae
Merge branch 'main' into copilot/fix-e76da3d6-1843-4f31-8146-1b221150…
GizzZmo Aug 26, 2025
ab15801
Update src/utils/performance.ts
GizzZmo Aug 26, 2025
c3f8c9d
Update src/pages/AIToolkit/components/AIManagerDashboard.tsx
GizzZmo Aug 26, 2025
0273d8c
Update src/utils/performance.ts
GizzZmo Aug 26, 2025
f12abfd
Update src/pages/AIToolkit/components/AIManagerDashboard.tsx
GizzZmo Aug 26, 2025
8455e8f
Merge pull request #12 from GizzZmo/copilot/fix-e76da3d6-1843-4f31-81…
GizzZmo Aug 27, 2025
975c2ce
Merge branch 'copilot/fix-b7c82d9a-8509-4328-8f3c-03f766e29c60' into …
GizzZmo Aug 27, 2025
300fbe6
Add newline at end of performance.ts
GizzZmo Aug 27, 2025
021e0fb
Initial plan
Copilot Aug 27, 2025
cfcafbf
Initial plan
Copilot Aug 27, 2025
c0a5c87
Merge pull request #11 from GizzZmo/copilot/fix-dc9c2f62-d059-47f3-b3…
GizzZmo Aug 27, 2025
d7bc417
Fix TypeScript build issues and prepare for Copilot instructions
Copilot Aug 27, 2025
26db620
Fix TypeScript and linting errors for clean baseline
Copilot Aug 27, 2025
0692f3f
Create comprehensive GitHub Copilot instructions with validated commands
Copilot Aug 27, 2025
d5aafef
Implement comprehensive security improvements
Copilot Aug 27, 2025
19c169b
Complete security implementation with Vite 7.x upgrade and documentation
Copilot Aug 27, 2025
9020a11
Add jsx option to tsconfig.json
GizzZmo Aug 27, 2025
08e2ec3
Change rootDir and include paths in tsconfig.json
GizzZmo Aug 27, 2025
5d58c52
Initial plan
Copilot Aug 27, 2025
6754587
Fix TypeScript compilation errors in PromptOptimizationSettings.tsx
Copilot Aug 27, 2025
0c95636
Fix TypeScript compilation errors in AIManagerDashboard, WorkflowBuil…
Copilot Aug 27, 2025
4bedff4
Merge pull request #18 from GizzZmo/copilot/fix-50d4463f-3d18-4bb9-ae…
GizzZmo Aug 27, 2025
a8518b0
Initial plan
Copilot Aug 27, 2025
0ed20e0
Merge pull request #20 from GizzZmo/main
GizzZmo Aug 27, 2025
cd8f73d
Merge pull request #21 from GizzZmo/copilot/fix-50d4463f-3d18-4bb9-ae…
GizzZmo Aug 27, 2025
93c7ec9
Fix documentation formatting and update README with accurate project …
Copilot Aug 27, 2025
13abefa
Merge branch 'copilot/fix-e822e2b1-ac9f-4228-a8f8-6596c16e8026' into …
GizzZmo Aug 27, 2025
7f7e6b8
Update src/pages/AIToolkit/components/AIManagerDashboard.tsx
GizzZmo Aug 27, 2025
b008cc0
Merge pull request #19 from GizzZmo/copilot/fix-6b47aeb5-6dd2-4676-ad…
GizzZmo Aug 27, 2025
c306c9a
Merge pull request #15 from GizzZmo/copilot/fix-14
GizzZmo Aug 27, 2025
9ea97f2
Initial plan
Copilot Aug 27, 2025
cadf185
Merge pull request #24 from GizzZmo/copilot/fix-30bc77bd-aa94-4ba2-8d…
GizzZmo Aug 27, 2025
62da53e
Initial plan
Copilot Aug 27, 2025
b63ce45
Update src/pages/PromptEditor/components/PromptOptimizationSettings.tsx
GizzZmo Aug 27, 2025
0623938
Update server/src/middleware/validation.ts
GizzZmo Aug 27, 2025
d7f1409
Fix CI pipeline - configure TypeScript properly for Vite and types
Copilot Aug 27, 2025
610c74f
Remove problematic TypeScript project references from server config
Copilot Aug 27, 2025
0c08cb0
Merge pull request #25 from GizzZmo/copilot/fix-0f2f469e-6f3f-4cc5-b4…
GizzZmo Aug 27, 2025
3ac2713
Update src/pages/PromptEditor/components/PerformanceBenchmark.tsx
GizzZmo Aug 27, 2025
eaefd75
Update src/utils/performance.ts
GizzZmo Aug 27, 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
205 changes: 205 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
# GitHub Copilot Instructions for Master Prompt Editor

**ALWAYS follow these instructions first and fallback to additional search and context gathering only when the information here is incomplete or found to be in error.**

## Project Overview

Master Prompt Editor is a React/TypeScript monorepo implementing an AI Orchestrator platform with a Master Prompt Editor and Advanced AI Toolkit. The repository contains three main components: a React frontend, an Express backend server, and a simple HTML client, plus shared TypeScript definitions.

## Critical Build Requirements

### NEVER CANCEL Build Operations
- **NEVER CANCEL any build command** - All builds must complete fully
- Frontend build: Takes ~2-3 seconds. Set timeout to 120+ seconds minimum
- Full build (all components): Takes ~6-7 seconds. Set timeout to 300+ seconds minimum
- Dependency installation: Takes ~20 seconds. Set timeout to 180+ seconds minimum
- Linting: Takes ~2 seconds. Set timeout to 60+ seconds minimum

### Build Dependencies and Order
**CRITICAL**: Shared types MUST be built before the server compilation:
```bash
tsc --build src/types
```
This step is REQUIRED before any server build operations.

## Working Effectively

### Bootstrap and Install Dependencies
```bash
npm run install:all
```
- Installs root, server, and client dependencies simultaneously
- Takes approximately 20 seconds
- NEVER CANCEL - wait for completion

### Build All Components
```bash
# Build shared types first (REQUIRED)
tsc --build src/types

# Build everything
npm run build:all
```
- Frontend build: TypeScript compilation + Vite production build (~2-3 seconds)
- Server build: TypeScript compilation (~2 seconds)
- Client build: Copy static files (~1 second)
- Total time: ~6-7 seconds
- **NEVER CANCEL** - Set timeout to 300+ seconds

### Development Servers
Start all development servers concurrently:
```bash
npm run dev
```
This starts:
- **Frontend**: http://localhost:3000 (React/Vite)
- **Backend**: http://localhost:3001 (Express/TypeScript)
- **Client**: http://localhost:8080 (Simple HTTP server)

Alternatively, start individually:
```bash
npm run dev:frontend # Port 3000
npm run dev:server # Port 3001
npm run dev:client # Port 8080
```

### Linting
```bash
npm run lint:all
```
- Runs ESLint across all TypeScript/React files
- Takes ~2 seconds
- May show warnings but should not fail builds
- NEVER CANCEL - Set timeout to 60+ seconds

## Validation Requirements

### MANDATORY: End-to-End Application Testing
After making changes, ALWAYS validate by:

1. **Start the application**:
```bash
npm run dev:frontend
```

2. **Navigate and test core functionality**:
- Visit http://localhost:3000/public/index.html
- Click "Master Prompt Editor" - should navigate to prompt editor page
- Click "Advanced AI Toolkit" - should navigate to AI toolkit page
- Click "Dashboard" - should return to main dashboard
- Verify navigation works and no console errors occur

3. **Test backend API**:
```bash
npm run dev:server
curl http://localhost:3001/health # Should return {"status":"ok"}
curl http://localhost:3001/api/prompts # Should return []
```

4. **Test keyboard shortcuts**:
- Press Ctrl+/ to verify shortcuts panel appears

### Pre-Commit Validation
ALWAYS run these commands before committing:
```bash
# Build shared types first
tsc --build src/types

# Full build to catch compilation errors
npm run build:all

# Lint to catch style issues
npm run lint:all

# Start frontend and test navigation manually
npm run dev:frontend
```

## Repository Structure

```
. # Root Directory (React/TypeScript frontend)
├── src/ # Main frontend source
│ ├── components/ # React components (layout/, ui/)
│ ├── pages/ # Application pages (Dashboard, PromptEditor, AIToolkit, Settings)
│ ├── context/ # React Context for state management
│ ├── hooks/ # Custom React hooks
│ ├── utils/ # Utility functions and API calls
│ ├── types/ # Shared TypeScript definitions (CRITICAL: Build first)
│ └── styles/ # Global styles
├── server/ # Backend Express server
│ ├── src/ # Server source code
│ │ ├── routes/ # API route definitions
│ │ ├── services/ # Business logic services
│ │ ├── data/ # Mock data stores
│ │ └── config/ # Configuration files
│ └── package.json # Backend dependencies
├── client/ # Simple HTML/JS client
│ └── src/ # Static HTML, CSS, JS files
├── public/ # Static assets (index.html)
└── package.json # Root monorepo configuration
```

## Environment Configuration

### Vite Environment Variables
The frontend uses Vite, so environment variables must use `import.meta.env` syntax:
```typescript
// Correct for Vite
const API_URL = import.meta.env.VITE_API_URL || '/api';

// WRONG - causes runtime errors
const API_URL = process.env.REACT_APP_API_URL || '/api';
```

### Node.js Version
- Requires Node.js 20.x (specified in CI pipeline)
- TypeScript 5.4.5+
- Uses ES modules (type: "module" in package.json)

## Common Issues and Solutions

### TypeScript Compilation Errors
- **Shared types not built**: Run `tsc --build src/types` first
- **Circular dependencies**: Check imports between types and components
- **Missing types**: Ensure all TypeScript files have proper type annotations

### Linting Warnings
Current known warnings (acceptable):
- React hooks exhaustive-deps warnings in some components
- Some @typescript-eslint/no-explicit-any warnings in utility files
- These do not prevent builds and can be addressed incrementally

### Runtime Errors
- **Process not defined**: Use `import.meta.env` instead of `process.env` in frontend code
- **White screen**: Check browser console for errors and ensure all imports resolve correctly

## CI/CD Pipeline

The GitHub Actions workflow (`.github/workflows/ci.yml`):
1. Sets up Node.js 20.x
2. Runs `npm run install:all`
3. Builds shared types: `tsc --build src/types`
4. Builds all projects: `npm run build:all`
5. Runs linting: `npm run lint:all` (continues on error)
6. Uploads build artifacts

## Key Technologies

- **Frontend**: React 18, TypeScript, Vite, React Router
- **Backend**: Express, TypeScript, ts-node-dev for development
- **Client**: Static HTML/CSS/JS served by Python HTTP server
- **Build**: TypeScript compiler, Vite, concurrent execution with concurrently
- **Linting**: ESLint with TypeScript and React plugins

## Important Notes

- **No test suite currently exists** - validation is manual through running the application
- **Environment variables**: Use `VITE_` prefix for frontend, standard names for backend
- **Port configuration**: Frontend (3000), Backend (3001), Client (8080)
- **CORS enabled**: Backend allows cross-origin requests for development
- **Security headers**: CSP and security headers configured in index.html

---

**Remember**: ALWAYS build shared types first, NEVER cancel long-running operations, and manually validate application functionality after changes.
17 changes: 3 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Here’s a standard CODE OF CONDUCT you can use for your repository. This follows the Contributor Covenant, a widely-adopted code in open source projects. You can copy this into a file named CODE_OF_CONDUCT.md in the root of your GizzZmo/Master-Prompt-Editor repository.

---

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -25,7 +21,7 @@ Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others private information, such as a physical or email address, without their explicit permission
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities
Expand All @@ -38,19 +34,12 @@ This Code of Conduct applies within all community spaces, and also applies when

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at Jon_Arve@iCloud.com. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

[homepage]: https://www.contributor-covenant.org

---

**Note:**
Replace [INSERT CONTACT EMAIL] with an email address where users can report issues.

Would you like me to create a pull request to add this CODE_OF_CONDUCT.md file to your repository?
[homepage]: https://www.contributor-covenant.org
Loading
Loading