Slot times are shown with their own copy of the HH:MM rule that saving them checks
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
Línea de trabajo
Read src/lib/slot-label.ts and src/lib/reminder-fields.ts, then inspect slot-label.test.ts and run it to establish the current formatting behavior. Update formatSlotTime to validate through isRealTime and extract the hour and minutes by position, preserving the existing output. Done when the HH:MM regex is gone from slot-label.ts and the existing tests pass; an open linked pull request (#808) already covers this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
A Time field's value is checked and shown by two different rules:
- Saving.
isRealTimeinsrc/lib/reminder-fields.tsdecides whether a value is a real time. The slot-field service, Magic Compose, the share message and the reminder anchor all use it, and the MCP tools reach it through the services. - Showing.
formatSlotTimeinsrc/lib/slot-label.tsuses its own regex,TIME_OF_DAY = /^([01]\d|2[0-3]):([0-5]\d)$/. Everything that shows a time goes through it:renderFieldValue(the public page and emails), the Build tab'sTimeSelect, column headers and the share text.
Today the two accept exactly the same strings. A check of all 10,000 dd:dd strings plus 24 edge cases found no disagreement. But if one changes (to allow 9:30, or a time range as #590 proposes), the page and the validator stop agreeing, and a saved time would print raw instead of as "6:30 PM".
slot-label.ts already imports isRealDate from reminder-fields.ts for dates, so times are the odd one out.
Fix, in outline
- In
formatSlotTime, deleteTIME_OF_DAYand check the value withisRealTime(already in a moduleslot-label.tsimports). - Take the hour and minutes from the string by position (
slice(0, 2),slice(3)), sinceisRealTimehas already checked it is exactlyHH:MM.
Watch for
- Keep the output byte-identical. The space before AM/PM is a non-breaking space on purpose (see the comment on
formatSlotTime). The existing tests inslot-label.test.tscover24:00,9:30and the empty string; they must still pass unchanged. - Leave the date regex alone.
DATE_ONLYinslot-label.tsonly picks how a string is parsed, and validity already goes throughisRealDate. - The SQL copies in old migrations (
0005_…,0006_…) are applied history. Don't touch them. - #622 (open, proposed) would add a locale argument to
formatSlotTime. It doesn't touch the regex, so whichever lands second has a small merge.
Done when
slot-label.tshas no HH:MM regex of its own, andformatSlotTimechecks withisRealTime.slot-label.test.tspasses unchanged.pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm testpass.
Found by the pipeline's refactor scout in the reminder jobs and their src/lib helpers (src/lib/slot-label.ts, src/lib/reminder-fields.ts), at d1e9e14. Checked by an independent verify agent, which grepped every HH:MM and YYYY-MM-DD pattern in the repo and ran 10,024 strings through both time rules with no disagreement. https://claude.ai/code/session_016YZ9SSPmh7nC1k9RsPc5NE
- 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
-
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 1 día. Abiertobug pipeline:building
richshaw/OpenSignup#800 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Two breadcrumb pages belong to URLs that always redirect, so they never showPosiblemente ocupada @richshaw la tomó hace 3 días. Abiertoenhancement good first issue pipeline:stuck
richshaw/OpenSignup#793 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de richshaw/OpenSignup
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
ranxianglei/billion-context#5893 ·
Los mantenedores suelen responder en 1 día
-
stringify escapes leading digits in pseudo-class arguments (:nth-child(1) becomes :nth-child(\31 ))Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
enhancement security severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Battle-Cattle/BCUK-Bot-4#959 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Claude account rows no longer show the email (since #8055), so "Account 1, 2, 3" cannot be told apartPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoaccount-pool bug gui
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lidge-jun/opencodex#8286 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día