The Build tab works out a row's group in three places, and group rename uses a slightly different rule

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

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

@fefezey がすでに取り組んでいます。

2026年11月4日 から。

  • #790 @fefezey による — オープン

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
62/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

Start in src/components/build-wysiwyg/BuildWysiwyg.tsx beside EMPTY_GROUP_KEY, and compare partitionRows, the getGroupKey passed to useReorderable, and the row filter in handleRenameGroup. Add groupKeyOf and groupValueOf, then switch rawValue, onTransfer and handleAddSlot over, leaving the '__flat__' branch alone. Done when a test shows renaming the empty group touches exactly the rows the partition displays there, and the lint, typecheck, knip and test scripts pass.

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

説明

enhancement good first issue

What happens

In src/components/build-wysiwyg/BuildWysiwyg.tsx, the rule "a row with no value for the group field belongs to EMPTY_GROUP_KEY" is written out three times, and its inverse ("EMPTY_GROUP_KEY means the value ''") three more:

  • Value to key: partitionRows (which groups are shown), getGroupKey passed to useReorderable (dragging between groups), and the row filter in handleRenameGroup.
  • Key to value: partitionRows' rawValue, onTransfer, and the seeding in handleAddSlot.

The rename filter is written differently from the other two, and is not quite the same rule: a row whose value is literally the text __empty__ is shown in the empty group, but renaming the empty group skips it. Nobody will realistically type that, but it is the drift the copies invite.

Fix, in outline

  • Add two module-level helpers next to EMPTY_GROUP_KEY: groupKeyOf(row, ref) and groupValueOf(key).
  • Use them at all six places; the rename filter becomes groupKeyOf(r, ref) === oldKey.

Watch for

  • Keep '__flat__' handling in handleAddSlot as it is.
  • Roughly line-neutral: the gain is one rule, not fewer lines.

Done when

  • The empty-group rule is written once in each direction.
  • A test pins that renaming the empty group picks exactly the rows the partition shows in it.
  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test pass.

Found by the pipeline's refactor scout in the Build tab (src/components/build-wysiwyg), at 167b4a4. Checked by an independent verify agent, which quoted every copy and found the one input where the rename rule differs. https://claude.ai/code/session_016YZ9SUFioou8ZnL5ZvR43M

Held back by the scout's cap. Add pipeline:ready to queue it.

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

環境構築

はじめの一歩

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

richshaw/OpenSignup のほかの issue

richshaw/OpenSignup の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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