Skip to content

fix(ui): real pointer-based manual sort + hide internal fields from drawer - #14

Closed
Haaaiawd wants to merge 2 commits into
masterfrom
fix/wheel-manual-drag-and-hide-fields
Closed

Haaaiawd wants to merge 2 commits into
masterfrom
fix/wheel-manual-drag-and-hide-fields

Conversation

@Haaaiawd

@Haaaiawd Haaaiawd commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Drag did not move — root cause

HTML5 native DnD in WebView2 + a mode gate. Three suspect paths, two disproven with evidence:

  • data-wheel-id IS rendered (prompts.js:47) → NaN dragId hypothesis disproven
  • state.wheelSort defaults to 'auto' (store.js:67) → dragstart runs e.preventDefault() + toast → the drag is blocked before it ever starts. This is the blocker.
  • HTML5 draggable set in mousedown and cleared in mouseup leaves a ~0-width window and is unreliable on WebView2.

Replaced with pointer-event based reordering: hold row → lift (shadow/opacity) → dashed accent insertion slot tracks the pointer → release commits via set_pin_order.

Hide internal fields (user request)

Removed from the drawer UI: 应用范围 (#fApps) and 轮盘位置 (#fOrder) — internal mechanics should not be user-editable. JS read/write and dirty-watchers cleaned; i18n keys removed both languages.

Backend untouched: app_scopes_json / inject_order columns stay. On save, existing values are passed through so a save cannot silently wipe the order set_pin_order writes. New prompts send null (verified Option<String> binds NULL; readers use unwrap_or_default(), so null ≡ "[]").

Verified

  • Playwright 17/17 first run — real mouse.down/move/up, asserts DOM reorder + set_pin_order called + auto→manual flip + drawer fields gone + keyboard reorder. Screenshots captured mid-drag (lifted card + insertion slot) and post-drop.
  • No regression in existing e2e.
  • Self-caught: commitPinOrder flipped wheelSort before the IPC resolved → mode said manual while order never persisted. Flip moved after IPC success.

haa and others added 2 commits October 7, 2026 07:48
…rawer

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Haaaiawd pushed a commit that referenced this pull request Oct 7, 2026
@Haaaiawd

Haaaiawd commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

已 squash 合并入 master(commit baa37fe)。

@Haaaiawd Haaaiawd closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant