A New signup description with line breaks can pass the form, then be refused as too long
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- next.js, react, typescript
- Ambito
- full-stack
Direzione di ricerca
Leggi createSignupAction e SignupCreateInputSchema per vedere il flusso di dati. Aggiungi un helper vicino all'azione che sostituisce \r\n con \n nella descrizione prima di createSignup, e fissalo con un test unitario. Esegui pnpm lint && pnpm typecheck && pnpm knip && pnpm test; fatto quando un invio di 1,996 lettere, 4 interruzioni, viene salvato con interruzioni \n e tutti i controlli passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
The description box on the New signup form (src/app/app/(chrome)/signups/new/page.tsx) has maxLength 2,000. The browser counts each line break as 1 character. When the form is sent, each line break becomes \r\n, which is 2 characters. createSignupAction passes the text on as it arrives, and SignupCreateInputSchema refuses anything over DESCRIPTION_MAX_LENGTH (2,000).
So a description near the limit with a few paragraph breaks passes in the browser, then the server refuses it with zod's own "String must contain at most 2000 character(s)". The form then comes back empty (#721).
Checked in Chromium: a textarea holding 1,996 letters and 4 line breaks reports a length of 2,000 and is valid. Sent with new FormData(form), the way a server action sends it, the server receives 2,004 characters with 4 \r\n.
Fix, in outline
- In
createSignupAction, turn\r\ninto\nin the description before callingcreateSignup. The browser and the server then count the same way. - Put that in a small helper next to the action, so a unit test can pin it.
Watch for
- The Build tab already saves
\n. It sends the textarea's value as JSON, so this makes both paths store the same thing. - Leave the schema alone. Don't change
DESCRIPTION_MAX_LENGTHorSignupCreateInputSchema. The API, the MCP tools and Magic Compose don't go through this form. - #721 changes the same action. Whichever lands second has a small merge.
Done when
- A description of 1,996 letters and 4 line breaks, sent as the browser sends it (
\r\n), creates the signup, and the saved description has 4\nbreaks. - A test pins that.
pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
From the owner's review of #706. Checked against main at 2d4fdfe by reading createSignupAction and SignupCreateInputSchema, and in Chromium as above. Session: https://claude.ai/code/session_016YZ9SUMiUBccns5PMgoNS1
- Lingua principale
- TypeScript
- Stelle
- 19
- Fork
- 4
- Merge medio
- 23h 28m
- PR unite (30g)
- 173
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
-
bug pipeline:ready pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
richshaw/OpenSignup#723 ·
I maintainer di solito rispondono entro 1 giorno
-
Magic Compose calls fields "columns" on the draft banner, the drafting screen and its warningsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug pipeline:ready pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
richshaw/OpenSignup#719 ·
I maintainer di solito rispondono entro 1 giorno
-
The "You're in." confirmation doesn't say which email address it usedForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement pipeline:ready pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
richshaw/OpenSignup#715 ·
I maintainer di solito rispondono entro 1 giorno
-
The privacy and cookies pages don't mention three things the app storesForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug pipeline:ready pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
richshaw/OpenSignup#711 ·
I maintainer di solito rispondono entro 1 giorno
-
Participant name and notes limits are typed twice, in the schemas and on the participant pagesForse già presa @bfs2021 l’ha presa 3 giorni fa. Apertaenhancement good first issue pipeline:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
richshaw/OpenSignup#705 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di richshaw/OpenSignup
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
excaliburjs/Excalibur#3895 ·
I maintainer di solito rispondono entro 3 giorni
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedForse già presa @Steve-20-ai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestampForse già presa @Gurkaran18 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
joinmarket-webui/jam#1588 ·
I maintainer di solito rispondono entro 3 giorni
-
BeOS .json missingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mihaip/infinite-mac#475 ·