Participant name and notes limits are typed twice, in the schemas and on the participant pages
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 83/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
まず src/lib/magic-compose/limits.ts と、issueで指定されたファイルである src/schemas/common.ts、src/schemas/commitments.ts、src/app/s/[slug]/name-message.ts、src/app/s/[slug]/participant-fields.tsx、およびNew signupページとそのスキーマを確認してください。参加者の制限値を、importのない指定モジュールに移し、既存のsignup制限値を再利用してください。参加者ページからzodを排除し、名前入力欄には maxLength を設定しないでください。各制限値の定義元が1つになり、指定されたlint、typecheck、knip、test、build、budgetのチェックがすべて通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happens
The limits on what a participant can type are literals in two places each:
- Name, 100 characters.
NameSchemainsrc/schemas/common.tshas.max(100), andNAME_INVALIDinsrc/app/s/[slug]/name-message.tstypes "Enter your name, up to 100 characters." - Notes, 500 characters. The create and update schemas in
src/schemas/commitments.tseach have.max(500), and the Notes field insrc/app/s/[slug]/participant-fields.tsxhasmaxLength={500}. The sign-up dialog and the edit page both use that field. - Quantity, 999. Typed twice inside
src/schemas/commitments.ts, and nowhere on the client.
If someone changes a limit in the schema, the participant page's message and the textarea's maxLength are left saying the old number.
The organizer's New signup form (src/app/app/(chrome)/signups/new/page.tsx) has the same kind of copies. It types minLength={2}, maxLength={120} and maxLength={2000}, while src/schemas/signups.ts already has TITLE_MAX_LENGTH and DESCRIPTION_MAX_LENGTH, plus TITLE_MIN_LENGTH, which isn't exported.
Fix, in outline
- A new limits module. Add
src/lib/participant-limits.tswith no imports at all (likesrc/lib/magic-compose/limits.ts), holdingNAME_MAX_LENGTH = 100,NOTES_MAX_LENGTH = 500andQUANTITY_MAX = 999. - Use it everywhere. Use the constants in
NameSchema, both commitment schemas,NAME_INVALID(as a template string) and the Notes field. Updatesrc/schemas/common.test.ts's 100/101 boundary test to use the constant. - The New signup form. Export
TITLE_MIN_LENGTH, then use it withTITLE_MAX_LENGTHandDESCRIPTION_MAX_LENGTHon the form. It's a server component, so it can import from@/schemas/signupsat no cost.
Watch for
- Keep zod out of the participant pages.
name-message.tsandparticipant-fields.tsxreach'use client'components on/s/[slug]. The constants must not live insrc/schemasor anywhere that imports zod, or zod lands in those pages' JavaScript andbudgets.jsonfails. - No behaviour change. Don't add a
maxLengthto the name inputs: that would change what participants see, so it's a separate decision.
Done when
- Each of these limits is a number in exactly one place: name, notes, quantity, and title and description on the New signup form.
pnpm budgetsafterpnpm buildshows/s/[slug]and/s/[slug]/c/[id]unchanged.pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
Found by the pipeline's refactor scout in src/schemas and src/app/s/[slug], at a65d5eb. Checked by locating every copy and each participant module's imports. https://claude.ai/code/session_016YZ9SVWAFTJiB4Z8TyLWNA
- 主要言語
- TypeScript
- スター
- 19
- フォーク
- 4
- 平均マージ
- 23時間 28分
- マージ済み PR(30日)
- 173
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
richshaw/OpenSignup のほかの issue
-
bug pipeline:ready pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
richshaw/OpenSignup#723 ·
メンテナーはふだん 1 日以内に返信
-
bug pipeline:ready pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
richshaw/OpenSignup#722 ·
メンテナーはふだん 1 日以内に返信
-
Magic Compose calls fields "columns" on the draft banner, the drafting screen and its warnings対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug pipeline:ready pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
richshaw/OpenSignup#719 ·
メンテナーはふだん 1 日以内に返信
-
The "You're in." confirmation doesn't say which email address it used対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement pipeline:ready pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
richshaw/OpenSignup#715 ·
メンテナーはふだん 1 日以内に返信
-
The privacy and cookies pages don't mention three things the app stores対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug pipeline:ready pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
richshaw/OpenSignup#711 ·
メンテナーはふだん 1 日以内に返信
richshaw/OpenSignup の issue をすべて見る
似ている issue
-
Add: Disco Mix SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
level2 nsoc26
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
GauravKarakoti/SecureFlow#1488 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
deltachat/deltachat-desktop#6914 ·
メンテナーはふだん 2 日以内に返信
-
area:cli bug P4
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
esengine/DeepSeek-Reasonix#14868 ·
メンテナーはふだん 1 日以内に返信