Slot times are shown with their own copy of the HH:MM rule that saving them checks
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 19
- Fork
- 4
- Merge medio
- 19h 27m
- PR unite (30g)
- 199
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di richshaw/OpenSignup
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
richshaw/OpenSignup#794 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement pipeline:proposed pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
richshaw/OpenSignup#654 ·
I maintainer di solito rispondono entro 1 giorno
-
The sign-up dialog decides "See alternatives" with its own copy of the rule behind "Pick another slot."Forse già presa @dafeiyupola l’ha presa oggi. Apertaenhancement good first issue pipeline:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
richshaw/OpenSignup#803 ·
I maintainer di solito rispondono entro 1 giorno
-
A failed database query logs its parameters, so OAuth tokens and participant details can end up in the logsForse già presa @richshaw l’ha presa 1 giorno fa. Apertabug pipeline:building
richshaw/OpenSignup#800 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Two breadcrumb pages belong to URLs that always redirect, so they never showForse già presa @richshaw l’ha presa 2 giorni fa. Apertaenhancement good first issue pipeline:stuck
richshaw/OpenSignup#793 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di richshaw/OpenSignup
Issue simili
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area:ui bug effort:S priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Typo in WSL project description on Projects pageForse già presa @akhil9tiet l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
microsoft/opensource.microsoft.com#1066 · 1 commento ·
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Esri/calcite-design-system#15565 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
linkwarden/linkwarden#1891 ·
I maintainer di solito rispondono entro 1 giorno