Skip to content

Améliore les fonctions de débug#1457

Open
bellangerq wants to merge 20 commits intomainfrom
1442-améliorer-les-fonctionnalités-de-debugdev

Hidden character warning

The head ref may contain hidden characters: "1442-am\u00e9liorer-les-fonctionnalit\u00e9s-de-debugdev"
Open

Améliore les fonctions de débug#1457
bellangerq wants to merge 20 commits intomainfrom
1442-améliorer-les-fonctionnalités-de-debugdev

Conversation

@bellangerq
Copy link
Copy Markdown
Collaborator

@bellangerq bellangerq commented Mar 26, 2026

To do / questions :

  • Est-ce qu'on limite ça à certains environnements (branches de review + dev ? Production aussi ?) ? Si oui, ajouter DATABASE_SEEDS en prod.

closes #1442

@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg March 26, 2026 23:28 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg March 27, 2026 10:39 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg March 27, 2026 10:48 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg March 27, 2026 10:59 Inactive
@hissalht hissalht had a problem deploying to ara-1442-ameliorer-les--lim4yg March 27, 2026 15:11 Failure
@bellangerq bellangerq force-pushed the 1442-améliorer-les-fonctionnalités-de-debugdev branch from 72409dc to fb32e31 Compare March 27, 2026 15:58
@hissalht hissalht had a problem deploying to ara-1442-ameliorer-les--lim4yg March 27, 2026 15:58 Failure
@bellangerq bellangerq force-pushed the 1442-améliorer-les-fonctionnalités-de-debugdev branch from fb32e31 to 9252cbf Compare March 27, 2026 16:35
@hissalht hissalht had a problem deploying to ara-1442-ameliorer-les--lim4yg March 27, 2026 16:36 Failure
@bellangerq bellangerq marked this pull request as ready for review March 27, 2026 16:38
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 08:57 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 09:12 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 09:23 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 09:34 Inactive
@hissalht hissalht had a problem deploying to ara-1442-ameliorer-les--lim4yg April 1, 2026 13:17 Failure
@hissalht hissalht had a problem deploying to ara-1442-ameliorer-les--lim4yg April 1, 2026 13:48 Failure
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 15:24 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 1, 2026 15:48 Inactive
Copy link
Copy Markdown
Collaborator

@yaaax yaaax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super fonctionnalité !

const prisma = new PrismaClient({ adapter });

async function generateAccounts() {
if (!process.env.DATABASE_SEEDS) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On pourrait rajouter DATABASE_SEEDS dans le .env.example ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmh on peut mais c'est qqch qu'on veut en local ?

};

const emails = process.env.DATABASE_SEEDS.split(",");
const password = await hash("pouetpouetpouet", 10);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça va à tout le monde pouetpouetpouet 😆 ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vous me dites !

isPristine: boolean;

@IsBoolean()
fillStatement: boolean;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renommer ce booléen en shouldFillStatement ou needsStatementFilled ?
(ultra pinaillage)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah merde je trouve ça moins clair 😅. Un avis @hissalht @emma11y ?

{
name: "Accueil",
url: "https://example.com",
slug: slugify("Accueil")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas possible de slugify automatiquement dans le code quelque-part ?

Je remarque que "elements-transverses" a été mis directement sans slugify("Éléments transverses")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui c'est vrai, autant direct mettre le slug.

// enable debug enpoints only when the DEBUG_ENDPOINTS variable is set
...(process.env.DEBUG_ENDPOINTS ? [DebugController] : [])
// Disable debug controller for production environment
...(process.env.NODE_ENV !== "production" || process.env.GENERATE_TYPES ? [DebugController] : []),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je me pose la question : doit-on mettre GENERATE_TYPES dans .env.example ? Ou le documenter quelque-part ? (ça sort de cette review ceci-dit…)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmh je pense pas, c'est une variable qui est uniquement utilisée pour lancer une commande et c'est pas configurable par l'utilisateur ni ne change selon l'environnement.

postgres:14
```

Optionnellement, il est possible d’ajouter la variable d’environnement `DATABASE_SEEDS` pour pré-remplir la base de données avec des comptes utilisateurs dont le mot de passe est `pouetpouetpouet`. Exemple :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voir mon autre commentaire sur pouetpouetpouet (je n’ai rien contre en vrai…)


<template>
<div>
<button class="fr-btn fr-btn--icon-right fr-icon-arrow-down-s-line fr-mb-2w" @click="showDebugPanel = !showDebugPanel">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plutôt utiliser un accordéon ça sera mieux pour l’accessibilité (notamment aria-expanded)

Ou alors une modale ? Car je ne sais pas si le DSFR autorise à mettre des formulaires dans des accordéons…

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La modale c'est un peu relou nan ?

L'accordéon pourquoi pas, j'ai essayé mais je trouvais pas ça joli. Après je peux simplement linker le bouton et lui ajouter les bons attributs (comme le dropdown : aria-haspop, aria-expanded...).

</button>
<div v-if="showDebugPanel" class="debug-container">
<section class="fr-p-2w debug-card">
<h2 class="fr-h4">Créer un audit</h2>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On peut supprimer ce titre et simplifier en renommant le bouton d’ouverture "Créer un audit de test" ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(je m’attendais à ce que ce soit une légende de <fieldset> sinon… mais en vrai pas obligé)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'avais mis un titre car je me suis dit qu'un jour on aurait peut-être d'autres options de débug. Mais je peux supprimer en attendant oui.

@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 2, 2026 08:36 Inactive
@hissalht hissalht temporarily deployed to ara-1442-ameliorer-les--lim4yg April 2, 2026 08:55 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Améliorer les fonctionnalités de debug/dev

3 participants