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

Magic Compose drafts in whatever language the model picks, not the organizer's

オープン
#635 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
next.js, typescript
領域
ai, backend

調査の方向性

Start with src/lib/magic-compose/prompt.ts and its byte-for-byte golden test in __golden__/system-prompt.txt and prompt.test.ts; then read src/app/api/signups/magic-compose/route.ts to see how the organizer locale reaches the prompt and draft persistence. Add the language slot and rule, update the golden and language eval cases, then run the listed lint, typecheck, knip, tests, and evals. Done means the prompt tests pass and eval results are included in the PR.

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

説明

enhancement pipeline:proposed pipeline:ux

Needs your OK: this tells Magic Compose to write every draft in the organizer's language. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

The system prompt (src/lib/magic-compose/prompt.ts, pinned byte for byte by __golden__/system-prompt.txt) has no rule about language, so a draft comes back in whatever language the model picks. A Swedish description can come back with English column labels. The prompt's only runtime slot is {{TODAY}}.

Fix, in outline

  • A second slot, {{LANGUAGE}}. The route (src/app/api/signups/magic-compose/route.ts, which already holds the session) fills it from getOrganizerLocale() (#626) as a language name the model reads ("Swedish", not sv).
  • A rule. Write the title, description, labels and choices in that language, even when the description was typed in another one. Keep names, places and titles the organizer quoted exactly as written: rewording their own text beyond translation would be the kind of invention the prompt's never-invent rule forbids.
  • Content and language agree. The route passes the same language to persistDraft (#627), so the signup's language matches its content.

Watch for

  • The golden file is compared byte for byte (prompt.test.ts), so pin it with a fixed language value.
  • Evals. scripts/eval-magic-compose.ts and evals/magic-compose/dev-evals.json gain a language per case. Add a Swedish description, and an English description from an organizer whose language is Swedish. Run pnpm eval:magic-compose and pnpm eval:mcp (they need the LLM_* env) and put the results in the PR.
  • The rule stays in this prompt only. RULES_IN_BOTH and the MCP instructions don't change.
  • An edge case to know about. An organizer whose language is still a guess from an English browser gets an English draft even if they type in Swedish. Saving their language fixes it for good.

Choices this makes

  • The organizer's language wins over the description's. Default: yes, as the owner decided.

Order

After #627, because the persistDraft language option comes from it.

Done when

  • The prompt tests cover {{LANGUAGE}} filled in; the golden is updated; the eval results are in the PR.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test pass.

Planned with the owner in https://claude.ai/code/session_01EFKmj716ZY3b3SwR8TV8Y2 and checked against the code on main at 35288fa. The full plan is private to the owner's account: https://claude.ai/artifact/VgQH6U2s2EVx3LX991fJi8 (a Claude session on that account can open it with the Artifact tool's read action). This is step 1.7 there.

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

環境構築

はじめの一歩

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

richshaw/OpenSignup のほかの issue

richshaw/OpenSignup の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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