Repository navigation
fix(ui): Correctifs UI critiques DevForge - Sécurité et UX - #4
Merged
Merged
Conversation
- SÉCURITÉ: Masquage des tokens Bearer dans les commandes cron
- fix: Correction grammaire française ('une application', 'une base de données')
- fix: Message 404 en français ('Ressource introuvable')
- fix: Harmonisation titres document (/connexions/, /settings/*)
- fix: Prise en compte paramètre ?q= pour recherche applications/bases
- fix: Clarification affichage disque sur /storage/ (inodes vs espace)
Tous les secrets (Bearer tokens, API keys) sont maintenant masqués
dans l'affichage des tâches planifiées via le nouveau helper
maskSecretsInText().
Les titres de document sont désormais cohérents avec la navigation
pour /connexions/, /settings/servers/ et /settings/projects/.
Le paramètre de recherche ?q= est maintenant lu à l'initialisation
de CoreResourcesPage.
Le message d'erreur 404 dans l'API Core est traduit en français.
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
- Documente les 6 correctifs UI implémentés - Analyse technique des 2 problèmes hors scope (status mismatch, logs timeout) - Commandes de diagnostic pour investigation production - Tableau récapitulatif 6/8 symptômes corrigés Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
bobdivx
marked this pull request as ready for review
August 21, 2026 22:44
cursor Bot
pushed a commit
that referenced
this pull request
Sep 14, 2026
…isconnect, CTA proactif manage modal - Ajoute auth_mode?: string | null au type CatalogItem (ligne 23) - Supprime duplicate mcpOAuthStart dans api.ts (gardé lignes 754-758, 760-763) - Remplace api.post(...) par api.mcpOAuthDisconnect(manage.id) dans disconnectOAuth (ligne 406) - Ajoute CTA proactif (info tone) dans manage modal quand manageCatalog?.auth_mode=oauth && !oauth_connected (avant le warn 401) Résout les bugs #1-#4 signalés par utilisateur. Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
bobdivx
added a commit
that referenced
this pull request
Sep 14, 2026
* feat(mcp): OAuth as primary flow for OAuth-enabled presets
- Make API tokens optional (required: false) for Turso and Linear
- Reorder Turso fields: org first (required), api_token second (optional)
- Update catalog copy: OAuth now presented as recommended, not limitation
- Add OAuth CTA button in add-preset modal for auth_mode=oauth presets
- New flow: User clicks preset → sees OAuth button → connects directly
- Fallback: Manual token fields remain available (advanced mode)
- Fixes UX gap where OAuth was only shown after 401 errors
Presets updated:
- Turso: api_token optional, OAuth primary
- Linear: api_key optional, OAuth primary
- Vercel, Sentry, Notion, Stripe: already had optional tokens ✓
Closes user report: UI still asks for tokens instead of OAuth popup
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
* feat(mcp): OAuth-first for all hosted MCPs based on 2026 research
Major UX shift: OAuth is now the PRIMARY authentication method for all
hosted MCPs that support it, with API tokens relegated to optional
fallback for CI/CD only.
Research findings (2026 docs):
- Turso: OAuth 2.1+PKCE via mcp.turso.ai (RFC 9728/8414 discovery)
- Vercel: OAuth via mcp.vercel.com (allowlist + consent flow)
- Linear: OAuth via mcp.linear.app/mcp (dynamic client registration)
- Sentry: OAuth via mcp.sentry.dev/mcp (device code for headless)
- Notion: OAuth via mcp.notion.com/mcp (no PAT support)
- Stripe: OAuth via mcp.stripe.com (restricted keys for unattended)
- Cloudflare: OAuth via mcp.cloudflare.com/mcp (RFC 9728 metadata)
- Supabase: OAuth via mcp.supabase.com/mcp (dynamic client reg)
- Neon: OAuth via mcp.neon.tech/mcp (browser-based consent)
- PostHog: OAuth via mcp.posthog.com/mcp (region auto-detection)
- GitHub: OAuth via api.githubcopilot.com/mcp/ (pre-registered apps)
- Slack: OAuth via official mcp.slack.com/mcp (user OAuth)
Catalog changes (crates/mcp/src/catalog.rs):
- All OAuth presets: auth_mode changed from 'token' → 'oauth'
- All token fields: required changed from true → false
- All setup_intro: now lead with '✨ OAuth disponible' messaging
- Token fields reordered: non-secret required first, tokens last
- Help text updated: OAuth primary, tokens for CI/CD fallback only
- Discord/Railway/Resend/Upstash: keep as self_hosted (no OAuth)
Frontend changes (apps/web/src/components/McpPage.tsx):
- Filter logic: hide secret+required fields when auth_mode=oauth
- Result: Turso shows only 'org' field, Vercel shows NO fields
- OAuth button always visible as primary CTA for oauth presets
- Token fields only shown if optional (advanced mode label visible)
BREAKING CHANGE: Users who configured token-first will see OAuth
button instead. Existing token configs still work (backward compat).
Closes user report from Mathieu: 'MOST hosted MCPs offer simpler
OAuth/browser login than API tokens — treat token-first as wrong default.'
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
* fix(mcp): critical OAuth flow bugs + advanced mode toggle
CRITICAL FIXES per Mathieu review:
1. API method missing: Added api.mcpOAuthStart(id) returning flat { auth_url, state }
- Before: api.post(...) → undefined method, always failed
- After: Proper typed method with correct response shape
2. Response destructuring: Fixed both manage + add flows
- Before: oauth.data.auth_url (wrong, .data doesn't exist)
- After: const { auth_url } = await api.mcpOAuthStart(id)
3. Popup fallback: Added window.location.assign when popup blocked
- Before: Toast warning, user stuck
- After: Full-page redirect fallback (same as manage flow)
4. Field filtering broken: Tokens still visible (all required:false now)
- Before: filter secret && required (hides nothing)
- After: Hide ALL secret fields by default for auth_mode=oauth
- New: Toggle 'Mode avancé (token API / CI)' reveals secrets
- UX: Non-secret fields (org, project_ref, url) always visible
- Result: Turso shows only org, Vercel shows nothing by default
5. Slack verified: https://mcp.slack.com/mcp confirmed official (Feb 2026)
- Docs: https://docs.slack.dev/ai/slack-mcp-server/
- No changes needed, already correct in catalog
Advanced mode implementation:
- showAdvancedToken state tracks toggle
- OAuth presets: secrets hidden behind collapsible section
- Non-OAuth presets: secrets shown normally (unchanged UX)
- Label: '▶ Mode avancé (token API / CI)' → '▼' when expanded
- Help text: 'Pour CI/CD ou usage sans OAuth. Non requis pour usage interactif.'
Files changed:
- apps/web/src/lib/api.ts: +4 (new mcpOAuthStart method)
- apps/web/src/components/McpPage.tsx: +80 -30 (fixes + toggle)
All bugs from review now fixed. Ready for rebase + CI.
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
* fix(mcp): Corrige régressions OAuth - type CatalogItem, api.mcpOAuthDisconnect, CTA proactif manage modal
- Ajoute auth_mode?: string | null au type CatalogItem (ligne 23)
- Supprime duplicate mcpOAuthStart dans api.ts (gardé lignes 754-758, 760-763)
- Remplace api.post(...) par api.mcpOAuthDisconnect(manage.id) dans disconnectOAuth (ligne 406)
- Ajoute CTA proactif (info tone) dans manage modal quand manageCatalog?.auth_mode=oauth && !oauth_connected (avant le warn 401)
Résout les bugs #1-#4 signalés par utilisateur.
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Mathieu JESER <bobdivx@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Résumé
Ce PR corrige 6 problèmes UI critiques identifiés lors du QA de production sur https://web.briseteia.me (projet ZIMAOS, équipe Root, utilisateur bobdivx).
Bilan : 6/8 symptômes corrigés. Les 2 problèmes majeurs restants nécessitent un accès production et sont documentés dans
QA_FINDINGS.mdavec analyse technique complète.✅ Corrections implémentées
🔒 Sécurité (CRITIQUE)
••••••)maskSecretsInText()qui détecte et masque automatiquement :Bearer xxx→Bearer ••••••)API_KEY=xxx,TOKEN=xxx,PASSWORD=xxx→ masqués)🇫🇷 Traduction et grammaire
🏷️ Titres de document
/connexions/: "Tokens & Clés API" → "Connexions" (cohérent avec nav)/settings/servers/: "Paramètres" → "Serveurs"/settings/projects/: "Paramètres" → "Projets"🔍 Recherche URL
?q=: Maintenant pris en compte à l'initialisation/applications/?q=popcornfonctionnent correctement💾 Clarté stockage
🚧 Problèmes identifiés mais NON corrigés (hors scope)
1. Status mismatch (apps healthy vs URL unreachable)
Symptôme :
/applications/et/monitoring/montrent 10/11 apps online,/deployments/montre 8/11 "En alerte"Analyse technique :
ResourceStatusData.phplitApplication.statusdirectement (statut Docker container)DeploymentTopologyData.phputiliseApplicationReadiness.last_probe_okqui vient d'un probe HTTP réel viaApplicationDomainProberunningmais être inaccessible via son URL publiqueCauses possibles :
Diagnostic requis (voir
QA_FINDINGS.mdpour commandes détaillées) :Raison hors scope : Nécessite accès SSH production, logs temps réel, et potentiellement régénération labels Traefik ou fix DNS.
2. Onglet Logs bloqué sur "Chargement…"
Symptôme :
/applications/{uuid}/?tab=logsreste >25s sur "Chargement…"Analyse technique :
/api/devforge/v1/applications/{uuid}/logsApplicationContainerLogs.phpligne 24 appellegetCurrentApplicationContainerStatus($server, $application->id)Causes possibles :
Diagnostic requis (voir
QA_FINDINGS.mdpour commandes détaillées) :Raison hors scope : Nécessite tests réseau sur instance production, inspection logs backend temps réel, et potentiellement fix timeout SSH ou error handling.
📦 Fichiers modifiés
Backend (1 fichier) :
app/Http/Controllers/DevForge/Core/ResourceController.php: Message 404 en françaisFrontend (5 fichiers) :
components/applications/ApplicationScheduledTasksPanel.tsx: Masquage secretscomponents/storage/ServerStorageCard.tsx: Clarification message disquelib/routing/routes.ts: Titres cohérents, label "Connexions"lib/secret-masking.ts: NOUVEAU - Helper masquage secretspages/resources/_CoreResourcesPage.tsx: Grammaire française, lecture?q=Documentation (1 fichier) :
QA_FINDINGS.md: NOUVEAU - Rapport QA complet avec analyse technique des 2 problèmes majeurs🔐 Sécurité
Impact : Les tokens Bearer et API keys ne sont plus exposés en clair dans l'UI. Le masquage est côté présentation uniquement - les secrets restent accessibles via l'API pour les utilisateurs autorisés (nécessaire pour l'édition).
Patterns détectés :
/\b(bearer)\s+([a-z0-9\-._~+/]+)/gi/(api[_-]?key|token|password|passwd|secret)/i🧪 Tests suggérés
Tests UI (post-merge)
?q=fonctionnent/connexions/,/settings/servers/,/settings/projects//storage/Tests réseau (accès production requis)
QA_FINDINGS.md)QA_FINDINGS.md)🚀 Déploiement
Aucune migration requise. Les changements sont :
Pas d'impact sur la base de données ou les APIs existantes.
📊 Tableau récapitulatif
📖 Documentation complète
Consultez
QA_FINDINGS.mdpour :