seo-generator-server/public/pipeline-builder.html
StillHammer 64fb319e65 refactor: Synchronisation complète du codebase - Application de tous les patches
Application systématique et méthodique de tous les patches historiques.

##  FICHIERS SYNCHRONISÉS (19 fichiers)

### Core & Infrastructure:
- server.js (14 patches) - Lazy loading ModeManager, SIGINT hard kill, timing logs
- ModeManager.js (4 patches) - Instrumentation complète avec timing détaillé

### Pipeline System:
- PipelineDefinition.js (6 patches) - Source unique getLLMProvidersList()
- pipeline-builder.js (8 patches) - Standardisation LLM providers
- pipeline-runner.js (6 patches) - Affichage résultats structurés + debug console
- pipeline-builder.html (2 patches) - Fallback providers synchronisés
- pipeline-runner.html (3 patches) - UI améliorée résultats

### Enhancement Layers:
- TechnicalLayer.js (1 patch) - defaultLLM: 'gpt-4o-mini'
- StyleLayer.js (1 patch) - Type safety vocabulairePref
- PatternBreakingCore.js (1 patch) - Mapping modifications
- PatternBreakingLayers.js (1 patch) - LLM standardisé

### Validators & Tests:
- QualityMetrics.js (1 patch) - callLLM('gpt-4o-mini')
- PersonalityValidator.js (1 patch) - Provider gpt-4o-mini
- AntiDetectionValidator.js - Synchronisé

### Documentation:
- TODO.md (1 patch) - Section LiteLLM pour tracking coûts
- CLAUDE.md - Documentation à jour

### Tools:
- tools/analyze-skipped-exports.js (nouveau)
- tools/apply-claude-exports.js (nouveau)
- tools/apply-claude-exports-fuzzy.js (nouveau)

## 🎯 Changements principaux:
-  Standardisation LLM providers (openai → gpt-4o-mini, claude → claude-sonnet-4-5)
-  Lazy loading optimisé (ModeManager chargé à la demande)
-  SIGINT immediate exit (pas de graceful shutdown)
-  Type safety renforcé (conversions string explicites)
-  Instrumentation timing complète
-  Debug logging amélioré (console.log résultats pipeline)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 20:36:17 +08:00

