Staged edits are silently dropped when a global search is active
まだ誰も着手していません。
- #1590 @MarianBeuther による — マージされずにクローズ
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- postgresql, typescript
調査の方向性
Start with ExpandableSearchControl, which clears the applied search term through closeRowSearch when disabled becomes true, and with ActiveTableView, which passes hasStagedChanges into it. Then follow saveStagedRows into useActiveTableUpdateMany to see why collection.update runs against the unfiltered rows. Done means a staged edit on a row found through global search is saved to the database, and updateMany errors are surfaced. A linked open pull request (#1590) already targets this, so check it before starting.
索引モデルが issue の本文から書いたものです。
説明
Studio distribution
Embedded (@prisma/studio-core in my own app). Also reproduced with this repo's pnpm demo:ppg.
Database
PostgreSQL
Database version
PostgreSQL 17 (our app); PGlite via @prisma/dev 0.24.13 (pnpm demo:ppg)
Prisma & studio-core versions
@prisma/studio-core: 0.34.1 (embedded via createStudioBFFClient + createPostgresAdapter, BFF uses createPostgresJSExecutor)
prisma/studio main @ d3578a7 (pnpm demo:ppg)
Operating system & browser
macOS 26.6, Chromium (Playwright 1.60)
Steps to reproduce
Using pnpm demo:ppg (no custom code), table team_members (400 seeded rows), infinite scroll off:
- Open
http://localhost:4310/#schema=public&table=team_members. - Open global search and search for
usr_demo_063. The single matching row is shown. Unfiltered, it sits at offset 60, so it is not on the first page. - Double-click the
titlecell of that row, type a new value, press Enter. "Save 1 row" appears. - Click "Save 1 row" → "yes, write to db".
Control: same steps, but replace step 2 with a SQL WHERE filter id = 'usr_demo_063'. The update is sent and persisted.
This looks like the same failure class as #1466 / #1545 (the save targets a rows collection that doesn't contain the edited row). #1545 fixed the infinite-scroll path; the global-search path still has it.
Expected behavior
An update is sent to the BFF and the new title is persisted, like it is with a column/SQL filter.
Actual behavior
- After step 3 the search input is empty and the grid shows the unfiltered first page. The edited row is no longer visible.
- After step 4 no
updaterequest reaches/api/query, no error is shown, "Save 1 row" stays, and after reload the DB still has the old value. - 100% reproducible with any row that is not on the unfiltered first page. Rows that are also on the first page save fine, which makes it look intermittent in larger tables.
Cause, from reading the source on main:
ActiveTableViewrenders<ExpandableSearchControl disabled={hasStagedChanges} onBlockedInteraction={triggerDiscardButtonWiggle} …>.ExpandableSearchControlhas:
anduseEffect(() => { if (!disabled) return; closeRowSearch(); }, [closeRowSearch, disabled]);closeSearch()callsapplySearchValue("").- So staging the first edit clears the applied search term, and the visible window /
mutationQueryPropsswitch to the unfiltered rows collection. saveStagedRows()→useActiveTableUpdateMany→collection.update(rowIds, …)then runs against a collection that doesn't contain the edited row. That throws, andupdateMany.mutate(…, { onSuccess })has noonError, so the failure is silent.
Possible fixes:
- Keep the applied search term while edits are staged: block the input (as
onBlockedInteractionalready does) instead of closing it. - Surface
updateManyerrors.
Logs
No error is logged in the browser console and no request reaches the BFF.
Two smaller things in createPostgresJSExecutor (0.34.1), noticed while debugging. Happy to split them into separate issues:
lintSqldiagnostic positions overshoot. Statements are linted asEXPLAIN (FORMAT JSON) ${statement}, butcreateLintDiagnosticsFromPostgresErrorgetssql: statementwithout subtracting the prefix length from Postgres'position. Highlights land 22 characters too far right and get clamped to the end of the statement.executeTransactionskipsnormalizeTemporalResult.executenormalisestimestamp/date,executeTransactionreturns raw postgres.js rows. Outside UTC, rows returned from a multi-row save disagree with the same rows fromquery.
- 主要言語
- TypeScript
- スター
- 2.2k
- フォーク
- 91
- 平均マージ
- 15時間 27分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
prisma/studio のほかの issue
-
kind/feature
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
@prisma/studio-core 0.34.1 bundles kysely 0.28.10 (CVE-2026-32763, CVE-2026-33468, CVE-2026-44635)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
-
SQL view on MySQL runs the whole script when a string contains a backslash-escaped quote対応中かも @RaphaelFakhri が 33 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
似ている issue
-
kind:defect
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mux-labs/mux-frontend#1240 ·
メンテナーはふだん 1 日以内に返信
-
area: agents-mcp priority: normal
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
Wait for the IDS correction dialog to settle in the stale-audit test対応中かも @louistrue が今日担当しました。 オープンready
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Hono path parameters with a regex pattern keep the pattern in the OpenAPI path対応中かも @0z5a が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cloudflare/chanfana#400 ·
メンテナーはふだん 1 日以内に返信