Altinity / Altinity/altinity-sql-browser

Dashboard tile drag: pointerdown-time engine snapshot can disagree with live engine reads mid-gesture

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

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

inbox
主要言語
TypeScript
スター
8
フォーク
2
平均マージ
1時間 34分
マージ済み PR(30日)
6

説明

In src/ui/dashboard-tile-gestures.ts's wireTileDrag, a drag gesture snapshots the active engine once, at pointerdown, into liveReflow (line 393: const liveReflow = deps.activeEngine() === 'grafana-grid';), which then governs the reflow/hit-test path for the rest of that one gesture. By contrast, deps.renderedSurface(tileId) — used for drop-target styling (setDrop, lines 449 and 451) and home-rect capture (beginMove, line 505) — is read live on every call; dashboard.ts's own implementation of that dependency re-checks its current engine each time, not just at gesture start. An engine flip mid-drag (e.g. an unrelated change-layout command dispatched while a move is active — nothing cancels an in-flight gesture on a command) makes the two disagree: the gesture keeps following whichever reflow path was active at pointerdown, while surface lookups made during the same gesture see the new engine.

Pinned by: the app-level characterization test "an engine flip mid-drag leaves the gesture on its GESTURE-START reflow path, not the live engine's" in tests/unit/dashboard.test.ts's "tile gesture concurrency characterization" block, and directly at the controller-unit level by "activeEngine() is read fresh at POINTERDOWN (not memoized at controller construction), and stays frozen for the rest of that one gesture while renderedSurface() keeps reading live" in tests/unit/dashboard-tile-gestures.test.ts.

Pre-existing latent inconsistency predating #589 (#593 refactor umbrella); wave 2's extraction preserved it verbatim (documented in the module's own doc comment, lines 17-26) rather than "fixing" it during a pure structural move. Out of scope here — filing for a deliberate follow-up decision.

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

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

はじめの一歩

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

調査の方向性

src/ui/dashboard-tile-gestures.ts、特に wireTileDrag とそのモジュールコメントを読み、その後 tests/unit/dashboard.test.ts と tests/unit/dashboard-tile-gestures.test.ts の特性評価ケースを実行してください。この issue では、ジェスチャーの途中における既存のエンジンの不整合が記録されていますが、望ましい動作はスコープ外とされています。完了には、まず maintainer による判断を行い、その後、合意された実装と更新されたテストが必要です。

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

評価

技術スタック
typescript
領域
frontend
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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