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

Abierto
#2,137 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Wikid82 ya está trabajando en esto.

Desde el 3/12/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
17
Forks
2
Merge medio
1 h 42 min
PR fusionados (30 d)
173

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Wikid82/Charon

Todos los issues de Wikid82/Charon

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.