Tile position editor cannot reorder into an occupied position
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- postgresql, typescript
調査の方向性
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
- Open
/admin/tileswith two tiles at positions 0 and 1. - Change the position of tile 0 to 1 and save.
- The database rejects the update on the unique
positionconstraint, 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.tssrc/routes/admin/tiles/+page.server.tssrc/routes/admin/tiles/+page.svelte
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hacksu/bingo のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·