511 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pipeline Builder - SEO Generator</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #667eea;
--secondary: #764ba2;
--success: #48bb78;
--warning: #ed8936;
--error: #f56565;
--bg-light: #f7fafc;
--bg-dark: #1a202c;
--text-dark: #2d3748;
--text-light: #a0aec0;
--border-light: #e2e8f0;
}
body {
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: var(--text-dark);
padding: 20px;
}
.container {
max-width: 1600px;
margin: 0 auto;
}
header {
background: white;
border-radius: 10px;
padding: 20px 30px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
color: var(--text-dark);
font-size: 1.8em;
}
.btn-back {
background: var(--bg-light);
color: var(--text-dark);
padding: 10px 20px;
border-radius: 8px;
text-decoration: none;
transition: all 0.2s;
}
.btn-back:hover {
background: var(--border-light);
}
.builder-layout {
display: grid;
grid-template-columns: 300px 1fr 400px;
gap: 20px;
}
.panel {
background: white;
border-radius: 10px;
padding: 25px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.panel h2 {
color: var(--text-dark);
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid var(--border-light);
font-size: 1.2em;
}
/* Modules Palette */
.modules-palette {
height: calc(100vh - 200px);
overflow-y: auto;
}
.module-category {
margin-bottom: 20px;
}
.module-category h3 {
font-size: 0.9em;
color: var(--text-light);
margin-bottom: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.module-item {
background: var(--bg-light);
padding: 12px;
margin-bottom: 8px;
border-radius: 6px;
cursor: grab;
transition: all 0.2s;
border: 2px solid transparent;
}
.module-item:hover {
background: #edf2f7;
border-color: var(--primary);
transform: translateX(3px);
}
.module-item.dragging {
opacity: 0.5;
cursor: grabbing;
}
.module-name {
font-weight: 600;
color: var(--text-dark);
margin-bottom: 3px;
}
.module-desc {
font-size: 11px;
color: var(--text-light);
}
/* Pipeline Canvas */
.pipeline-canvas {
min-height: 500px;
background: var(--bg-light);
border-radius: 8px;
padding: 20px;
}
.canvas-empty {
display: flex;
align-items: center;
justify-content: center;
height: 300px;
color: var(--text-light);
font-size: 1.1em;
border: 2px dashed var(--border-light);
border-radius: 8px;
}
.pipeline-step {
background: white;
border: 2px solid var(--border-light);
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
position: relative;
transition: all 0.2s;
}
.pipeline-step:hover {
border-color: var(--primary);
box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}
.step-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.step-number {
background: var(--primary);
color: white;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 13px;
}
.step-title {
flex: 1;
margin-left: 12px;
font-weight: 600;
color: var(--text-dark);
}
.step-actions {
display: flex;
gap: 5px;
}
.step-btn {
background: var(--bg-light);
border: none;
width: 28px;
height: 28px;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
font-size: 14px;
}
.step-btn:hover {
background: var(--border-light);
}
.step-config {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--border-light);
}
.config-row {
display: flex;
gap: 10px;
margin-bottom: 8px;
}
.config-row label {
flex: 0 0 80px;
font-size: 12px;
color: var(--text-light);
padding-top: 6px;
}
.config-row select,
.config-row input {
flex: 1;
padding: 6px 10px;
border: 1px solid var(--border-light);
border-radius: 4px;
font-size: 13px;
}
.add-step-btn {
width: 100%;
padding: 12px;
background: var(--primary);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
transition: all 0.2s;
}
.add-step-btn:hover {
background: #5568d3;
transform: translateY(-1px);
}
/* Side Panel */
.side-panel {
height: calc(100vh - 200px);
overflow-y: auto;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
font-weight: 600;
margin-bottom: 8px;
color: var(--text-dark);
font-size: 13px;
}
.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 10px;
border: 2px solid var(--border-light);
border-radius: 6px;
font-size: 14px;
}
.form-group textarea {
min-height: 80px;
resize: vertical;
}
.template-list {
max-height: 200px;
overflow-y: auto;
}
.template-item {
padding: 10px;
background: var(--bg-light);
border-radius: 4px;
margin-bottom: 6px;
cursor: pointer;
transition: all 0.2s;
}
.template-item:hover {
background: var(--border-light);
}
.template-name {
font-weight: 600;
font-size: 13px;
}
.template-desc {
font-size: 11px;
color: var(--text-light);
margin-top: 2px;
}
button {
padding: 12px 20px;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
font-size: 14px;
}
.btn-primary {
background: linear-gradient(135deg, var(--success), #38a169);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}
.btn-secondary {
background: var(--bg-light);
color: var(--text-dark);
}
.btn-secondary:hover {
background: var(--border-light);
}
.button-group {
display: flex;
gap: 10px;
margin-top: 15px;
}
.status {
padding: 12px;
border-radius: 6px;
margin-bottom: 15px;
font-weight: 500;
text-align: center;
display: none;
}
.status.success {
background: #c6f6d5;
color: #22543d;
border: 1px solid #9ae6b4;
}
.status.error {
background: #fed7d7;
color: #822727;
border: 1px solid #f56565;
}
.status.info {
background: #bee3f8;
color: #2b6cb0;
border: 1px solid #63b3ed;
}
.preview {
background: var(--bg-dark);
color: #68d391;
padding: 15px;
border-radius: 6px;
font-family: 'Fira Code', monospace;
font-size: 11px;
max-height: 300px;
overflow-y: auto;
white-space: pre-wrap;
}
/* Responsive Layouts */
@media (max-width: 1400px) and (min-width: 900px) {
.builder-layout {
grid-template-columns: 280px 1fr;
grid-template-rows: auto;
}
.modules-palette {
grid-row: 1 / 3;
height: calc(100vh - 180px);
}
.side-panel {
height: auto;
max-height: none;
}
}
@media (max-width: 899px) {
.builder-layout {
grid-template-columns: 1fr;
}
.modules-palette,
.side-panel {
height: auto;
max-height: 400px;
}
.panel {
padding: 15px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>🎨 Pipeline Builder</h1>
<a href="index.html" class="btn-back">← Retour Accueil</a>
</header>
<div class="status" id="status"></div>
<div class="builder-layout">
<!-- Left: Modules Palette -->
<div class="panel modules-palette">
<h2>📦 Modules</h2>
<div id="modulesContainer">
<!-- Modules will be loaded here -->
</div>
</div>
<!-- Center: Pipeline Canvas -->
<div class="panel">
<h2>🎨 Pipeline Canvas</h2>
<div class="pipeline-canvas" id="pipelineCanvas">
<div class="canvas-empty" id="canvasEmpty">
👉 Glissez des modules ici ou cliquez sur "Ajouter une étape"
</div>
<div id="stepsContainer" style="display: none;"></div>
</div>
<button class="add-step-btn" id="addStepBtn">+ Ajouter une étape</button>
</div>
<!-- Right: Configuration & Templates -->
<div class="side-panel">
<div class="panel" style="margin-bottom: 20px;">
<h2>⚙️ Configuration</h2>
<div class="form-group">
<label for="pipelineName">Nom du Pipeline *</label>
<input type="text" id="pipelineName" placeholder="Ex: Premium SEO Pro">
</div>
<div class="form-group">
<label for="pipelineDesc">Description</label>
<textarea id="pipelineDesc" placeholder="Description du pipeline..."></textarea>
</div>
<div class="button-group">
<button class="btn-primary" onclick="savePipeline()">💾 Sauvegarder</button>
<button class="btn-secondary" onclick="clearPipeline()">🗑️ Clear</button>
</div>
<div class="button-group">
<button class="btn-primary" onclick="testPipeline()">🧪 Tester</button>
<button class="btn-secondary" onclick="validatePipeline()">✓ Valider</button>
</div>
</div>
<div class="panel">
<h2>📚 Templates</h2>
<div class="template-list" id="templatesContainer">
<!-- Templates will be loaded here -->
</div>
</div>
<div class="panel" style="margin-top: 20px;">
<h2>📄 Preview JSON</h2>
<div class="preview" id="previewJson"></div>
</div>
</div>
</div>
</div>
<script src="pipeline-builder.js"></script>
</body>
</html>