chore: align the feature flag list with the notification settings it reports

Ouverte
#2,137 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Wikid82 y travaille déjà.

Depuis le 3/12/2026.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
70/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go
Domaine
backend

Piste de recherche

Read backend/internal/api/handlers/feature_flags_handler.go and backend/internal/services/notification_service.go, then inspect backend/internal/services/notification_feature_flags.go and the existing handler tests. Compare the endpoint's notification flag keys and defaults with those used by dispatch. Done when the endpoint reports matching defaults, omits unread keys, and a test checks the defaults agree.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

backend low

What

GET /api/v1/feature-flags reports values for notification settings that differ from what notification sending uses, and lists two keys that nothing reads.

  • backend/internal/api/handlers/feature_flags_handler.go:36-60 lists feature.notifications.service.gotify.enabled, ...webhook.enabled and ...telegram.enabled with a default of false. When no stored setting exists, NotificationService.isDispatchEnabled (backend/internal/services/notification_service.go, getFeatureFlagValue(..., true)) treats the same keys as true and sends. The endpoint therefore reports these provider types as off while Charon sends to them.
  • feature.notifications.service.slack/pushover/ntfy/webpush.enabled are read by isDispatchEnabled but not listed by the endpoint.
  • feature.notifications.engine.notify_v1.enabled and feature.notifications.service.discord.enabled are listed, but no code reads them (FlagNotifyEngineEnabled and FlagDiscordServiceEnabled in backend/internal/services/notification_feature_flags.go have no reader).

Severity

Low. No user-facing page reads these keys; scripts reading the endpoint get values that do not match sending.

Suggested approach

Derive the notification entries of defaultFlags / defaultFlagValues from one table shared with isDispatchEnabled (key + default), drop the two keys nothing reads, and add a test that the endpoint's defaults equal the dispatch defaults.

Found while planning #2132.

Langage dominant
Go
Étoiles
17
Forks
2
Merge moyen
1 h 42 min
PR mergées (30 j)
173

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Wikid82/Charon

Toutes les issues de Wikid82/Charon

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.