Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Homepage shows deactivated chapters (sidebar fragment invalidation deletes the wrong key)

Abierto
#2,993 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@mroderick ya está trabajando en esto.

Desde el 7/10/2026.

  • #2994 de @mroderick — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
rails, ruby
Área
backend

Línea de trabajo

Read app/components/chapters_sidebar_component.html.erb and the Chapter#expire_chapters_sidebar_cache callback described in the issue. Check how the sidebar fragment key is built and how Chapter.active.count can be included; the issue says this count is needed because direct SQL updates do not change updated_at. Done means chapter-set changes produce a fresh sidebar cache key; note that pull request #2994 is already open.

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

Descripción

Deactivated chapters stay in the homepage chapter list. The chapter page 404s correctly and the subscriptions list is correct. Seen after several chapters were deactivated by setting active = false directly in the database.

The sidebar caches under a fixed key, and the callback that expires it deletes a key that does not exist:

  • app/components/chapters_sidebar_component.html.erb calls cache "chapters-sidebar". ActionView stores this as views/chapters_sidebar_component/chapters-sidebar, plus the cache namespace.
  • Chapter#expire_chapters_sidebar_cache deletes chapters-sidebar, which resolves to a different entry. The delete has never matched, so no write path invalidates the fragment, not only direct database edits.

Fix: derive the cache key from the data so it changes whenever the chapter set changes. The key must include Chapter.active.count, because a plain SQL update that sets active does not bump updated_at.

Evidence
  • The production cache store held one sidebar entry, last written 2026-09-13, under views/chapters_sidebar_component/chapters-sidebar, and no chapters-sidebar entry.
  • Toggling Chapter#update! in a production rails runner fired the callbacks and left the homepage unchanged.
  • Deleting the real entry refreshed the homepage at once.
  • The fixed key is shared across locales. A derived key removes that side effect.
  • The stale entry is cleared in production as of 2026-10-07. It will go stale again on the next chapter change until this is fixed.
Lenguaje dominante
Ruby
Estrellas
105
Forks
206
Merge medio
1 d 1 h
PR fusionados (30 d)
78

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 codebar/planner

Todos los issues de codebar/planner

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.