feat(api,ai): #72 OpenAPI 3.1 enrichie + fiabilisation de l'outil AI UI
CI / lint (push) Successful in 55s
CI / security (push) Successful in 37s
CI / test (push) Successful in 1m19s
CI / build (push) Successful in 34s
CI / e2e (push) Successful in 10m27s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

API (#72):
- backend/openapi_docs.py: 18 tags documentes, assignation auto par prefixe,
  securite bearerAuth/cookieAuth, erreurs 401/403/404/422/500, exemples,
  page /api autonome (liens /docs, /redoc, /openapi.json)
- backend/schemas.py: response_model Pydantic pour ~35 endpoints sans modele
- main.py: FastAPI enrichi + override app.openapi; routes /api et /api/
- ai_routes/bookslm_routes: response_model + doc SSE
- frontend: entree 'API' du menu (i18n FR/EN)
- tests/test_openapi.py (58 tests)

AI UI:
- BooksLM: requetes authentifiees (AuthManager), parsing SSE {token}/error,
  message utilisateur correct (plus le placeholder vide), barre de contexte
- AI Editor: Ctrl/Cmd+J lie une seule fois, libelles i18n, modale de
  reecriture accessible a la place de window.prompt()
- tests/frontend/ai.test.mjs (7 tests) + CI
This commit is contained in:
2026-09-11 01:40:21 -04:00
parent 75ef597ece
commit 62023acd4d
18 changed files with 2001 additions and 154 deletions
+82
View File
@@ -2675,6 +2675,88 @@ select {
50% { opacity: 0.6; }
}
/* AI custom-rewrite modal — replaces the browser prompt() for a consistent,
theme-aware and keyboard-accessible experience. */
.ai-modal-overlay {
position: fixed;
inset: 0;
z-index: 10050;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(2px);
}
.ai-modal {
width: 100%;
max-width: 460px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 10px;
padding: 18px 18px 14px;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.ai-modal-title {
margin: 0 0 4px;
font-size: 0.95rem;
color: var(--text-primary);
}
.ai-modal-hint {
margin: 0 0 10px;
font-size: 0.78rem;
color: var(--text-muted);
}
.ai-modal-input {
width: 100%;
resize: vertical;
min-height: 72px;
padding: 8px 10px;
font-family: inherit;
font-size: 0.85rem;
color: var(--text-primary);
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 6px;
}
.ai-modal-input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}
.ai-modal-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 12px;
}
.ai-modal-btn {
padding: 6px 14px;
font-size: 0.8rem;
border-radius: 6px;
cursor: pointer;
border: 1px solid var(--border);
background: transparent;
color: var(--text-primary);
}
.ai-modal-btn:hover { background: var(--bg-hover); }
.ai-modal-btn.primary {
background: var(--accent);
border-color: var(--accent);
color: #fff;
}
.ai-modal-btn.primary:hover { filter: brightness(1.08); }
.editor-title {
font-family: "JetBrains Mono", monospace;
font-size: 0.9rem;