Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A New signup description with line breaks can pass the form, then be refused as too long

オープン 初心者向け
#722 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
next.js, react, typescript
領域
full-stack

調査の方向性

データフローを確認するために createSignupAction と SignupCreateInputSchema を読む。アクションの隣に、説明内で \r\n を \n に置き換えるヘルパーを createSignup の前に追加し、単体テストで固定する。pnpm lint && pnpm typecheck && pnpm knip && pnpm test を実行する;1,996文字、4改行の提出が \n 改行で保存され、すべてのチェックが通ると完了。

索引モデルが issue の本文から書いたものです。

説明

bug pipeline:ready pipeline:ux

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\n into \n in the description before calling createSignup. 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_LENGTH or SignupCreateInputSchema. 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 \n breaks.
  • A test pins that.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test pass.

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

主要言語
TypeScript
スター
19
フォーク
4
平均マージ
23時間 28分
マージ済み PR(30日)
173

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

richshaw/OpenSignup のほかの issue

richshaw/OpenSignup の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。