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

Tile position editor cannot reorder into an occupied position

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, typescript
領域
backend, database

調査の方向性

src/routes/admin/tiles/+page.server.ts の更新アクションと src/lib/server/db/schema.ts の位置制約から始め、続いて src/routes/admin/tiles/+page.svelte のフォームフローを調べます。2つのタイルを使って位置0から位置1への移動を再現します。占有されている位置を安全に並べ替えまたは入れ替えでき、競合時に未処理のデータベースエラーではなくバリデーションエラーが返されれば完了です。

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

説明

Problem

The admin tiles page promises reordering by position, but bingo_tile.position is unique and the update action writes the submitted position directly. Moving a tile to any existing position causes PostgreSQL's unique-constraint error instead of changing the order; swapping two positions is impossible through the UI.

Reproduction

  1. Open /admin/tiles with two tiles at positions 0 and 1.
  2. Change the position of tile 0 to 1 and save.
  3. The database rejects the update on the unique position constraint, currently surfaced as a server error.

Suggested fix

Implement a reorder operation that adjusts the intervening positions in a transaction (or use a temporary unused position for swaps), and return a validation error rather than an unhandled database error for conflicts.

Affected code

  • src/lib/server/db/schema.ts
  • src/routes/admin/tiles/+page.server.ts
  • src/routes/admin/tiles/+page.svelte
主要言語
TypeScript
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

hacksu/bingo のほかの issue

hacksu/bingo の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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