A slot whose date changes keeps its old place, so a date-ordered list falls out of order
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Start by reading updateSlot in src/services/slots.ts and SLOT_DISPLAY_ORDER in src/services/locks.ts to see how slots are ordered. Implement conditional renumbering via writeSlotOrder as reorderSlots does, then run src/services/slots.db.test.ts and pnpm checks. Done when date-ordered signups auto-move the edited slot and hand-ordered ones stay put.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Needs your OK: this changes the order slots appear in, for organizers and participants, after a slot's date changes. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
When an organizer corrects a slot's date, the slot keeps its old place in the list. On a signup with "Setup crew, Sat Nov 21" and "Cleanup crew, Sun Nov 22", moving Setup crew to Nov 28 leaves it first, so the public page and the builder both read Nov 28, then Nov 22. A participant scanning down the list by date meets the later day first, and nothing tells the organizer the list is now out of order.
Slots are shown by sortOrder first and their date second (SLOT_DISPLAY_ORDER in src/services/locks.ts). updateSlot in src/services/slots.ts sets the new slotAt but leaves sortOrder alone. Keeping the organizer's own order is deliberate, since they can drag rows; the gap is the case where the list was in date order and one edit broke it.
Fix, in outline
- In
updateSlot, when a slot'sslotAtchanges and the signup's other slots were already in date order (byslotAt, with the moved slot in its old place), give the moved slot the place that keeps date order, renumbering throughwriteSlotOrderasreorderSlotsdoes. - When the list wasn't in date order before the edit, change nothing: the organizer arranged it by hand.
- Slots with no date stay where they are.
- The builder shows the row in its new place after the save, not only after a reload.
Choices this makes
- Move it automatically, only when the list was already in date order. Default: yes. A list sorted by date is almost always meant to be, and a list arranged by hand is left alone. The alternative, a "Sort by date" button, adds a control and still leaves the list wrong until someone notices.
- The same rule for the AI tools. Default: yes, since
update_slotcalls the same service.
Watch for
src/services/slots.db.test.tsand the capacity and reschedule tests: the moved slot'sslot.rescheduledrow and its commitments must not change.- Signups grouped by date: the moved slot must land in its new day's group, and the groups must stay in date order.
- The row's position moving under the organizer's mouse right after Done. If that's jarring in the builder, keep the move but don't animate it.
- CHANGELOG entry.
Done when
- On a date-ordered signup, changing one slot's date moves it to its date's place, in the builder and on
/s/[slug], with its sign-ups unchanged. - On a hand-ordered signup, changing a date moves nothing.
- A DB test pins both cases.
pnpm lint && pnpm typecheck && pnpm knip && pnpm test && pnpm test:dbpass.
Found by the UX walkthrough, scenario O4, on opensignup-prod main at 651da5b (this repo at 208a077). Checked against SLOT_DISPLAY_ORDER and updateSlot at 208a077.
Generated by Claude Code
- Lenguaje dominante
- TypeScript
- Estrellas
- 19
- Forks
- 4
- Merge medio
- 19 h 27 min
- PR fusionados (30 d)
- 199
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de richshaw/OpenSignup
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
richshaw/OpenSignup#794 ·
Los mantenedores suelen responder en 1 día
-
enhancement pipeline:proposed pipeline:ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
richshaw/OpenSignup#654 ·
Los mantenedores suelen responder en 1 día
-
Slot times are shown with their own copy of the HH:MM rule that saving them checksPosiblemente ocupada @novakzx la tomó hace 1 día. Abiertoenhancement good first issue pipeline:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
richshaw/OpenSignup#805 ·
Los mantenedores suelen responder en 1 día
-
The sign-up dialog decides "See alternatives" with its own copy of the rule behind "Pick another slot."Posiblemente ocupada @dafeiyupola la tomó hace 1 día. Abiertoenhancement good first issue pipeline:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
richshaw/OpenSignup#803 ·
Los mantenedores suelen responder en 1 día
-
A failed database query logs its parameters, so OAuth tokens and participant details can end up in the logsPosiblemente ocupada @richshaw la tomó hace 2 días. Abiertobug pipeline:building
richshaw/OpenSignup#800 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de richshaw/OpenSignup
Issues similares
-
area:frontend kind:bug priority:p2 ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
handsontable/hyperformula#1879 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
RunestoneInteractive/rs#1661 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
capricorn86/happy-dom#2594 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día