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

Aperta
#770 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@fefezey ci sta già lavorando.

Dal 4/11/2026.

  • #790 di @fefezey — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
19
Fork
4
Merge medio
19h 38m
PR unite (30g)
197

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di richshaw/OpenSignup

Tutte le issue di richshaw/OpenSignup

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.